syzbot


kernel BUG in bch2_journal_replay

Status: upstream: reported C repro on 2024/06/10 14:27
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+2c4fcb257ce2b6a29d0e@syzkaller.appspotmail.com
First crash: 11d, last: 11d
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: WARNING in rhashtable_init (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] kernel BUG in bch2_journal_replay 0 (1) 2024/06/10 14:27

Sample crash report:
bcachefs (loop0): recovering from clean shutdown, journal seq 4755801206503243784
bcachefs (loop0): alloc_read... done
bcachefs (loop0): stripes_read... done
bcachefs (loop0): snapshots_read... done
bcachefs (loop0): going read-write
bcachefs (loop0): journal_replay...
------------[ cut here ]------------
kernel BUG at fs/bcachefs/recovery.c:129!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 PID: 5080 Comm: syz-executor177 Not tainted 6.10.0-rc2-syzkaller-00097-g2df0193e62cf #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
RIP: 0010:replay_now_at fs/bcachefs/recovery.c:129 [inline]
RIP: 0010:bch2_journal_replay+0x133d/0x1360 fs/bcachefs/recovery.c:268
Code: 89 e6 e8 96 86 d6 ff e8 31 8c 45 07 e8 1c 0b 5e fd 90 0f 0b e8 14 0b 5e fd 90 0f 0b e8 0c 0b 5e fd 90 0f 0b e8 04 0b 5e fd 90 <0f> 0b e8 fc 0a 5e fd 90 0f 0b e8 f4 0a 5e fd 90 0f 0b e8 ec 0a 5e
RSP: 0018:ffffc90002d6efe0 EFLAGS: 00010293
RAX: ffffffff84381a8c RBX: 4200000000000009 RCX: ffff888017fa0000
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 4200000000000009
RBP: ffffc90002d6f128 R08: ffffffff84381098 R09: ffffffff84a313ec
R10: 0000000000000004 R11: ffff888017fa0000 R12: dffffc0000000000
R13: 1ffff1100e65958f R14: 00000000ffffffff R15: ffff8880732cac78
FS:  000055555ba40380(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000559cbf898ff0 CR3: 00000000200f8000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bch2_run_recovery_pass+0xf0/0x1e0 fs/bcachefs/recovery_passes.c:182
 bch2_run_recovery_passes+0x19e/0x820 fs/bcachefs/recovery_passes.c:225
 bch2_fs_recovery+0x2370/0x3720 fs/bcachefs/recovery.c:807
 bch2_fs_start+0x356/0x5b0 fs/bcachefs/super.c:1031
 bch2_fs_open+0xa8d/0xdf0 fs/bcachefs/super.c:2123
 bch2_mount+0x6c0/0x1320 fs/bcachefs/fs.c:1917
 legacy_get_tree+0xee/0x190 fs/fs_context.c:662
 vfs_get_tree+0x90/0x2a0 fs/super.c:1780
 do_new_mount+0x2be/0xb40 fs/namespace.c:3352
 do_mount fs/namespace.c:3692 [inline]
 __do_sys_mount fs/namespace.c:3898 [inline]
 __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3875
 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:0x7f0a5e7c693a
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:00007ffe9296c7c8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffe9296c7e0 RCX: 00007f0a5e7c693a
RDX: 0000000020005b00 RSI: 0000000020000000 RDI: 00007ffe9296c7e0
RBP: 0000000000000004 R08: 00007ffe9296c820 R09: 0000000000005b72
R10: 0000000003000002 R11: 0000000000000282 R12: 0000000003000002
R13: 00007ffe9296c820 R14: 0000000000000003 R15: 0000000001000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:replay_now_at fs/bcachefs/recovery.c:129 [inline]
RIP: 0010:bch2_journal_replay+0x133d/0x1360 fs/bcachefs/recovery.c:268
Code: 89 e6 e8 96 86 d6 ff e8 31 8c 45 07 e8 1c 0b 5e fd 90 0f 0b e8 14 0b 5e fd 90 0f 0b e8 0c 0b 5e fd 90 0f 0b e8 04 0b 5e fd 90 <0f> 0b e8 fc 0a 5e fd 90 0f 0b e8 f4 0a 5e fd 90 0f 0b e8 ec 0a 5e
RSP: 0018:ffffc90002d6efe0 EFLAGS: 00010293
RAX: ffffffff84381a8c RBX: 4200000000000009 RCX: ffff888017fa0000
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 4200000000000009
RBP: ffffc90002d6f128 R08: ffffffff84381098 R09: ffffffff84a313ec
R10: 0000000000000004 R11: ffff888017fa0000 R12: dffffc0000000000
R13: 1ffff1100e65958f R14: 00000000ffffffff R15: ffff8880732cac78
FS:  000055555ba40380(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000559cbf898ff0 CR3: 00000000200f8000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/06 14:51 upstream 2df0193e62cf 121701b6 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in bch2_journal_replay
2024/06/06 14:25 upstream 2df0193e62cf 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_journal_replay
* Struck through repros no longer work on HEAD.