syzbot


kernel BUG in bch2_btree_iter_verify_entry_exit (2)

Status: upstream: reported C repro on 2024/09/22 22:36
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+dc1f3e7147b8fc81e0ac@syzkaller.appspotmail.com
First crash: 20d, last: 20d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] kernel BUG in bch2_btree_iter_verify_entry_exit (2) 0 (1) 2024/09/22 22:36
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in bch2_btree_iter_verify_entry_exit bcachefs C done 3 140d 145d 25/28 fixed on 2024/06/11 03:41
Last patch testing requests (3)
Created Duration User Patch Repo Result
2024/10/03 00:10 16m retest repro upstream report log
2024/10/03 00:10 16m retest repro upstream report log
2024/10/03 00:10 16m retest repro upstream report log

Sample crash report:
  u64s 7 type reflink_p POS_MIN len 0 ver 0: idx 18446744069414584320 front_pad 4096 back_pad 0
  missing range 18446744069414580224-18446744069414584320, fixing
------------[ cut here ]------------
kernel BUG at fs/bcachefs/btree_iter.c:268!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5096 Comm: syz-executor359 Not tainted 6.11.0-syzkaller-05319-g4a39ac5b7d62 #0
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_btree_iter_verify_entry_exit+0x51b/0x550 fs/bcachefs/btree_iter.c:267
Code: c1 fd ff ff 44 89 e1 80 e1 07 38 c1 0f 8c c6 fd ff ff be 08 00 00 00 4c 89 e7 e8 30 01 e7 fd e9 b4 fd ff ff e8 b6 7c 7f fd 90 <0f> 0b e8 ae 7c 7f fd 90 0f 0b e8 a6 7c 7f fd 90 0f 0b e8 9e 7c 7f
RSP: 0018:ffffc90002e5d958 EFLAGS: 00010293
RAX: ffffffff8414624a RBX: 0000000000000992 RCX: ffff88801edbc880
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff84145db0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffc90002e5dfd0
R13: 0000000000000000 R14: ffffc90002e5dfe0 R15: dffffc0000000000
FS:  000055559175c380(0000) GS:ffff88801fe00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005572bbd324a8 CR3: 0000000000b40000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bch2_btree_iter_peek_upto+0x600/0x6f90 fs/bcachefs/btree_iter.c:2281
 bch2_trans_update_extent fs/bcachefs/btree_update.c:299 [inline]
 bch2_trans_update+0x5f9/0x2550 fs/bcachefs/btree_update.c:514
 bch2_btree_insert_trans+0x26f/0x550 fs/bcachefs/btree_update.c:646
 gc_trigger_reflink_p_segment fs/bcachefs/reflink.c:195 [inline]
 __trigger_reflink_p+0x2a08/0x2ec0 fs/bcachefs/reflink.c:234
 bch2_trigger_reflink_p+0x297/0x380 fs/bcachefs/reflink.c:253
 bch2_key_trigger fs/bcachefs/bkey_methods.h:87 [inline]
 bch2_gc_mark_key+0x6b5/0x10e0 fs/bcachefs/btree_gc.c:633
 bch2_gc_btree fs/bcachefs/btree_gc.c:669 [inline]
 bch2_gc_btrees fs/bcachefs/btree_gc.c:728 [inline]
 bch2_check_allocations+0x1d1b/0x7870 fs/bcachefs/btree_gc.c:1135
 bch2_run_recovery_pass+0xf0/0x1e0 fs/bcachefs/recovery_passes.c:183
 bch2_run_recovery_passes+0x19e/0x820 fs/bcachefs/recovery_passes.c:230
 bch2_fs_recovery+0x24f9/0x38b0 fs/bcachefs/recovery.c:859
 bch2_fs_start+0x356/0x5b0 fs/bcachefs/super.c:1036
 bch2_fs_get_tree+0xd61/0x1700 fs/bcachefs/fs.c:1956
 vfs_get_tree+0x90/0x2b0 fs/super.c:1800
 do_new_mount+0x2be/0xb40 fs/namespace.c:3507
 do_mount fs/namespace.c:3847 [inline]
 __do_sys_mount fs/namespace.c:4055 [inline]
 __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4032
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fea8a61c1ea
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:00007ffd032097c8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffd032097e0 RCX: 00007fea8a61c1ea
RDX: 0000000020005d80 RSI: 0000000020000000 RDI: 00007ffd032097e0
RBP: 0000000000000004 R08: 00007ffd03209820 R09: 0000000000005d93
R10: 0000000000000008 R11: 0000000000000282 R12: 0000000000000008
R13: 00007ffd03209820 R14: 0000000000000003 R15: 0000000001000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bch2_btree_iter_verify_entry_exit+0x51b/0x550 fs/bcachefs/btree_iter.c:267
Code: c1 fd ff ff 44 89 e1 80 e1 07 38 c1 0f 8c c6 fd ff ff be 08 00 00 00 4c 89 e7 e8 30 01 e7 fd e9 b4 fd ff ff e8 b6 7c 7f fd 90 <0f> 0b e8 ae 7c 7f fd 90 0f 0b e8 a6 7c 7f fd 90 0f 0b e8 9e 7c 7f
RSP: 0018:ffffc90002e5d958 EFLAGS: 00010293
RAX: ffffffff8414624a RBX: 0000000000000992 RCX: ffff88801edbc880
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff84145db0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffc90002e5dfd0
R13: 0000000000000000 R14: ffffc90002e5dfe0 R15: dffffc0000000000
FS:  000055559175c380(0000) GS:ffff88801fe00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055c54a0790f8 CR3: 0000000000b40000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/19 00:02 upstream 4a39ac5b7d62 c673ca06 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root kernel BUG in bch2_btree_iter_verify_entry_exit
2024/09/18 23:29 upstream 4a39ac5b7d62 c673ca06 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root kernel BUG in bch2_btree_iter_verify_entry_exit
2024/09/18 22:59 upstream 4a39ac5b7d62 c673ca06 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root kernel BUG in bch2_btree_iter_verify_entry_exit
2024/09/18 22:33 upstream 4a39ac5b7d62 c673ca06 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_iter_verify_entry_exit
* Struck through repros no longer work on HEAD.