syzbot


kernel BUG in bch2_btree_pos_to_text

Status: fixed on 2024/11/12 23:31
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+cf7b2215b5d70600ec00@syzkaller.appspotmail.com
Fix commit: 0151d10a480d bcachefs: add check for btree id against max in try read node
First crash: 59d, last: 6d16h
Discussions (2)
Title Replies (including bot) Last reply
[PATCH v1] bcachefs: add check for btree id against max in try read node 4 (4) 2024/10/07 19:15
[syzbot] [bcachefs?] kernel BUG in bch2_btree_pos_to_text 0 (4) 2024/09/29 13:40
Last patch testing requests (6)
Created Duration User Patch Repo Result
2024/10/06 14:15 16m retest repro upstream report log
2024/10/06 14:15 16m retest repro upstream report log
2024/10/06 14:15 15m retest repro upstream report log
2024/09/29 13:40 19m pz010001011111@proton.me patch upstream OK log
2024/09/29 12:32 19m pz010001011111@proton.me patch upstream report log
2024/09/27 21:36 20m pz010001011111@proton.me patch upstream OK log

Sample crash report:
------------[ cut here ]------------
kernel BUG at fs/bcachefs/btree_cache.h:126!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5111 Comm: read_btree_node Not tainted 6.11.0-syzkaller-03917-ga940d9a43e62 #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_id_root fs/bcachefs/btree_cache.h:126 [inline]
RIP: 0010:bch2_btree_pos_to_text+0x1ee/0x1f0 fs/bcachefs/btree_cache.c:1295
Code: 00 00 fc ff df e9 70 ff ff ff 89 d9 80 e1 07 38 c1 0f 8c 7a ff ff ff 48 89 df e8 2d 90 ec fd e9 6d ff ff ff e8 b3 4b 85 fd 90 <0f> 0b 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa
RSP: 0018:ffffc9000315f448 EFLAGS: 00010293
RAX: ffffffff840ede8d RBX: 00000000000000de RCX: ffff88801e138000
RDX: 0000000000000000 RSI: 00000000000000de RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff840edd7a R09: 0000000000000000
R10: ffffc9000315f5e0 R11: fffff5200062bec1 R12: ffff8880410b0000
R13: ffff888041280000 R14: ffff888041280000 R15: ffffc9000315f5e0
FS:  0000000000000000(0000) GS:ffff88801fe00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000559507bd4640 CR3: 000000003f78a000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 btree_node_read_work+0x486/0x1260 fs/bcachefs/btree_io.c:1308
 bch2_btree_node_read+0x2433/0x2a10
 bch2_btree_node_fill+0xcd1/0x1320 fs/bcachefs/btree_cache.c:886
 bch2_btree_node_get_noiter+0x9b3/0xf50 fs/bcachefs/btree_cache.c:1155
 found_btree_node_is_readable fs/bcachefs/btree_node_scan.c:85 [inline]
 try_read_btree_node fs/bcachefs/btree_node_scan.c:190 [inline]
 read_btree_nodes_worker+0x122c/0x20b0 fs/bcachefs/btree_node_scan.c:239
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bch2_btree_id_root fs/bcachefs/btree_cache.h:126 [inline]
RIP: 0010:bch2_btree_pos_to_text+0x1ee/0x1f0 fs/bcachefs/btree_cache.c:1295
Code: 00 00 fc ff df e9 70 ff ff ff 89 d9 80 e1 07 38 c1 0f 8c 7a ff ff ff 48 89 df e8 2d 90 ec fd e9 6d ff ff ff e8 b3 4b 85 fd 90 <0f> 0b 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa
RSP: 0018:ffffc9000315f448 EFLAGS: 00010293
RAX: ffffffff840ede8d RBX: 00000000000000de RCX: ffff88801e138000
RDX: 0000000000000000 RSI: 00000000000000de RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff840edd7a R09: 0000000000000000
R10: ffffc9000315f5e0 R11: fffff5200062bec1 R12: ffff8880410b0000
R13: ffff888041280000 R14: ffff888041280000 R15: ffffc9000315f5e0
FS:  0000000000000000(0000) GS:ffff88801fe00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000559507bd4640 CR3: 0000000011a04000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/18 00:22 upstream a940d9a43e62 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_pos_to_text
2024/09/17 23:34 upstream a940d9a43e62 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_pos_to_text
2024/09/17 22:48 upstream a940d9a43e62 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_pos_to_text
2024/11/09 13:32 upstream da4373fbcf00 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_btree_pos_to_text
2024/11/09 20:02 upstream da4373fbcf00 6b856513 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_pos_to_text
2024/11/06 08:05 upstream 2e1b3cc9d7f7 3a465482 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_pos_to_text
2024/09/22 14:13 upstream 88264981f208 6f888b75 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_pos_to_text
2024/09/17 22:06 upstream a940d9a43e62 c673ca06 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_btree_pos_to_text
* Struck through repros no longer work on HEAD.