mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>, Jan Kara <jack@suse.cz>,
	"Theodore Ts'o" <tytso@mit.edu>,
	Sebastian Sewior <bigeasy@linutronix.de>
Subject: Re: [BUG] jbd2: lockdep deadlock warning
Date: Mon, 19 Sep 2016 09:58:58 +0200	[thread overview]
Message-ID: <20160919075858.GA11487@quack2.suse.cz> (raw)
In-Reply-To: <alpine.DEB.2.20.1609161524550.5384@nanos>

Hi!

On Fri 16-09-16 15:35:39, Thomas Gleixner wrote:
> Jan,
> 
> wer are currently moving the RT patch to 4.8 and on our test runs we
> triggered the following lockdep splat:
> 
> [  153.887910] ======================================================
> [  153.887911] [ INFO: possible circular locking dependency detected ]
> [  153.887912] 4.8.0-rc6-rt0+ #679 Tainted: G        W
> [  153.887912] -------------------------------------------------------
> [  153.887913] find/2537 is trying to acquire lock:
> [  153.887923]  (&journal->j_state_lock){+.+...}, at: [<ffffffff81300ed0>] jbd2_log_start_commit+0x20/0x40
> [  153.887924]
> [  153.887924] but task is already holding lock:
> [  153.887925]  (jbd2_handle){++++..}, at: [<ffffffff812f5411>] start_this_handle+0x111/0x470
> [  153.887925]
> [  153.887925] which lock already depends on the new lock.
> [  153.887925]
> [  153.887926]
> [  153.887926] the existing dependency chain (in reverse order) is:
> [  153.887927]
> [  153.887927] -> #1 (jbd2_handle){++++..}:
> [  153.887931]        [<ffffffff810cfb5f>] lock_acquire+0x12f/0x2c0
> [  153.887932]        [<ffffffff812f4fed>] add_transaction_credits+0x4d/0x310
> [  153.887933]        [<ffffffff812f5409>] start_this_handle+0x109/0x470
> [  153.887933]        [<ffffffff812f5d1b>] jbd2__journal_start+0xdb/0x380
> [  153.887936]        [<ffffffff812d96a0>] __ext4_journal_start_sb+0x90/0x2b0
> [  153.887940]        [<ffffffff8129d10e>] ext4_file_open+0x11e/0x230
> [  153.887946]        [<ffffffff8120c808>] do_dentry_open.isra.16+0x168/0x310
> [  153.887948]        [<ffffffff8120dbe5>] vfs_open+0x45/0x70
> [  153.887950]        [<ffffffff8121f30c>] path_openat+0x48c/0xa20
> [  153.887951]        [<ffffffff81220b9e>] do_filp_open+0x7e/0xe0
> [  153.887953]        [<ffffffff81215164>] do_open_execat+0x64/0x150
> [  153.887954]        [<ffffffff812174a8>] do_execveat_common.isra.43+0x278/0x950
> [  153.887955]        [<ffffffff81217f30>] compat_SyS_execve+0x40/0x50
> [  153.887956]        [<ffffffff810032d2>] do_fast_syscall_32+0xb2/0x2f0
> [  153.887960]        [<ffffffff818e7b31>] entry_SYSENTER_compat+0x51/0x60

Thanks for report! This is a bug in lockdep annotation in
add_transaction_credits() where I mistakenly added a call to
jbd2_might_wait_for_commit() before actually releasing the j_state_lock.
I'll send a fix. I'm surprised this didn't hit in my testing...

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

      reply	other threads:[~2016-09-19  7:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-16 13:35 Thomas Gleixner
2016-09-19  7:58 ` Jan Kara [this message]

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=20160919075858.GA11487@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tytso@mit.edu \
    /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

all inboxes | Powered by JetHome®