syzbot


kernel BUG in __bch2_trans_commit (3)

Status: upstream: reported on 2025/07/12 08:32
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+b6ef9edaba01d5b4e43f@syzkaller.appspotmail.com
First crash: 10d, last: 7h03m
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] kernel BUG in __bch2_trans_commit (3) 0 (1) 2025/07/12 08:32
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in __bch2_trans_commit (2) bcachefs -1 105 11d 55d 29/29 fixed on 2025/07/08 00:33
upstream kernel BUG in __bch2_trans_commit bcachefs -1 C unreliable 11858 245d 270d 28/29 fixed on 2025/05/11 00:44

Sample crash report:
bcachefs (loop0): btree ptr not marked in member info btree allocated bitmap
  u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq c0bef60d07ceb940 written 16 min_key POS_MIN durability: 1 ptr: 0:35:0 gen 0, fixing
bcachefs (loop0): bucket 0:35 data type btree ptr gen 0 missing in alloc btree
  while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq c0bef60d07ceb940 written 16 min_key POS_MIN durability: 1 ptr: 0:35:0 gen 0, fixing
bcachefs (loop0): btree ptr not marked in member info btree allocated bitmap
  u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq ebb8d5a9e3463bdb written 16 min_key POS_MIN durability: 1 ptr: 0:32:0 gen 0, fixing
bcachefs (loop0): btree ptr not marked in member info btree allocated bitmap
  u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq e81e1ed936acf3df written 32 min_key POS_MIN durability: 1 ptr: 0:29:0 gen 0, fixing
bcachefs (loop0): bucket 0:29 data type btree ptr gen 0 missing in alloc btree
  while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq e81e1ed936acf3df written 32 min_key POS_MIN durability: 1 ptr: 0:29:0 gen 0, fixing
bcachefs (loop0): bucket 0:1 gen 0 has wrong data_type: got free, should be sb, fixing
bcachefs (loop0): bucket 0:1 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:2 gen 0 has wrong data_type: got free, should be sb, fixing
bcachefs (loop0): bucket 0:2 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:3 gen 0 has wrong data_type: got free, should be sb, fixing
bcachefs (loop0): bucket 0:3 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:4 gen 0 has wrong data_type: got free, should be sb, fixing
bcachefs (loop0): bucket 0:4 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:5 gen 0 has wrong data_type: got free, should be sb, fixing
bcachefs (loop0): bucket 0:5 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:6 gen 0 has wrong data_type: got free, should be sb, fixing
bcachefs (loop0): bucket 0:6 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:7 gen 0 has wrong data_type: got free, should be sb, fixing
bcachefs (loop0): bucket 0:7 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:8 gen 0 has wrong data_type: got free, should be sb, fixing
bcachefs (loop0): bucket 0:8 gen 0 data type sb has wrong dirty_sectors: got 0, should be 8, fixing
bcachefs (loop0): bucket 0:9 gen 0 has wrong data_type: got free, should be journal, fixing
bcachefs (loop0): bucket 0:9 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:10 gen 0 has wrong data_type: got free, should be journal, fixing
bcachefs (loop0): bucket 0:10 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:11 gen 0 has wrong data_type: got free, should be journal, fixing
  Ratelimiting new instances of previous error
bcachefs (loop0): bucket 0:11 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing
  Ratelimiting new instances of previous error
 done
bcachefs (loop0): going read-write
bcachefs (loop0): journal_replay... done
bcachefs (loop0): check_extents_to_backpointers...
bcachefs (loop0): scanning for missing backpointers in 4/128 buckets
 done
