syzbot


kernel BUG in bch2_trans_update_by_path

Status: upstream: reported C repro on 2025/06/19 11:18
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+210dfbddd64294066983@syzkaller.appspotmail.com
First crash: 36d, last: 5d19h
Cause bisection: introduced by (bisect log) :
commit d21262d4e35d448cbc80092c91f04cc0a5f2b0b4
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date: Wed May 28 18:26:33 2025 +0000

  bcachefs: bch2_dev_journal_bucket_delete()

Crash: WARNING in rhashtable_init_noprof (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] kernel BUG in bch2_trans_update_by_path 0 (3) 2025/07/07 12:00

Sample crash report:
bcachefs (loop0): bucket 0:32 gen 0 data type need_discard has wrong dirty_sectors: got 256, should be 0, fixing
bcachefs (loop0): bucket 0:34 gen 0 has wrong data_type: got user, should be need_discard, fixing
bcachefs (loop0): bucket 0:34 gen 0 data type need_discard has wrong dirty_sectors: got 16, should be 0, fixing
 done
bcachefs (loop0): going read-write
bcachefs (loop0): journal_replay...
------------[ cut here ]------------
kernel BUG at fs/bcachefs/btree_update.c:375!
Oops: invalid opcode: 0000 [#1] SMP KASAN PTI
CPU: 0 UID: 0 PID: 5840 Comm: syz-executor359 Not tainted 6.16.0-rc5-syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:bch2_trans_update_by_path+0x1efb/0x1f30 fs/bcachefs/btree_update.c:375
Code: 80 e1 07 fe c1 38 c1 0f 8c 40 f7 ff ff 48 8b 7c 24 28 e8 a8 1b fa fd e9 31 f7 ff ff e8 1e c3 98 fd 90 0f 0b e8 16 c3 98 fd 90 <0f> 0b e8 0e c3 98 fd 90 0f 0b e8 06 c3 98 fd 90 0f 0b e8 fe c2 98
RSP: 0018:ffffc90003ffea08 EFLAGS: 00010293
RAX: ffffffff842761ca RBX: 0000000000008540 RCX: ffff888035a10000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 1ffff1100e411802 R08: ffffffff844b68d9 R09: 0000000000000002
R10: 0000000000000003 R11: 0000000000000000 R12: 1ffff1100e41185e
R13: ffff88807208c010 R14: 0000000000000088 R15: ffff88807208c2f0
FS:  00005555906f3380(0000) GS:ffff888125c51000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffc288fc000 CR3: 0000000072d04000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 bch2_trans_update_ip+0x9a6/0x1db0 fs/bcachefs/btree_update.c:531
 bch2_trans_update fs/bcachefs/btree_update.h:123 [inline]
 bch2_journal_replay_key+0x4b0/0xb40 fs/bcachefs/recovery.c:311
 bch2_journal_replay+0x171d/0x2630 fs/bcachefs/recovery.c:396
 bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline]
 __bch2_run_recovery_passes+0x395/0x1010 fs/bcachefs/recovery_passes.c:539
 bch2_run_recovery_passes+0x184/0x210 fs/bcachefs/recovery_passes.c:610
 bch2_fs_recovery+0x2690/0x3a50 fs/bcachefs/recovery.c:1005
 bch2_fs_start+0xaaf/0xda0 fs/bcachefs/super.c:1213
 bch2_fs_get_tree+0xb39/0x1520 fs/bcachefs/fs.c:2488
 vfs_get_tree+0x8f/0x2b0 fs/super.c:1804
 do_new_mount+0x24a/0xa40 fs/namespace.c:3902
 do_mount fs/namespace.c:4239 [inline]
 __do_sys_mount fs/namespace.c:4450 [inline]
 __se_sys_mount+0x317/0x410 fs/namespace.c:4427
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fc7e44eae2a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc288fb1d8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffc288fb1f0 RCX: 00007fc7e44eae2a
RDX: 0000200000000040 RSI: 0000200000005900 RDI: 00007ffc288fb1f0
RBP: 0000200000005900 R08: 00007ffc288fb230 R09: 0000000000005928
R10: 0000000002808040 R11: 0000000000000282 R12: 0000200000000040
R13: 00007ffc288fb230 R14: 0000000000000003 R15: 0000000002808040
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bch2_trans_update_by_path+0x1efb/0x1f30 fs/bcachefs/btree_update.c:375
Code: 80 e1 07 fe c1 38 c1 0f 8c 40 f7 ff ff 48 8b 7c 24 28 e8 a8 1b fa fd e9 31 f7 ff ff e8 1e c3 98 fd 90 0f 0b e8 16 c3 98 fd 90 <0f> 0b e8 0e c3 98 fd 90 0f 0b e8 06 c3 98 fd 90 0f 0b e8 fe c2 98
RSP: 0018:ffffc90003ffea08 EFLAGS: 00010293
RAX: ffffffff842761ca RBX: 0000000000008540 RCX: ffff888035a10000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 1ffff1100e411802 R08: ffffffff844b68d9 R09: 0000000000000002
R10: 0000000000000003 R11: 0000000000000000 R12: 1ffff1100e41185e
R13: ffff88807208c010 R14: 0000000000000088 R15: ffff88807208c2f0
FS:  00005555906f3380(0000) GS:ffff888125c51000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffc288fc000 CR3: 0000000072d04000 CR4: 00000000003526f0

Crashes (853):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/07 03:48 upstream d7b8f8e20813 4f67c4ae .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in bch2_trans_update_by_path
2025/07/06 22:47 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 7482bb149b9f 4f67c4ae .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 kernel BUG in bch2_trans_update_by_path
2025/06/27 21:55 upstream 67a993863163 803ce19b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in bch2_trans_update_by_path
2025/07/12 20:23 upstream 379f604cc3dc 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/12 18:59 upstream 379f604cc3dc 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/12 17:57 upstream 379f604cc3dc 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/12 17:15 upstream 379f604cc3dc 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/12 15:34 upstream 379f604cc3dc 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/12 14:28 upstream 379f604cc3dc 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/12 12:25 upstream 379f604cc3dc 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/12 10:03 upstream 379f604cc3dc 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/12 06:58 upstream 40f92e79b0aa 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/12 05:57 upstream 40f92e79b0aa 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/12 04:56 upstream 40f92e79b0aa 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/12 03:50 upstream 40f92e79b0aa 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/12 02:32 upstream 40f92e79b0aa 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/12 01:13 upstream 40f92e79b0aa 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/12 00:13 upstream 40f92e79b0aa 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/11 23:11 upstream 40f92e79b0aa 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/11 21:16 upstream 40f92e79b0aa 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/11 18:02 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/11 16:49 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/11 16:04 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/11 14:39 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/11 11:59 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/11 10:55 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/11 10:38 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/11 09:16 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/11 08:15 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/11 06:55 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/11 05:22 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/11 05:01 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/06/19 10:14 upstream fb4d33ab452e ed3e87f7 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/06/15 11:10 upstream 8c6bc74c7f89 5f4b362d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_trans_update_by_path
2025/07/16 06:15 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ec4801305969 03fcfc4b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in bch2_trans_update_by_path
2025/07/16 02:34 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ec4801305969 03fcfc4b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in bch2_trans_update_by_path
2025/07/15 16:13 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ec4801305969 03fcfc4b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in bch2_trans_update_by_path
2025/07/15 00:02 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ec4801305969 03fcfc4b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in bch2_trans_update_by_path
2025/07/14 12:48 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ec4801305969 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in bch2_trans_update_by_path
2025/07/14 06:24 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ec4801305969 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in bch2_trans_update_by_path
2025/07/14 01:23 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ec4801305969 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in bch2_trans_update_by_path
2025/07/13 21:23 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ec4801305969 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in bch2_trans_update_by_path
2025/07/13 21:20 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ec4801305969 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in bch2_trans_update_by_path
2025/07/13 18:41 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ec4801305969 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in bch2_trans_update_by_path
2025/07/13 04:31 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ec4801305969 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in bch2_trans_update_by_path
2025/07/13 02:08 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ec4801305969 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in bch2_trans_update_by_path
2025/07/12 22:56 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ec4801305969 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in bch2_trans_update_by_path
2025/07/12 11:24 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ec4801305969 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in bch2_trans_update_by_path
2025/07/11 19:52 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ec4801305969 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in bch2_trans_update_by_path
2025/07/11 13:29 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ec4801305969 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in bch2_trans_update_by_path
* Struck through repros no longer work on HEAD.