syzbot


WARNING in bch2_alloc_sectors_start_trans

Status: upstream: reported C repro on 2025/06/01 04:54
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+23573dac1278bb26916d@syzkaller.appspotmail.com
First crash: 5d20h, last: 3d23h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] WARNING in bch2_alloc_sectors_start_trans 0 (1) 2025/06/01 04:54

Sample crash report:
bcachefs (loop0): snapshot points to missing/incorrect tree:
  u64s 8 type snapshot 0:4294967295:0 len 0 ver 0: subvol parent          0 children          0          0 subvol 1 tree 0, fixing
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5305 at fs/bcachefs/btree_iter.c:3132 __bch2_trans_kmalloc+0x5fb/0xc80 fs/bcachefs/btree_iter.c:3132
Modules linked in:
CPU: 0 UID: 0 PID: 5305 Comm: syz-executor289 Not tainted 6.15.0-syzkaller-03478-gc89756bcf406 #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:__bch2_trans_kmalloc+0x5fb/0xc80 fs/bcachefs/btree_iter.c:3132
Code: 00 e8 d9 e2 33 00 48 c7 c3 74 f7 ff ff 48 89 d8 48 83 c4 58 5b 41 5c 41 5d 41 5e 41 5f 5d e9 8c 9e 3e 07 cc e8 b6 ad 9d fd 90 <0f> 0b 90 e9 f0 fa ff ff 48 89 df e8 75 cc 02 00 43 80 7c 35 00 00
RSP: 0018:ffffc9000d24e2b0 EFLAGS: 00010293
RAX: ffffffff8422449a RBX: ffff88804ac38000 RCX: ffff8880002c2440
RDX: 0000000000000000 RSI: 0000000000020000 RDI: 0000000000010000
RBP: ffffc9000d24e568 R08: ffffc9000d24e7b0 R09: 0000000000000001
R10: ffffc9000d24e6c0 R11: fffff52001a49ca5 R12: 0000000000000011
R13: 1ffff11009587000 R14: dffffc0000000000 R15: 0000000000020000
FS:  0000555591a7f380(0000) GS:ffff88808d28f000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8c1260c000 CR3: 00000000350fa000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bch2_trans_kmalloc_nomemzero_ip fs/bcachefs/btree_iter.h:586 [inline]
 bch2_trans_kmalloc_nomemzero fs/bcachefs/btree_iter.h:621 [inline]
 bch2_alloc_sectors_start_trans+0x254b/0x26a0 fs/bcachefs/alloc_foreground.c:1253
 __bch2_btree_node_alloc fs/bcachefs/btree_update_interior.c:321 [inline]
 bch2_btree_reserve_get+0x641/0x1810 fs/bcachefs/btree_update_interior.c:535
 bch2_btree_update_start+0x10ff/0x1480 fs/bcachefs/btree_update_interior.c:1255
 bch2_btree_split_leaf+0x14b/0x8e0 fs/bcachefs/btree_update_interior.c:1886
 bch2_trans_commit_error+0x1a8/0x1100 fs/bcachefs/btree_trans_commit.c:910
 __bch2_trans_commit+0x1cee/0x8820 fs/bcachefs/btree_trans_commit.c:1084
 bch2_trans_commit fs/bcachefs/btree_update.h:232 [inline]
 bch2_check_snapshots+0x5b3/0x1f20 fs/bcachefs/snapshot.c:863
 bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:415 [inline]
 __bch2_run_recovery_passes+0x382/0x10b0 fs/bcachefs/recovery_passes.c:470
 bch2_run_recovery_passes+0x184/0x210 fs/bcachefs/recovery_passes.c:541
 bch2_fs_recovery+0x2617/0x3970 fs/bcachefs/recovery.c:974
 bch2_fs_start+0xa43/0xd30 fs/bcachefs/super.c:1206
 bch2_fs_get_tree+0xbfc/0x15f0 fs/bcachefs/fs.c:2479
 vfs_get_tree+0x92/0x2b0 fs/super.c:1809
 do_new_mount+0x24a/0xa40 fs/namespace.c:3882
 do_mount fs/namespace.c:4222 [inline]
 __do_sys_mount fs/namespace.c:4433 [inline]
 __se_sys_mount+0x317/0x410 fs/namespace.c:4410
 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:0x7f8e37c74f6a
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:00007ffebaab1338 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffebaab1350 RCX: 00007f8e37c74f6a
RDX: 00002000000000c0 RSI: 0000200000000080 RDI: 00007ffebaab1350
RBP: 0000200000000080 R08: 00007ffebaab1390 R09: 0000000000005963
R10: 0000000000818001 R11: 0000000000000282 R12: 00002000000000c0
R13: 0000000000000004 R14: 0000000000000003 R15: 00007ffebaab1390
 </TASK>

Crashes (15):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/28 05:07 upstream c89756bcf406 874a1386 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root WARNING in bch2_alloc_sectors_start_trans
2025/05/30 01:45 upstream e0797d3b91de 3d2f584d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in bch2_alloc_sectors_start_trans
2025/05/30 01:38 upstream e0797d3b91de 3d2f584d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in bch2_alloc_sectors_start_trans
2025/05/29 21:57 upstream e0797d3b91de 3d2f584d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in bch2_alloc_sectors_start_trans
2025/05/29 21:54 upstream e0797d3b91de 3d2f584d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in bch2_alloc_sectors_start_trans
2025/05/29 13:27 upstream 90b83efa6701 3d2f584d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in bch2_alloc_sectors_start_trans
2025/05/29 12:08 upstream 90b83efa6701 3d2f584d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in bch2_alloc_sectors_start_trans
2025/05/28 17:44 upstream feacb1774bd5 3d2f584d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in bch2_alloc_sectors_start_trans
2025/05/28 08:37 upstream c89756bcf406 874a1386 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in bch2_alloc_sectors_start_trans
2025/05/28 04:52 upstream c89756bcf406 874a1386 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in bch2_alloc_sectors_start_trans
2025/05/28 04:50 upstream c89756bcf406 874a1386 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in bch2_alloc_sectors_start_trans
2025/05/28 04:49 upstream c89756bcf406 874a1386 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in bch2_alloc_sectors_start_trans
2025/05/28 04:49 upstream c89756bcf406 874a1386 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in bch2_alloc_sectors_start_trans
2025/05/28 04:48 upstream c89756bcf406 874a1386 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in bch2_alloc_sectors_start_trans
2025/05/28 04:47 upstream c89756bcf406 874a1386 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in bch2_alloc_sectors_start_trans
* Struck through repros no longer work on HEAD.