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: 413d, last: 72d
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/11/28 11:43 1h05m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2025/11/28 11:43 31m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
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
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 ]------------
DEBUG_LOCKS_WARN_ON(1)
WARNING: CPU: 1 PID: 7518 at kernel/locking/lockdep.c:237 hlock_class kernel/locking/lockdep.c:237 [inline]
WARNING: CPU: 1 PID: 7518 at kernel/locking/lockdep.c:237 check_wait_context kernel/locking/lockdep.c:4855 [inline]
WARNING: CPU: 1 PID: 7518 at kernel/locking/lockdep.c:237 __lock_acquire+0x356/0xd80 kernel/locking/lockdep.c:5185
Modules linked in:
CPU: 1 UID: 0 PID: 7518 Comm: syz.2.193 Not tainted 6.15.0-rc2-syzkaller-00048-gc62f4b82d571 #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:hlock_class kernel/locking/lockdep.c:237 [inline]
RIP: 0010:check_wait_context kernel/locking/lockdep.c:4855 [inline]
RIP: 0010:__lock_acquire+0x356/0xd80 kernel/locking/lockdep.c:5185
Code: 89 c3 90 e8 4c 8f 5a 03 85 c0 74 22 83 3d d5 03 c0 0e 00 75 19 90 48 c7 c7 0d a3 4e 8e 48 c7 c6 9e b7 4e 8e e8 db 81 e3 ff 90 <0f> 0b 90 90 90 31 c0 48 8b 74 24 08 41 89 d8 0f b6 98 c4 00 00 00
RSP: 0018:ffffc9000339f5a0 EFLAGS: 00010046
RAX: ba2383a5469ef500 RBX: 0000000000000001 RCX: 0000000000080000
RDX: ffffc9000c652000 RSI: 000000000007ffff RDI: 0000000000080000
RBP: ffff8880251fbc00 R08: ffffffff81826812 R09: fffffbfff1d7a970
R10: dffffc0000000000 R11: fffffbfff1d7a970 R12: ffff8880251fc710
R13: ffff8880251fbc00 R14: 0000000000000000 R15: ffffe8ffffd6a4e0
FS:  00007ff9698da6c0(0000) GS:ffff8881250c9000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f05ae277000 CR3: 000000006cf60000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 lock_acquire+0x116/0x2f0 kernel/locking/lockdep.c:5866
 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline]
 _raw_spin_lock_irq+0xd3/0x120 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:592 [inline]
 rcu_pending_exit+0x142/0x7b0 fs/bcachefs/rcu_pending.c:610
 bch2_fs_btree_key_cache_exit+0x8d8/0xa00 fs/bcachefs/btree_key_cache.c:783
 __bch2_fs_free fs/bcachefs/super.c:572 [inline]
 bch2_fs_release+0x220/0x7d0 fs/bcachefs/super.c:627
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x22f/0x480 lib/kobject.c:737
 deactivate_locked_super+0xc4/0x130 fs/super.c:473
 bch2_fs_get_tree+0x11b4/0x18f0 fs/bcachefs/fs.c:2295
 vfs_get_tree+0x90/0x2b0 fs/super.c:1759
 do_new_mount+0x2cf/0xb70 fs/namespace.c:3881
 do_mount fs/namespace.c:4221 [inline]
 __do_sys_mount fs/namespace.c:4432 [inline]
 __se_sys_mount+0x38c/0x400 fs/namespace.c:4409
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff96898f90a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff9698d9e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ff9698d9ef0 RCX: 00007ff96898f90a
RDX: 0000200000000140 RSI: 0000200000000040 RDI: 00007ff9698d9eb0
RBP: 0000200000000140 R08: 00007ff9698d9ef0 R09: 0000000000200810
R10: 0000000000200810 R11: 0000000000000246 R12: 0000200000000040
R13: 00007ff9698d9eb0 R14: 0000000000005a7d R15: 0000200000000000
 </TASK>

Crashes (25):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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/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/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/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/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.