From: Ric Wheeler <rwheeler@redhat.com>
To: Chris Mason <chris.mason@oracle.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: btrfs panic - BUG: soft lockup - CPU#0 stuck for 61s! [fs_mark:4573]
Date: Mon, 09 Jun 2008 09:51:50 -0400 [thread overview]
Message-ID: <484D3576.3070304@redhat.com> (raw)
In-Reply-To: <20080608223712.73692933@think.oraclecorp.com>
Chris Mason wrote:
> On Thu, 05 Jun 2008 13:43:48 -0400
> Ric Wheeler <rwheeler@redhat.com> wrote:
>
>
>> Chris Mason wrote:
>>
>>> On Mon, Jun 02, 2008 at 01:52:47PM -0400, Ric Wheeler wrote:
>>>
>>>
>>>> I can reliably get btrfs to panic by running my fs_mark code on a
>>>> newly created file system with lots of threads on an 8-way box. If
>>>> this is too aggressive, let me know ;-)
>>>>
>>>> Here is a summary of the panic:
>>>>
>>>>
>>> BTW, exactly how are you running fs_mark? Mingming reminded me that
>>> strictly speaking this patch shouldn't be required, so there might
>>> be other related problems.
>>>
>>> -chris
>>>
>>>
>>>
>> It still crashes, Mingming is clearly correct ;-)
>>
>>
>
> Grin, I never should have doubted her.
>
> So, the actual fix should be below. It looks like the problem is that I've got
> a race in setting the pointer to a new transaction, which makes the
> data=ordered code take a spin lock that hasn't yet been setup.
>
> Before this patch my test box got into an infinite loop with fs_mark. Now it
> seems to run to completion.
>
> -chris
>
Thanks Chris - this patch works for me as well,
ric
> diff -r 0b4ab489ffe1 transaction.c
> --- a/transaction.c Tue May 27 10:55:43 2008 -0400
> +++ b/transaction.c Sun Jun 08 22:23:50 2008 -0400
> @@ -56,7 +56,6 @@ static noinline int join_transaction(str
> total_trans++;
> BUG_ON(!cur_trans);
> root->fs_info->generation++;
> - root->fs_info->running_transaction = cur_trans;
> root->fs_info->last_alloc = 0;
> root->fs_info->last_data_alloc = 0;
> cur_trans->num_writers = 1;
> @@ -74,6 +73,9 @@ static noinline int join_transaction(str
> extent_io_tree_init(&cur_trans->dirty_pages,
> root->fs_info->btree_inode->i_mapping,
> GFP_NOFS);
> + spin_lock(&root->fs_info->new_trans_lock);
> + root->fs_info->running_transaction = cur_trans;
> + spin_unlock(&root->fs_info->new_trans_lock);
> } else {
> cur_trans->num_writers++;
> cur_trans->num_joined++;
>
next prev parent reply other threads:[~2008-06-09 13:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-02 17:52 btrfs panic - BUG: soft lockup - CPU#0 stuck for 61s! [fs_mark:4573] Ric Wheeler
2008-06-04 1:27 ` Chris Mason
2008-06-04 19:46 ` Ric Wheeler
2008-06-04 20:12 ` Chris Mason
2008-06-05 14:34 ` Chris Mason
2008-06-05 15:16 ` Ric Wheeler
[not found] ` <484825D4.2010402@redhat.com>
2008-06-09 2:37 ` Chris Mason
2008-06-09 13:51 ` Ric Wheeler [this message]
2008-06-10 0:10 ` Mingming Cao
2008-06-10 0:47 ` Chris Mason
2008-06-10 18:38 ` Mingming Cao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=484D3576.3070304@redhat.com \
--to=rwheeler@redhat.com \
--cc=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox