Re: possible lockdep regression introduced by 4d004099a668 ("lockdep: Fix lockdep recursion")

From: Jan Kara
Date: Mon Oct 26 2020 - 07:55:45 EST


On Mon 26-10-20 12:40:09, Peter Zijlstra wrote:
> On Mon, Oct 26, 2020 at 11:26:49AM +0000, Filipe Manana wrote:
> > Hello,
> >
> > I've recently started to hit a warning followed by tasks hanging after
> > attempts to freeze a filesystem. A git bisection pointed to the
> > following commit:
> >
> > commit 4d004099a668c41522242aa146a38cc4eb59cb1e
> > Author: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> > Date: Fri Oct 2 11:04:21 2020 +0200
> >
> > lockdep: Fix lockdep recursion
> >
> > This happens very reliably when running all xfstests with lockdep
> > enabled, and the tested filesystem is btrfs (haven't tried other
> > filesystems, but it shouldn't matter). The warning and task hangs always
> > happen at either test generic/068 or test generic/390, and (oddly)
> > always have to run all tests for it to trigger, running those tests
> > individually on an infinite loop doesn't seem to trigger it (at least
> > for a couple hours).
> >
> > The warning triggered is at fs/super.c:__sb_start_write() which always
> > results later in several tasks hanging on a percpu rw_sem:
> >
> > https://pastebin.com/qnLvf94E
> >
> > What happens is percpu_rwsem_is_held() is apparently returning a false
> > positive,
>
> That smells like the same issue reported here:
>
> https://lkml.kernel.org/r/20201022111700.GZ2651@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> Make sure you have commit:
>
> f8e48a3dca06 ("lockdep: Fix preemption WARN for spurious IRQ-enable")
>
> (in Linus' tree by now) and do you have CONFIG_DEBUG_PREEMPT enabled?

Hum, I am at 5.10-rc1 now and above mentioned commit doesn't appear to be
there? Also googling for the title doesn't help...

Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR