syzbot


WARNING: locking bug in rcu_pending_exit

Status: upstream: reported C repro on 2024/10/21 23:24
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+8d7226784b8fcb4c9d04@syzkaller.appspotmail.com
First crash: 384d, last: 42d
Cause bisection: introduced by (bisect log) :
commit 5db755fbb1a0de4a4cfd5d5edfaa19853b9c56e6
Author: Christoph Hellwig <hch@lst.de>
Date: Fri May 31 07:47:56 2024 +0000

  ubd: refactor the interrupt handler

Crash: BUG: unable to handle kernel NULL pointer dereference in srcu_invoke_callbacks (log)
Repro: C syz .config
  
Fix bisection the fix commit could be any of (bisect log):
  d4d71b58e513 bcachefs: RO mounts now use less memory
  3a2a0d08b225 bcachefs: move_data_phys: stats are not required
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] WARNING: locking bug in rcu_pending_exit 0 (3) 2024/12/01 20:03
Last patch testing requests (10)
Created Duration User Patch Repo Result
2025/10/22 08:12 18m retest repro upstream OK log
2025/10/19 21:12 23m retest repro upstream OK log
2025/10/19 21:12 20m retest repro upstream OK log
2025/09/19 03:25 21m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2025/09/19 03:25 27m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2025/08/13 02:40 46m retest repro upstream report log
2025/08/05 03:45 22m retest repro upstream report log
2025/08/05 03:45 18m retest repro upstream report log
2025/07/11 01:44 24m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2025/07/11 01:44 23m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
Fix bisection attempts (6)
Created Duration User Patch Repo Result
2025/11/03 12:11 7h23m bisect fix upstream OK (2) job log
2025/09/24 10:36 2h38m bisect fix upstream OK (0) job log log
2025/08/22 06:41 2h15m bisect fix upstream OK (0) job log log
2025/07/21 00:05 3h37m bisect fix upstream OK (0) job log log
2025/06/20 03:49 2h25m bisect fix upstream OK (0) job log log
2025/05/19 13:35 2h27m bisect fix upstream OK (0) job log log

Sample crash report:
------------[ cut here ]------------
Looking for class "ock" with key rcu_pending_init.__key, but found a different class "&p->lock" with the same key
WARNING: CPU: 0 PID: 7746 at kernel/locking/lockdep.c:939 look_up_lock_class+0xec/0x160 kernel/locking/lockdep.c:936
Modules linked in:
CPU: 0 UID: 0 PID: 7746 Comm: syz-executor315 Not tainted 6.13.0-rc7-syzkaller-g1950a0af2d55 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : look_up_lock_class+0xec/0x160 kernel/locking/lockdep.c:936
lr : look_up_lock_class+0xec/0x160 kernel/locking/lockdep.c:936
sp : ffff80009bd66dc0
x29: ffff80009bd66dc0 x28: dfff800000000000 x27: 0000000000000000
x26: ffff8000974df900 x25: ffff8000974df000 x24: 0000000000000001
x23: 0000000000000000 x22: 1ffff00011f340ca x21: ffff800097686dc0
x20: fffffdffbf77de38 x19: ffff80009300a048 x18: 0000000000000008
x17: 756f662074756220 x16: ffff80008327a354 x15: 0000000000000001
x14: 1fffe000366fc6ea x13: 0000000000000000 x12: 0000000000000000
x11: 0000000000000003 x10: 0000000000ff0100 x9 : 5925908dae4fca00
x8 : 5925908dae4fca00 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80009bd664f8 x4 : ffff80008fa90460 x3 : ffff80008073e504
x2 : 0000000000000001 x1 : 0000000100000001 x0 : 0000000000000000
Call trace:
 look_up_lock_class+0xec/0x160 kernel/locking/lockdep.c:936 (P)
 register_lock_class+0x8c/0x6b4 kernel/locking/lockdep.c:1290
 __lock_acquire+0x18c/0x7904 kernel/locking/lockdep.c:5101
 lock_acquire+0x23c/0x724 kernel/locking/lockdep.c:5849
 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline]
 _raw_spin_lock_irq+0x58/0x70 kernel/locking/spinlock.c:170
 spin_lock_irq include/linux/spinlock.h:376 [inline]
 rcu_pending_has_pending_or_armed fs/bcachefs/rcu_pending.c:576 [inline]
 rcu_pending_exit+0x124/0x660 fs/bcachefs/rcu_pending.c:594
 bch2_fs_btree_key_cache_exit+0x7ec/0x8f4 fs/bcachefs/btree_key_cache.c:742
 __bch2_fs_free fs/bcachefs/super.c:556 [inline]
 bch2_fs_release+0x1fc/0x728 fs/bcachefs/super.c:611
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x2a8/0x41c lib/kobject.c:737
 bch2_fs_free+0x2c4/0x334 fs/bcachefs/super.c:673
 bch2_fs_stop+0x28/0x38 fs/bcachefs/super.c:679
 bch2_fs_get_tree+0xab0/0x1030 fs/bcachefs/fs.c:2265
 vfs_get_tree+0x90/0x28c fs/super.c:1814
 do_new_mount+0x278/0x900 fs/namespace.c:3511
 path_mount+0x590/0xe04 fs/namespace.c:3838
 do_mount fs/namespace.c:3851 [inline]
 __do_sys_mount fs/namespace.c:4061 [inline]
 __se_sys_mount fs/namespace.c:4038 [inline]
 __arm64_sys_mount+0x4d4/0x5ac fs/namespace.c:4038
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151
 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744
 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762
 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600
irq event stamp: 67334
hardirqs last  enabled at (67333): [<ffff80008b6cd25c>] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline]
hardirqs last  enabled at (67333): [<ffff80008b6cd25c>] _raw_spin_unlock_irqrestore+0x38/0x98 kernel/locking/spinlock.c:194
hardirqs last disabled at (67334): [<ffff80008b6cd104>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline]
hardirqs last disabled at (67334): [<ffff80008b6cd104>] _raw_spin_lock_irq+0x28/0x70 kernel/locking/spinlock.c:170
softirqs last  enabled at (66380): [<ffff80008030f088>] softirq_handle_end kernel/softirq.c:407 [inline]
softirqs last  enabled at (66380): [<ffff80008030f088>] handle_softirqs+0xb44/0xd34 kernel/softirq.c:589
softirqs last disabled at (66357): [<ffff800080020db4>] __do_softirq+0x14/0x20 kernel/softirq.c:595
---[ end trace 0000000000000000 ]---
bcachefs: bch2_fs_get_tree() error: fsck_errors_not_fixed

Crashes (25):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/26 02:03 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1950a0af2d55 9fbd772e .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 WARNING: locking bug in rcu_pending_exit
2025/01/16 11:41 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 6251d1776bc5 968edaf4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 WARNING: locking bug in rcu_pending_exit
2025/04/17 03:50 upstream c62f4b82d571 a95239b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING: locking bug in rcu_pending_exit
2025/03/24 19:57 upstream 38fec10eb60d 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING: locking bug in rcu_pending_exit
2025/03/15 14:33 upstream a29967be967e e2826670 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING: locking bug in rcu_pending_exit
2025/02/24 14:06 upstream d082ecbc71e9 d34966d1 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2 (clean fs)] ci2-upstream-fs WARNING: locking bug in rcu_pending_exit
2025/02/24 00:46 upstream d082ecbc71e9 d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING: locking bug in rcu_pending_exit
2025/02/17 20:36 upstream 0ad2507d5d93 4121cf9d .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs WARNING: locking bug in rcu_pending_exit
2025/01/30 12:14 upstream 805ba04cb7cc afe4eff5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING: locking bug in rcu_pending_exit
2025/01/22 12:01 upstream c4b9570cfb63 da72ac06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING: locking bug in rcu_pending_exit
2025/01/03 11:50 upstream 0bc21e701a6f d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING: locking bug in rcu_pending_exit
2024/12/26 15:40 upstream 9b2ffa6148b1 d3ccff63 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs WARNING: locking bug in rcu_pending_exit
2024/12/15 07:46 upstream a0e3919a2df2 7cbfbb3a .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs WARNING: locking bug in rcu_pending_exit
2024/11/30 21:46 upstream 2ba9f676d0a2 68914665 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs WARNING: locking bug in rcu_pending_exit
2024/10/17 23:16 upstream 6efbea77b390 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING: locking bug in rcu_pending_exit
2025/03/22 11:11 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a2392f333575 c6512ef7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: locking bug in rcu_pending_exit
2025/03/22 10:17 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a2392f333575 c6512ef7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: locking bug in rcu_pending_exit
2025/03/13 11:05 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 78e3fd2b7e4b 44be8b44 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: locking bug in rcu_pending_exit
2025/01/19 20:03 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1950a0af2d55 f2cb035c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: locking bug in rcu_pending_exit
2025/01/10 22:57 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 6251d1776bc5 67d7ec0a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: locking bug in rcu_pending_exit
2024/12/13 08:46 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2e7aff49b5da 3547e30f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: locking bug in rcu_pending_exit
2024/12/04 01:06 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 7b1d1d4cfac0 b50eb251 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: locking bug in rcu_pending_exit
2024/11/20 08:13 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 7b1d1d4cfac0 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: locking bug in rcu_pending_exit
2024/11/14 02:44 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8e9a54d7181b a8c99394 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: locking bug in rcu_pending_exit
2024/11/13 10:21 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci baa007e8da32 62026c85 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: locking bug in rcu_pending_exit
* Struck through repros no longer work on HEAD.