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: 152d, last: 7h24m
Cause bisection: introduced by (bisect log) :
commit 03ef80b469d5d83530ce1ce15be78a40e5300f9b
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date: Sat Sep 23 22:41:51 2023 +0000

  bcachefs: Ignore unknown mount options

Crash: BUG: workqueue lockup (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] kernel BUG in bch2_btree_iter_verify_entry_exit (2) 0 (2) 2025/01/22 04:40
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 272d 278d 25/28 fixed on 2024/06/11 03:41
Last patch testing requests (7)
Created Duration User Patch Repo Result
2025/02/05 02:39 13m retest repro upstream report log
2024/12/26 01:21 13m retest repro upstream report log
2024/12/12 00:49 13m retest repro upstream report log
2024/12/12 00:35 13m 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
2024/10/03 00:10 16m retest repro upstream report log

Sample crash report:
bcachefs (loop0): alloc_read... done
bcachefs (loop0): stripes_read... done
bcachefs (loop0): snapshots_read... done
bcachefs (loop0): check_allocations...
pointer to missing indirect extent
  u64s 11 type reflink_p 0:6:0 len 0 ver 0: idx 6597069766657 front_pad 0 back_pad 65536
  missing range 6597069766657-6597069832193, fixing
------------[ cut here ]------------
kernel BUG at fs/bcachefs/btree_iter.c:268!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 UID: 0 PID: 5826 Comm: syz-executor293 Not tainted 6.13.0-syzkaller-01005-gb9d8a295ed6b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
RIP: 0010:bch2_btree_iter_verify_entry_exit+0xb20/0xb60 fs/bcachefs/btree_iter.c:267
Code: 51 fa ff ff 44 89 f1 80 e1 07 38 c1 0f 8c 56 fa ff ff be 08 00 00 00 4c 89 f7 e8 3b c9 e5 fd e9 44 fa ff ff e8 71 e9 81 fd 90 <0f> 0b e8 69 e9 81 fd 90 0f 0b e8 61 e9 81 fd 90 0f 0b e8 59 e9 81
RSP: 0018:ffffc90003975858 EFLAGS: 00010293
RAX: ffffffff841d913f RBX: 0000000000000000 RCX: ffff888034918000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff841d86a8 R09: 0000000000000000
R10: 0000000000000006 R11: 0000000000000000 R12: 0000000000000992
R13: 0000000000000000 R14: ffffc90003975ef0 R15: ffffc90003975f00
FS:  000055556dac9380(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055ce6a0e6028 CR3: 000000004b7ac000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bch2_btree_iter_peek_max+0x3ea/0x6320 fs/bcachefs/btree_iter.c:2358
 bch2_trans_update_extent fs/bcachefs/btree_update.c:299 [inline]
 bch2_trans_update+0x5f9/0x2550 fs/bcachefs/btree_update.c:518
 bch2_btree_insert_trans+0x26f/0x550 fs/bcachefs/btree_update.c:647
 bch2_indirect_extent_missing_error+0x794/0xc40 fs/bcachefs/reflink.c:226
 gc_trigger_reflink_p_segment fs/bcachefs/reflink.c:383 [inline]
 __trigger_reflink_p+0x1907/0x1c50 fs/bcachefs/reflink.c:423
 bch2_trigger_reflink_p+0x297/0x380 fs/bcachefs/reflink.c:442
 bch2_key_trigger fs/bcachefs/bkey_methods.h:88 [inline]
 bch2_gc_mark_key+0x6b5/0x1170 fs/bcachefs/btree_gc.c:639
 bch2_gc_btree fs/bcachefs/btree_gc.c:675 [inline]
 bch2_gc_btrees fs/bcachefs/btree_gc.c:735 [inline]
 bch2_check_allocations+0x148d/0x6aa0 fs/bcachefs/btree_gc.c:1038
 bch2_run_recovery_pass+0xf0/0x1e0 fs/bcachefs/recovery_passes.c:226
 bch2_run_recovery_passes+0x2ad/0xa90 fs/bcachefs/recovery_passes.c:291
 bch2_fs_recovery+0x265a/0x3de0 fs/bcachefs/recovery.c:937
 bch2_fs_start+0x37c/0x610 fs/bcachefs/super.c:1030
 bch2_fs_get_tree+0xd8d/0x1740 fs/bcachefs/fs.c:2203
 vfs_get_tree+0x90/0x2b0 fs/super.c:1814
 do_new_mount+0x2be/0xb40 fs/namespace.c:3560
 do_mount fs/namespace.c:3900 [inline]
 __do_sys_mount fs/namespace.c:4111 [inline]
 __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4088
 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:0x7f93db70fdea
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:00007ffedc1ab168 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffedc1ab180 RCX: 00007f93db70fdea
RDX: 0000000020000200 RSI: 0000000020000080 RDI: 00007ffedc1ab180
RBP: 0000000000000004 R08: 00007ffedc1ab1c0 R09: 00000000000059e4
R10: 0000000000000818 R11: 0000000000000282 R12: 0000000000000818
R13: 00007ffedc1ab1c0 R14: 0000000000000003 R15: 0000000001000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bch2_btree_iter_verify_entry_exit+0xb20/0xb60 fs/bcachefs/btree_iter.c:267
Code: 51 fa ff ff 44 89 f1 80 e1 07 38 c1 0f 8c 56 fa ff ff be 08 00 00 00 4c 89 f7 e8 3b c9 e5 fd e9 44 fa ff ff e8 71 e9 81 fd 90 <0f> 0b e8 69 e9 81 fd 90 0f 0b e8 61 e9 81 fd 90 0f 0b e8 59 e9 81
RSP: 0018:ffffc90003975858 EFLAGS: 00010293
RAX: ffffffff841d913f RBX: 0000000000000000 RCX: ffff888034918000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff841d86a8 R09: 0000000000000000
R10: 0000000000000006 R11: 0000000000000000 R12: 0000000000000992
R13: 0000000000000000 R14: ffffc90003975ef0 R15: ffffc90003975f00
FS:  000055556dac9380(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000561b0a2e9aa0 CR3: 000000004b7ac000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/21 22:11 upstream b9d8a295ed6b da72ac06 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in bch2_btree_iter_verify_entry_exit
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
2025/02/18 13:38 upstream 2408a807bfc3 c37c7249 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_iter_verify_entry_exit
2025/02/18 00:49 upstream 2408a807bfc3 429ea007 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_iter_verify_entry_exit
2025/02/17 14:22 upstream 0ad2507d5d93 4121cf9d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_iter_verify_entry_exit
2025/02/17 07:31 upstream ba643b6d8440 40a34ec9 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_iter_verify_entry_exit
2025/02/16 10:25 upstream ad1b832bf1cf 40a34ec9 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_iter_verify_entry_exit
2025/01/16 11:31 upstream 619f0b6fad52 968edaf4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_iter_verify_entry_exit
2025/01/13 18:39 upstream 5bc55a333a2f 249ceea9 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] 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.