linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [syzbot] [btrfs?] BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low! (4)
@ 2023-10-22  2:40 syzbot
  2023-10-23 13:08 ` David Sterba
  0 siblings, 1 reply; 4+ messages in thread
From: syzbot @ 2023-10-22  2:40 UTC (permalink / raw)
  To: clm, dsterba, josef, linux-btrfs, linux-fsdevel, linux-kernel,
	syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    78124b0c1d10 Merge branch 'for-next/core' into for-kernelci
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
console output: https://syzkaller.appspot.com/x/log.txt?x=1557da89680000
kernel config:  https://syzkaller.appspot.com/x/.config?x=f27cd6e68911e026
dashboard link: https://syzkaller.appspot.com/bug?extid=b2869947e0c9467a41b6
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=137ac45d680000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=16e4640b680000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/bd512de820ae/disk-78124b0c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a47a437b1d4f/vmlinux-78124b0c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/3ae8b966bcd7/Image-78124b0c.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/d5d514495f15/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+b2869947e0c9467a41b6@syzkaller.appspotmail.com

BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!
turning off the locking correctness validator.
CPU: 0 PID: 5571 Comm: kworker/u4:8 Not tainted 6.6.0-rc6-syzkaller-g78124b0c1d10 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
Workqueue: btrfs-cache btrfs_work_helper
Call trace:
 dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233
 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106
 dump_stack+0x1c/0x28 lib/dump_stack.c:113
 lookup_chain_cache_add kernel/locking/lockdep.c:3815 [inline]
 validate_chain kernel/locking/lockdep.c:3836 [inline]
 __lock_acquire+0x1c60/0x75e8 kernel/locking/lockdep.c:5136
 lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
 _raw_spin_lock+0x48/0x60 kernel/locking/spinlock.c:154
 spin_lock include/linux/spinlock.h:351 [inline]
 __clear_extent_bit+0x1b4/0xaf0 fs/btrfs/extent-io-tree.c:596
 clear_extent_bit fs/btrfs/extent-io-tree.h:146 [inline]
 clear_extent_bits fs/btrfs/extent-io-tree.h:158 [inline]
 btrfs_free_excluded_extents fs/btrfs/block-group.c:840 [inline]
 caching_thread+0x18bc/0x1b64 fs/btrfs/block-group.c:909
 btrfs_work_helper+0x340/0x1504 fs/btrfs/async-thread.c:314
 process_one_work+0x694/0x1204 kernel/workqueue.c:2630
 process_scheduled_works kernel/workqueue.c:2703 [inline]
 worker_thread+0x938/0xef4 kernel/workqueue.c:2784
 kthread+0x288/0x310 kernel/kthread.c:388
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:857
BTRFS info (device loop0): qgroup scan completed (inconsistency flag cleared)
BTRFS info (device loop0): qgroup scan completed (inconsistency flag cleared)
BTRFS info (device loop0): qgroup scan completed (inconsistency flag cleared)


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [syzbot] [btrfs?] BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low! (4)
  2023-10-22  2:40 [syzbot] [btrfs?] BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low! (4) syzbot
@ 2023-10-23 13:08 ` David Sterba
  2023-10-23 13:30   ` Aleksandr Nogikh
  0 siblings, 1 reply; 4+ messages in thread
From: David Sterba @ 2023-10-23 13:08 UTC (permalink / raw)
  To: syzbot
  Cc: clm, dsterba, josef, linux-btrfs, linux-fsdevel, linux-kernel,
	syzkaller-bugs

On Sat, Oct 21, 2023 at 07:40:53PM -0700, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    78124b0c1d10 Merge branch 'for-next/core' into for-kernelci
> git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> console output: https://syzkaller.appspot.com/x/log.txt?x=1557da89680000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=f27cd6e68911e026
> dashboard link: https://syzkaller.appspot.com/bug?extid=b2869947e0c9467a41b6
> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> userspace arch: arm64
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=137ac45d680000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=16e4640b680000
> 
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/bd512de820ae/disk-78124b0c.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/a47a437b1d4f/vmlinux-78124b0c.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/3ae8b966bcd7/Image-78124b0c.gz.xz
> mounted in repro: https://storage.googleapis.com/syzbot-assets/d5d514495f15/mount_0.gz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+b2869947e0c9467a41b6@syzkaller.appspotmail.com
> 
> BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!

#syz invalid

This is a frequent warning, can be worked around by increasing
CONFIG_LOCKDEP_CHAINS_BITS in config (18 could be a good value but may
still not be enough).

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [syzbot] [btrfs?] BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low! (4)
  2023-10-23 13:08 ` David Sterba
@ 2023-10-23 13:30   ` Aleksandr Nogikh
  2023-10-23 14:36     ` David Sterba
  0 siblings, 1 reply; 4+ messages in thread
From: Aleksandr Nogikh @ 2023-10-23 13:30 UTC (permalink / raw)
  To: dsterba
  Cc: syzbot, clm, dsterba, josef, linux-btrfs, linux-fsdevel,
	linux-kernel, syzkaller-bugs, Dmitry Vyukov