bcachefs (loop0): check_inodes... done
bcachefs (loop0): resume_logged_ops... done
bcachefs (loop0): delete_dead_inodes... done
bcachefs (loop0): Fixed errors, running fsck a second time to verify fs is clean
bcachefs (loop0): check_extents_to_backpointers... done
bcachefs (loop0): check_inodes... done
bcachefs (loop0): resume_logged_ops... done
bcachefs (loop0): delete_dead_inodes... done
bcachefs (loop0): done starting filesystem
------------[ cut here ]------------
kernel BUG at fs/bcachefs/btree_trans_commit.c:348!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5341 Comm: syz.0.0 Not tainted 6.16.0-rc6-syzkaller-00121-g6832a9317eee #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:btree_insert_entry_checks fs/bcachefs/btree_trans_commit.c:343 [inline]
RIP: 0010:bch2_trans_commit_write_locked fs/bcachefs/btree_trans_commit.c:725 [inline]
RIP: 0010:do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:854 [inline]
RIP: 0010:__bch2_trans_commit+0x86e5/0x8870 fs/bcachefs/btree_trans_commit.c:1085
Code: 97 fd eb 0c e8 3c 6e 97 fd eb 05 e8 35 6e 97 fd 49 bd 00 00 00 00 00 fc ff df 4c 8b 64 24 48 e9 e1 af ff ff e8 1c 6e 97 fd 90 <0f> 0b e8 14 6e 97 fd 90 0f 0b e8 0c 6e 97 fd 90 0f 0b e8 04 6e 97
RSP: 0018:ffffc9000d2272e0 EFLAGS: 00010287
RAX: ffffffff8428c504 RBX: ffffffff842886d5 RCX: 0000000000100000
RDX: ffffc9000dcc2000 RSI: 0000000000001458 RDI: 0000000000001459
RBP: ffffc9000d2275d0 R08: 0000000000000000 R09: ffffffff842886d5
R10: dffffc0000000000 R11: ffffed100a669309 R12: ffff888055fe4020
R13: dffffc0000000000 R14: ffff888055fe64d8 R15: 0000000000000001
FS:  00007fd4d69e96c0(0000) GS:ffff88808d21a000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200001000000 CR3: 0000000044893000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 bch2_trans_commit fs/bcachefs/btree_update.h:241 [inline]
 bch2_setattr_nonsize+0xcf5/0x10e0 fs/bcachefs/fs.c:1148
 bchfs_truncate+0x9e0/0xc20 fs/bcachefs/fs-io.c:-1
 notify_change+0xb33/0xe40 fs/attr.c:552
 do_truncate+0x1a4/0x220 fs/open.c:68
 vfs_truncate+0x493/0x520 fs/open.c:118
 do_sys_truncate+0xdb/0x190 fs/open.c:141
 __do_sys_truncate fs/open.c:153 [inline]
 __se_sys_truncate fs/open.c:151 [inline]
 __x64_sys_truncate+0x5b/0x70 fs/open.c:151
 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:0x7fd4d5b8e9a9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007fd4d69e9038 EFLAGS: 00000246 ORIG_RAX: 000000000000004c
RAX: ffffffffffffffda RBX: 00007fd4d5db5fa0 RCX: 00007fd4d5b8e9a9
RDX: 0000000000000000 RSI: 000000400000f000 RDI: 0000200000000080
RBP: 00007fd4d5c10d69 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fd4d5db5fa0 R15: 00007ffdfe661478
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:btree_insert_entry_checks fs/bcachefs/btree_trans_commit.c:343 [inline]
RIP: 0010:bch2_trans_commit_write_locked fs/bcachefs/btree_trans_commit.c:725 [inline]
RIP: 0010:do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:854 [inline]
RIP: 0010:__bch2_trans_commit+0x86e5/0x8870 fs/bcachefs/btree_trans_commit.c:1085
Code: 97 fd eb 0c e8 3c 6e 97 fd eb 05 e8 35 6e 97 fd 49 bd 00 00 00 00 00 fc ff df 4c 8b 64 24 48 e9 e1 af ff ff e8 1c 6e 97 fd 90 <0f> 0b e8 14 6e 97 fd 90 0f 0b e8 0c 6e 97 fd 90 0f 0b e8 04 6e 97
RSP: 0018:ffffc9000d2272e0 EFLAGS: 00010287
RAX: ffffffff8428c504 RBX: ffffffff842886d5 RCX: 0000000000100000
RDX: ffffc9000dcc2000 RSI: 0000000000001458 RDI: 0000000000001459
RBP: ffffc9000d2275d0 R08: 0000000000000000 R09: ffffffff842886d5
R10: dffffc0000000000 R11: ffffed100a669309 R12: ffff888055fe4020
R13: dffffc0000000000 R14: ffff888055fe64d8 R15: 0000000000000001
FS:  00007fd4d69e96c0(0000) GS:ffff88808d21a000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007efddb5a1796 CR3: 0000000044893000 CR4: 0000000000352ef0

Crashes (23):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/18 16:21 upstream 6832a9317eee 7117feec .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/18 10:40 upstream 6832a9317eee 88248e14 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/18 09:30 upstream 6832a9317eee 88248e14 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/17 16:06 upstream e2291551827f 0ea0ca3f .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/16 15:35 upstream 155a3c003e55 124ec9cc .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/16 10:35 upstream 155a3c003e55 124ec9cc .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/15 16:40 upstream 155a3c003e55 03fcfc4b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/15 02:55 upstream 347e9f5043c8 03fcfc4b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/15 00:15 upstream 347e9f5043c8 03fcfc4b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/14 05:45 upstream 5d5d62298b8b 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/12 13:54 upstream 379f604cc3dc 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/12 03:38 upstream 40f92e79b0aa 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/12 00:14 upstream 40f92e79b0aa 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/11 21:32 upstream 40f92e79b0aa 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/11 17:28 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/11 09:33 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/11 00:19 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/10 20:43 upstream bc9ff192a6c9 d7384b6d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/10 15:44 upstream 8c2e52ebbe88 d7384b6d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/10 04:31 upstream 8c2e52ebbe88 956bd956 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/10 03:13 upstream 8c2e52ebbe88 956bd956 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/09 04:16 upstream 733923397fd9 f4e5e155 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
2025/07/08 08:20 upstream d7b8f8e20813 4f67c4ae .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __bch2_trans_commit
* Struck through repros no longer work on HEAD.