linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 29402] kernel panics while running ffsb scalability workloads on 2.6.38-rc1 through -rc5
Date: Tue, 22 Feb 2011 13:43:25 GMT	[thread overview]
Message-ID: <201102221343.p1MDhPri028681@demeter2.kernel.org> (raw)
In-Reply-To: <bug-29402-13602@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=29402


Lukas Czerner <lczerner@redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lczerner@redhat.com




--- Comment #6 from Lukas Czerner <lczerner@redhat.com>  2011-02-22 13:43:24 ---
Hi Eric,

it might be just a shot in the dark, but would you be willing to try out this
patch ? Unfortunately I do not currently have a machine to reproduce the
problem.

I *think* that the problem is in the block layer (bio_batch_end_io() and
blkdev_issue_zeroout() to be specific) and since lazy init is using that to do
the zeroing we can not hit it with lazy init turned off.

Now, the problem I see is that when we are going to wait_for_completion() in
blkdev_issue_discard() we check if the bb.done equals issued (number of issued
bios). If it equals, we can skip the wait_for_completion() and jump out of the
function since there is nothing to wait for. However, there is a ordering
problem because bio_batch_end_io() is calling atomic_inc(&bb->done) before
complete(), hence it might seem to blkdev_issue_zeroout() that all bios has
been completed and exit. At this point when bio_batch_end_io() is going to call
complete(bb->wait) bb does not longer exist since it was declared locally in
blkdev_issue_zeroout() ==> panic while trying to acquire wait.lock!

(thread 1)                         (thread 2)
bio_batch_end_io()                 blkdev_issue_zeroout()
  if(bb) {                         ...
    if (bb->end_io)                ...
      bb->end_io(bio, err);        ...
    atomic_inc(&bb->done);         ...
    ...                            while (issued != atomic_read(&bb.done))
    ...                            (let issued == bb.done)
    ...                            (do the rest of the function)
    ...                            return ret;
    complete(bb->wait);
    ^^^^^^^^
Panic in complete() while trying to acquire spinlock.

I hope it is not complete nonsense :).Please let me know whether the patch
helps.

Thanks!
-Lukas

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.

  parent reply	other threads:[~2011-02-22 13:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-18 21:47 [Bug 29402] New: kernel panics while running ffsb scalability workloads on 2.6.38-rc1 through -rc5 bugzilla-daemon
2011-02-18 21:54 ` [Bug 29402] " bugzilla-daemon
2011-02-18 22:07 ` bugzilla-daemon
2011-02-18 22:20 ` bugzilla-daemon
2011-02-18 22:20 ` bugzilla-daemon
2011-02-21 15:52 ` [Bug 29402] New: " Lukas Czerner
2011-02-21 16:52 ` [Bug 29402] " bugzilla-daemon
2011-02-22  4:10 ` bugzilla-daemon
2011-02-22 11:30   ` Lukas Czerner
2011-02-22 11:30 ` bugzilla-daemon
2011-02-22 13:43 ` bugzilla-daemon
2011-02-22 13:43 ` bugzilla-daemon [this message]
2011-02-25  3:08 ` bugzilla-daemon
2011-02-25  3:25 ` bugzilla-daemon
2011-02-25  3:27 ` bugzilla-daemon
2011-02-26  3:50 ` bugzilla-daemon
2011-02-26 10:48 ` bugzilla-daemon
2011-02-28 18:07 ` bugzilla-daemon
2011-02-28 18:22 ` bugzilla-daemon
2011-03-03 18:58 ` bugzilla-daemon
2011-03-04 20:18 ` bugzilla-daemon
2011-03-04 20:19 ` bugzilla-daemon
2011-03-06 12:03 ` bugzilla-daemon
2011-03-11  8:13 ` bugzilla-daemon
2011-03-14 17:25 ` bugzilla-daemon

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=201102221343.p1MDhPri028681@demeter2.kernel.org \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-ext4@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;
as well as URLs for NNTP newsgroup(s).