syzbot


kernel BUG in __build_ro_aux_tree (2)

Status: upstream: reported on 2025/07/24 01:12
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+7e787e7154eb952a259b@syzkaller.appspotmail.com
First crash: 5d21h, last: 5d21h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] kernel BUG in __build_ro_aux_tree (2) 0 (1) 2025/07/24 01:12
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in __build_ro_aux_tree bcachefs -1 4 142d 223d 0/29 auto-obsoleted due to no activity on 2025/06/13 20:14

Sample crash report:
 done
bcachefs (loop0): check_alloc_to_lru_refs...
bcachefs (loop0): missing fragmentation lru entry
  u64s 13 type alloc_v4 0:34:0 len 0 ver 0: 
    gen 0 oldest_gen 0 data_type user
    journal_seq_nonempty 0
    journal_seq_empty    0
    need_discard         0
    need_inc_gen         0
    dirty_sectors        16
    stripe_sectors       0
    cached_sectors       0
    stripe               0
    stripe_redundancy    0
    io_time[READ]        0
    io_time[WRITE]       0
    fragmentation     134217728
    bp_start          8
  , fixing
 done
bcachefs (loop0): check_snapshot_trees... done
bcachefs (loop0): check_snapshots... done
bcachefs (loop0): check_subvols...
bcachefs (loop0): running recovery pass reconstruct_snapshots (21), currently at check_subvols (24) - rewinding
bcachefs (loop0): bch2_check_subvols(): error restart_recovery
bcachefs (loop0): reconstruct_snapshots...
bcachefs (loop0): snapshot node 4294967295 from tree 4294967295 missing, recreating
 done
bcachefs (loop0): check_snapshot_trees... done
bcachefs (loop0): check_snapshots... done
bcachefs (loop0): check_subvols...
bcachefs (loop0): subvolume 1 is not set as snapshot but is not master subvolume, fixing
 done
bcachefs (loop0): check_subvol_children... done
bcachefs (loop0): delete_dead_snapshots... done
bcachefs (loop0): check_inodes... done
bcachefs (loop0): check_extents... done
bcachefs (loop0): check_indirect_extents... done
bcachefs (loop0): check_dirents... done
bcachefs (loop0): check_xattrs... done
bcachefs (loop0): check_root... done
bcachefs (loop0): check_unreachable_inodes... done
bcachefs (loop0): check_subvolume_structure... done
bcachefs (loop0): check_directory_structure... done
bcachefs (loop0): check_nlinks... done
bcachefs (loop0): check_rebalance_work... done
bcachefs (loop0): resume_logged_ops... done
bcachefs (loop0): delete_dead_inodes... done
bcachefs (loop0): set_fs_needs_rebalance... done
------------[ cut here ]------------
kernel BUG at fs/bcachefs/bset.c:652!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5336 Comm: syz.0.0 Not tainted 6.16.0-rc6-syzkaller-00279-gbf61759db409 #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:make_bfloat fs/bcachefs/bset.c:652 [inline]
RIP: 0010:__build_ro_aux_tree+0x17e1/0x1800 fs/bcachefs/bset.c:750
Code: 21 a4 fd be 01 00 00 00 48 c7 c7 20 25 76 8e 48 89 da e8 d2 43 db 00 e9 18 f4 ff ff e8 28 21 a4 fd 90 0f 0b e8 20 21 a4 fd 90 <0f> 0b e8 18 21 a4 fd 90 0f 0b e8 10 21 a4 fd 90 0f 0b 66 66 66 66
RSP: 0018:ffffc9000d356c60 EFLAGS: 00010246
RAX: ffffffff841c10b0 RBX: dffffc0000000000 RCX: 0000000000100000
RDX: ffffc9000e322000 RSI: 00000000000fffff RDI: 0000000000100000
RBP: ffffc9000d356e30 R08: ffff88800019c880 R09: 0000000000000002
R10: 000000000000ffff R11: 0000000000000002 R12: ffff888056620191
R13: 0000000000000130 R14: 0000000000000001 R15: 0000000000000090
FS:  00007f809202d6c0(0000) GS:ffff88808d218000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055bd826af168 CR3: 0000000044198000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 bch2_bset_build_aux_tree+0x3f5/0x570 fs/bcachefs/bset.c:787
 bch2_btree_build_aux_trees fs/bcachefs/btree_io.c:451 [inline]
 bch2_btree_post_write_cleanup+0x630/0xad0 fs/bcachefs/btree_io.c:2628
 bch2_btree_node_write_trans+0x17b/0x760 fs/bcachefs/btree_io.c:2676
 btree_node_write_if_need fs/bcachefs/btree_io.h:167 [inline]
 __btree_node_flush+0x323/0x430 fs/bcachefs/btree_trans_commit.c:255
 bch2_btree_node_flush0+0x27/0x40 fs/bcachefs/btree_trans_commit.c:264
 journal_flush_pins+0x8e3/0xe90 fs/bcachefs/journal_reclaim.c:604
 journal_flush_pins_or_still_flushing fs/bcachefs/journal_reclaim.c:871 [inline]
 journal_flush_done+0x112/0x810 fs/bcachefs/journal_reclaim.c:889
 bch2_journal_flush_pins+0x155/0x250 fs/bcachefs/journal_reclaim.c:921
 bch2_journal_flush_all_pins fs/bcachefs/journal_reclaim.h:76 [inline]
 bch2_fs_recovery+0x2775/0x3a50 fs/bcachefs/recovery.c:1036
 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:0x7f809119014a
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:00007f809202ce68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f809202cef0 RCX: 00007f809119014a
RDX: 000020000000f640 RSI: 000020000000f680 RDI: 00007f809202ceb0
RBP: 000020000000f640 R08: 00007f809202cef0 R09: 0000000000000180
R10: 0000000000000180 R11: 0000000000000246 R12: 000020000000f680
R13: 00007f809202ceb0 R14: 000000000000f63a R15: 0000200000000580
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:make_bfloat fs/bcachefs/bset.c:652 [inline]
RIP: 0010:__build_ro_aux_tree+0x17e1/0x1800 fs/bcachefs/bset.c:750
Code: 21 a4 fd be 01 00 00 00 48 c7 c7 20 25 76 8e 48 89 da e8 d2 43 db 00 e9 18 f4 ff ff e8 28 21 a4 fd 90 0f 0b e8 20 21 a4 fd 90 <0f> 0b e8 18 21 a4 fd 90 0f 0b e8 10 21 a4 fd 90 0f 0b 66 66 66 66
RSP: 0018:ffffc9000d356c60 EFLAGS: 00010246
RAX: ffffffff841c10b0 RBX: dffffc0000000000 RCX: 0000000000100000
RDX: ffffc9000e322000 RSI: 00000000000fffff RDI: 0000000000100000
RBP: ffffc9000d356e30 R08: ffff88800019c880 R09: 0000000000000002
R10: 000000000000ffff R11: 0000000000000002 R12: ffff888056620191
R13: 0000000000000130 R14: 0000000000000001 R15: 0000000000000090
FS:  00007f809202d6c0(0000) GS:ffff88808d218000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055bd826af168 CR3: 0000000044198000 CR4: 0000000000352ef0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/20 01:03 upstream bf61759db409 7117feec .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __build_ro_aux_tree
* Struck through repros no longer work on HEAD.