syzbot


kernel BUG in __journal_res_get (3)

Status: upstream: reported C repro on 2025/06/18 13:07
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+b58cefdc75f590b71819@syzkaller.appspotmail.com
First crash: 4d06h, last: 1d01h
Cause bisection: the cause commit could be any of (bisect log):
  0e43bf5a6a8f bcachefs: Simplify logic
  58c36e6710d3 bcachefs: Initialize c->name earlier on single dev filesystems
  c02e5b57283a bcachefs: Single device mode
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] kernel BUG in __journal_res_get (3) 0 (1) 2025/06/18 13:07
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in __journal_res_get (2) bcachefs C error done 1527 8d12h 216d 28/29 fixed on 2025/06/10 16:19
upstream kernel BUG in __journal_res_get bcachefs C done 7 381d 405d 25/29 fixed on 2024/06/11 03:41

Sample crash report:
------------[ cut here ]------------
kernel BUG at fs/bcachefs/journal.c:397!
Oops: invalid opcode: 0000 [#1] SMP KASAN PTI
CPU: 0 UID: 0 PID: 5830 Comm: syz-executor962 Not tainted 6.16.0-rc1-syzkaller-00203-g4774cfe3543a #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:journal_entry_open fs/bcachefs/journal.c:397 [inline]
RIP: 0010:__journal_res_get+0x25cd/0x27f0 fs/bcachefs/journal.c:639
Code: ff ff e9 2b db ff ff e8 01 7c 7e fd 41 be eb f6 ff ff e9 1b db ff ff e8 11 58 1d 07 e8 ec 7b 7e fd 90 0f 0b e8 e4 7b 7e fd 90 <0f> 0b e8 dc 7b 7e fd 90 0f 0b e8 d4 7b 7e fd 90 0f 0b e8 cc 7b 7e
RSP: 0000:ffffc9000450f4c0 EFLAGS: 00010293
RAX: ffffffff8441cf5c RBX: 1ffff1100e55951b RCX: ffff88807d840000
RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000000
RBP: ffffc9000450f790 R08: ffff888072aca9f7 R09: 1ffff1100e55953e
R10: dffffc0000000000 R11: ffffed100e55953f R12: ffff888072ac9800
R13: 1ffff1100e55953e R14: 0000000000000002 R15: 00000000007ffffe
FS:  00007fcba328c6c0(0000) GS:ffff888125c86000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fcb9bbd2000 CR3: 000000007396c000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bch2_journal_res_get_slowpath+0xdc/0xaf0 fs/bcachefs/journal.c:734
 bch2_journal_res_get+0x14f/0x1f0 fs/bcachefs/journal.h:401
 __bch2_journal_meta+0x40/0x1d0 fs/bcachefs/journal.c:980
 bch2_fs_journal_stop+0x1dd/0x440 fs/bcachefs/journal.c:1462
 __bch2_fs_read_only+0x343/0x5b0 fs/bcachefs/super.c:307
 __bch2_fs_read_write+0x5cd/0x830 fs/bcachefs/super.c:554
 bch2_fs_reconfigure+0x29a/0x400 fs/bcachefs/fs.c:2675
 reconfigure_super+0x224/0x890 fs/super.c:1075
 do_remount fs/namespace.c:3369 [inline]
 path_mount+0xd18/0xfe0 fs/namespace.c:4201
 do_mount fs/namespace.c:4222 [inline]
 __do_sys_mount fs/namespace.c:4433 [inline]
 __se_sys_mount+0x317/0x410 fs/namespace.c:4410
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fcba32d7c39
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 18 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fcba328c168 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fcba336d5e8 RCX: 00007fcba32d7c39
RDX: 0000000000000000 RSI: 0000200000000000 RDI: 0000000000000000
RBP: 00007fcba336d5e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000002012024 R11: 0000000000000246 R12: 00007fcba336d5ec
R13: 0000000000000006 R14: 00007fff9e832030 R15: 00007fff9e832118
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:journal_entry_open fs/bcachefs/journal.c:397 [inline]
RIP: 0010:__journal_res_get+0x25cd/0x27f0 fs/bcachefs/journal.c:639
Code: ff ff e9 2b db ff ff e8 01 7c 7e fd 41 be eb f6 ff ff e9 1b db ff ff e8 11 58 1d 07 e8 ec 7b 7e fd 90 0f 0b e8 e4 7b 7e fd 90 <0f> 0b e8 dc 7b 7e fd 90 0f 0b e8 d4 7b 7e fd 90 0f 0b e8 cc 7b 7e
RSP: 0000:ffffc9000450f4c0 EFLAGS: 00010293
RAX: ffffffff8441cf5c RBX: 1ffff1100e55951b RCX: ffff88807d840000
RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000000
RBP: ffffc9000450f790 R08: ffff888072aca9f7 R09: 1ffff1100e55953e
R10: dffffc0000000000 R11: ffffed100e55953f R12: ffff888072ac9800
R13: 1ffff1100e55953e R14: 0000000000000002 R15: 00000000007ffffe
FS:  00007fcba328c6c0(0000) GS:ffff888125c86000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fcb9bbd2000 CR3: 000000007396c000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/14 19:51 upstream 4774cfe3543a 5f4b362d .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in __journal_res_get
2025/06/14 19:08 upstream 4774cfe3543a 5f4b362d .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in __journal_res_get
2025/06/14 18:33 upstream 4774cfe3543a 5f4b362d .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in __journal_res_get
2025/06/17 18:06 upstream 9afe652958c3 cfebc887 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in __journal_res_get
2025/06/17 11:55 upstream 9afe652958c3 cfebc887 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in __journal_res_get
2025/06/14 13:04 upstream 02adc1490e6d 0e8da31f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in __journal_res_get
* Struck through repros no longer work on HEAD.