On Mon, Oct 23, 2023 at 3:15 PM David Sterba <dsterba@suse.cz> wrote:
>
> On Sat, Oct 21, 2023 at 07:40:53PM -0700, syzbot wrote:
> > Hello,
> >
> > syzbot found the following issue on:
> >
> > HEAD commit:    78124b0c1d10 Merge branch 'for-next/core' into for-kernelci
> > git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> > console output: https://syzkaller.appspot.com/x/log.txt?x=1557da89680000
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=f27cd6e68911e026
> > dashboard link: https://syzkaller.appspot.com/bug?extid=b2869947e0c9467a41b6
> > compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> > userspace arch: arm64
> > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=137ac45d680000
> > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=16e4640b680000
> >
> > Downloadable assets:
> > disk image: https://storage.googleapis.com/syzbot-assets/bd512de820ae/disk-78124b0c.raw.xz
> > vmlinux: https://storage.googleapis.com/syzbot-assets/a47a437b1d4f/vmlinux-78124b0c.xz
> > kernel image: https://storage.googleapis.com/syzbot-assets/3ae8b966bcd7/Image-78124b0c.gz.xz
> > mounted in repro: https://storage.googleapis.com/syzbot-assets/d5d514495f15/mount_0.gz
> >
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+b2869947e0c9467a41b6@syzkaller.appspotmail.com
> >
> > BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!
>
> #syz invalid
>
> This is a frequent warning, can be worked around by increasing
> CONFIG_LOCKDEP_CHAINS_BITS in config (18 could be a good value but may
> still not be enough).

By invalidating a frequently occurring issue we only cause syzbot to
report it once again, so it's better to keep the report open until the
root cause is resolved. There'll likely be a report (5) soon.

We keep CONFIG_LOCKDEP_CHAINS_BITS at 16 for arm64 because (at least
in 2022) the kernel used not to boot on GCE arm64 VMs with
CONFIG_LOCKDEP_CHAINS_BITS=18. Maybe it's time to try it once more.

-- 
Aleksandr

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [syzbot] [btrfs?] BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low! (4)
  2023-10-23 13:30   ` Aleksandr Nogikh
@ 2023-10-23 14:36     ` David Sterba
  0 siblings, 0 replies; 4+ messages in thread
From: David Sterba @ 2023-10-23 14:36 UTC (permalink / raw)
  To: Aleksandr Nogikh
  Cc: syzbot, clm, dsterba, josef, linux-btrfs, linux-fsdevel,
	linux-kernel, syzkaller-bugs, Dmitry Vyukov

On Mon, Oct 23, 2023 at 03:30:16PM +0200, Aleksandr Nogikh wrote:
> On Mon, Oct 23, 2023 at 3:15 PM David Sterba <dsterba@suse.cz> wrote:
> >
> > On Sat, Oct 21, 2023 at 07:40:53PM -0700, syzbot wrote:
> > > Hello,
> > >
> > > syzbot found the following issue on:
> > >
> > > HEAD commit:    78124b0c1d10 Merge branch 'for-next/core' into for-kernelci
> > > git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> > > console output: https://syzkaller.appspot.com/x/log.txt?x=1557da89680000
> > > kernel config:  https://syzkaller.appspot.com/x/.config?x=f27cd6e68911e026
> > > dashboard link: https://syzkaller.appspot.com/bug?extid=b2869947e0c9467a41b6
> > > compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> > > userspace arch: arm64
> > > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=137ac45d680000
> > > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=16e4640b680000
> > >
> > > Downloadable assets:
> > > disk image: https://storage.googleapis.com/syzbot-assets/bd512de820ae/disk-78124b0c.raw.xz
> > > vmlinux: https://storage.googleapis.com/syzbot-assets/a47a437b1d4f/vmlinux-78124b0c.xz
> > > kernel image: https://storage.googleapis.com/syzbot-assets/3ae8b966bcd7/Image-78124b0c.gz.xz
> > > mounted in repro: https://storage.googleapis.com/syzbot-assets/d5d514495f15/mount_0.gz
> > >
> > > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > > Reported-by: syzbot+b2869947e0c9467a41b6@syzkaller.appspotmail.com
> > >
> > > BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!
> >
> > #syz invalid
> >
> > This is a frequent warning, can be worked around by increasing
> > CONFIG_LOCKDEP_CHAINS_BITS in config (18 could be a good value but may
> > still not be enough).
> 
> By invalidating a frequently occurring issue we only cause syzbot to
> report it once again, so it's better to keep the report open until the
> root cause is resolved. There'll likely be a report (5) soon.

The root cause is somewhere in lockdep and not easy to fix so we'll have
to see the duplicate reports or

> We keep CONFIG_LOCKDEP_CHAINS_BITS at 16 for arm64 because (at least
> in 2022) the kernel used not to boot on GCE arm64 VMs with
> CONFIG_LOCKDEP_CHAINS_BITS=18. Maybe it's time to try it once more.

yeah, you can increase the config value.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-23 14:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-22  2:40 [syzbot] [btrfs?] BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low! (4) syzbot
2023-10-23 13:08 ` David Sterba
2023-10-23 13:30   ` Aleksandr Nogikh
2023-10-23 14:36     ` David Sterba

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).