syzbot


kernel BUG in bch2_journal_keys_peek_max

Status: upstream: reported C repro on 2025/02/12 11:52
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+9b22c314d51cfbcd1ddc@syzkaller.appspotmail.com
First crash: 53d, last: 4d22h
Cause bisection: introduced by (bisect log) :
commit 7e5b8e00e2631ee1fa72edeb420e7393ad078ab3
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date: Fri Oct 25 02:12:37 2024 +0000

  bcachefs: Implement bch2_btree_iter_prev_min()

Crash: kernel BUG in bch2_journal_keys_peek_prev_min (log)
Repro: syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] kernel BUG in bch2_journal_keys_peek_max 0 (1) 2025/02/12 11:52

Sample crash report:
------------[ cut here ]------------
kernel BUG at fs/bcachefs/btree_journal_iter.c:83!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 0 UID: 0 PID: 8057 Comm: syz-executor165 Not tainted 6.14.0-rc4-syzkaller-00073-g5394eea10651 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:bch2_journal_keys_peek_max+0x164f/0x1660 fs/bcachefs/btree_journal_iter.c:83
Code: 10 48 8d 5c 08 18 48 89 d8 48 c1 e8 03 42 80 3c 20 00 74 08 48 89 df e8 0f 78 d9 fd 4c 8b 33 e9 d7 fe ff ff e8 22 c5 74 fd 90 <0f> 0b e8 9a 94 b3 07 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90
RSP: 0018:ffffc900035a6620 EFLAGS: 00010293
RAX: ffffffff844cf87e RBX: 0000000000000039 RCX: ffff888025481e00
RDX: 0000000000000000 RSI: 0000000000000039 RDI: ffffffffffffffff
RBP: ffffc900035a67e0 R08: ffffffff844ce375 R09: 0000000000000000
R10: 00000001ffffffff R11: 2000000000000000 R12: dffffc0000000000
R13: ffff88805ef00000 R14: ffffffffffffffff R15: ffffc900035a7018
FS:  00005555819eb480(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000002d984000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bch2_btree_journal_peek fs/bcachefs/btree_iter.c:2137 [inline]
 btree_trans_peek_journal+0x342/0x5a0 fs/bcachefs/btree_iter.c:2166
 __bch2_btree_iter_peek fs/bcachefs/btree_iter.c:2303 [inline]
 bch2_btree_iter_peek_max+0x1502/0x6320 fs/bcachefs/btree_iter.c:2373
 bch2_btree_iter_peek_slot+0xe0a/0x27c0 fs/bcachefs/btree_iter.c:2838
 bch2_btree_iter_peek_prev_min+0x1f3/0x6390 fs/bcachefs/btree_iter.c:2612
 __bch2_resume_logged_op_finsert+0xd5f/0x36b0 fs/bcachefs/io_misc.c:431
 bch2_fcollapse_finsert+0x286/0x3b0 fs/bcachefs/io_misc.c:535
 bchfs_fcollapse_finsert+0x3a8/0x630 fs/bcachefs/fs-io.c:594
 bch2_fallocate_dispatch+0x3c9/0x540
 vfs_fallocate+0x623/0x7a0 fs/open.c:338
 ksys_fallocate fs/open.c:362 [inline]
 __do_sys_fallocate fs/open.c:367 [inline]
 __se_sys_fallocate fs/open.c:365 [inline]
 __x64_sys_fallocate+0xbc/0x110 fs/open.c:365
 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:0x7f0ef3bf2789
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 1c 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd1b0b4ca8 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f0ef3bf2789
RDX: 0000000000000000 RSI: 0000000000000020 RDI: 0000000000000004
RBP: 0000000000000000 R08: 00007ffd1b0b4cdc R09: 00007ffd1b0b4cdc
R10: 0000000000008000 R11: 0000000000000246 R12: 00007ffd1b0b4cdc
R13: 0000000000000036 R14: 431bde82d7b634db R15: 00007ffd1b0b4d10
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bch2_journal_keys_peek_max+0x164f/0x1660 fs/bcachefs/btree_journal_iter.c:83
Code: 10 48 8d 5c 08 18 48 89 d8 48 c1 e8 03 42 80 3c 20 00 74 08 48 89 df e8 0f 78 d9 fd 4c 8b 33 e9 d7 fe ff ff e8 22 c5 74 fd 90 <0f> 0b e8 9a 94 b3 07 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90
RSP: 0018:ffffc900035a6620 EFLAGS: 00010293
RAX: ffffffff844cf87e RBX: 0000000000000039 RCX: ffff888025481e00
RDX: 0000000000000000 RSI: 0000000000000039 RDI: ffffffffffffffff
RBP: ffffc900035a67e0 R08: ffffffff844ce375 R09: 0000000000000000
R10: 00000001ffffffff R11: 2000000000000000 R12: dffffc0000000000
R13: ffff88805ef00000 R14: ffffffffffffffff R15: ffffc900035a7018
FS:  00005555819eb480(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000002d984000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (31):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/27 08:53 upstream 5394eea10651 6a8fcbc4 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/02/10 02:34 upstream 69b54314c975 ef44b750 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/02/08 19:38 upstream 8f6629c004b1 ef44b750 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2 (corrupt fs)] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/02/08 16:16 upstream 8f6629c004b1 ef44b750 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2 (corrupt fs)] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/02/08 15:44 upstream 8f6629c004b1 ef44b750 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2 (corrupt fs)] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/03/20 15:07 upstream a7f2e10ecd8f 62330552 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in bch2_journal_keys_peek_max
2025/03/14 17:47 upstream 695caca9345a e2826670 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/03/12 09:26 upstream 0b46b049d6ec ee70e6db .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/03/09 04:02 upstream b7c90e3e717a 163f510d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/02/27 11:59 upstream 5394eea10651 6a8fcbc4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in bch2_journal_keys_peek_max
2025/02/27 11:58 upstream 5394eea10651 6a8fcbc4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in bch2_journal_keys_peek_max
2025/02/26 23:11 upstream 5394eea10651 6a8fcbc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/02/26 03:15 upstream 2a1944bff549 d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root kernel BUG in bch2_journal_keys_peek_max
2025/02/25 06:34 upstream d082ecbc71e9 d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/02/25 04:14 upstream d082ecbc71e9 d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in bch2_journal_keys_peek_max
2025/02/23 13:39 upstream 27102b38b8ca d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/02/22 06:41 upstream 8a61cb6e150e d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/02/21 01:19 upstream e9a8cac0bf89 0808a665 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/02/18 15:19 upstream 2408a807bfc3 c37c7249 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/02/13 21:57 upstream ab68d7eb7b1a a98a8417 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/02/13 19:34 upstream ab68d7eb7b1a a98a8417 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/02/11 08:00 upstream febbc555cf0f 43f51a00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/02/11 00:38 upstream a64dcfb451e2 43f51a00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/02/10 02:08 upstream 69b54314c975 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/02/09 06:11 upstream 9946eaf552b1 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/02/08 11:45 upstream 7ee983c850b4 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_journal_keys_peek_max
2025/03/29 00:38 upstream acb4f33713b9 9a1a9e31 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_journal_keys_peek_max
2025/02/27 01:54 upstream 5394eea10651 6a8fcbc4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_journal_keys_peek_max
2025/02/27 01:47 upstream 5394eea10651 6a8fcbc4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_journal_keys_peek_max
2025/02/09 16:33 linux-next ed58d103e6da ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in bch2_journal_keys_peek_max
2025/02/09 16:32 linux-next ed58d103e6da ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in bch2_journal_keys_peek_max
* Struck through repros no longer work on HEAD.