syzbot


kernel BUG in __journal_res_get (2)

Status: upstream: reported C repro on 2024/11/14 07:45
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+53bb24d476ef8368a7f0@syzkaller.appspotmail.com
Fix commit: 4c0d2c67ac6d bcachefs: Fix early startup error path
Patched on: [ci-qemu-gce-upstream-auto ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu-native-arm64-kvm ci-qemu2-arm32 ci-qemu2-riscv64 ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce]
First crash: 171d, last: 4d05h
Cause bisection: failed (error log, bisect log)
  
Fix bisection: fixed by (bisect log) :
commit fb8c835b18d48dac953a5d755a8e90b0d8fb9c29
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date: Sat Oct 12 02:50:48 2024 +0000

  bcachefs: bch2_journal_meta() takes ref on c->writes

  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly bcachefs report (Apr 2025) 0 (1) 2025/04/22 12:41
[syzbot] [bcachefs?] kernel BUG in __journal_res_get (2) 0 (3) 2025/03/10 14:05
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in __journal_res_get bcachefs C done 7 332d 356d 25/28 fixed on 2024/06/11 03:41
Last patch testing requests (3)
Created Duration User Patch Repo Result
2025/03/17 06:55 27m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2025/01/06 05:28 32m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2025/01/05 23:26 19m retest repro upstream error
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2025/03/10 08:18 5h46m bisect fix upstream OK (1) job log
2025/02/07 08:56 1h38m bisect fix upstream OK (0) job log log

Sample crash report:
bcachefs (loop0): flushing journal and stopping allocators, journal seq 10
bcachefs (loop0): flushing journal and stopping allocators complete, journal seq 10
------------[ cut here ]------------
kernel BUG at fs/bcachefs/journal.c:413!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5314 Comm: syz-executor373 Not tainted 6.14.0-syzkaller-13183-g06a22366d6a1 #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:journal_entry_open fs/bcachefs/journal.c:413 [inline]
RIP: 0010:__journal_res_get+0x2524/0x2830 fs/bcachefs/journal.c:616
Code: e8 51 62 44 fd bb f5 f6 ff ff e9 f4 fe ff ff e8 a2 2b b1 07 e8 3d 62 44 fd 90 0f 0b e8 35 62 44 fd 90 0f 0b e8 2d 62 44 fd 90 <0f> 0b e8 25 62 44 fd 90 0f 0b e8 1d 62 44 fd 90 0f 0b e8 15 62 44
RSP: 0018:ffffc9000d526ca0 EFLAGS: 00010293
RAX: ffffffff847ef553 RBX: 0000000000000000 RCX: ffff888000f80000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000d526f70 R08: ffffffff847edf6d R09: 1ffff110089394ee
R10: dffffc0000000000 R11: ffffed10089394ef R12: ffff8880449ca608
R13: 1ffff110089394f7 R14: ffff888044870000 R15: ffff8880449ca770
FS:  000055555eb16380(0000) GS:ffff88808c597000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000563be5194008 CR3: 0000000044812000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bch2_journal_res_get_slowpath+0xe2/0xc40 fs/bcachefs/journal.c:710
 bch2_journal_res_get+0x168/0x210 fs/bcachefs/journal.h:401
 __bch2_journal_meta+0x94/0x290 fs/bcachefs/journal.c:955
 bch2_fs_journal_stop+0x1e3/0x450 fs/bcachefs/journal.c:1366
 __bch2_fs_read_only+0x327/0x4b0 fs/bcachefs/super.c:289
 __bch2_fs_read_write+0x28d/0x3c0 fs/bcachefs/super.c:526
 bch2_fs_read_write_early+0x2b/0x40 fs/bcachefs/super.c:545
 bch2_fs_recovery+0x386f/0x3e20 fs/bcachefs/recovery.c:1049
 bch2_fs_start+0x310/0x620 fs/bcachefs/super.c:1069
 bch2_fs_get_tree+0x113e/0x18f0 fs/bcachefs/fs.c:2253
 vfs_get_tree+0x90/0x2b0 fs/super.c:1759
 do_new_mount+0x2cf/0xb70 fs/namespace.c:3879
 do_mount fs/namespace.c:4219 [inline]
 __do_sys_mount fs/namespace.c:4430 [inline]
 __se_sys_mount+0x38c/0x400 fs/namespace.c:4407
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f385b1702fa
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:00007ffe6dabf738 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffe6dabf750 RCX: 00007f385b1702fa
RDX: 0000200000000040 RSI: 0000200000000080 RDI: 00007ffe6dabf750
RBP: 0000200000000040 R08: 00007ffe6dabf790 R09: 00000000000059bc
R10: 0000000000200000 R11: 0000000000000282 R12: 0000200000000080
R13: 00007ffe6dabf790 R14: 0000000000000003 R15: 0000000000200000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:journal_entry_open fs/bcachefs/journal.c:413 [inline]
RIP: 0010:__journal_res_get+0x2524/0x2830 fs/bcachefs/journal.c:616
Code: e8 51 62 44 fd bb f5 f6 ff ff e9 f4 fe ff ff e8 a2 2b b1 07 e8 3d 62 44 fd 90 0f 0b e8 35 62 44 fd 90 0f 0b e8 2d 62 44 fd 90 <0f> 0b e8 25 62 44 fd 90 0f 0b e8 1d 62 44 fd 90 0f 0b e8 15 62 44
RSP: 0018:ffffc9000d526ca0 EFLAGS: 00010293
RAX: ffffffff847ef553 RBX: 0000000000000000 RCX: ffff888000f80000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000d526f70 R08: ffffffff847edf6d R09: 1ffff110089394ee
R10: dffffc0000000000 R11: ffffed10089394ef R12: ffff8880449ca608
R13: 1ffff110089394f7 R14: ffff888044870000 R15: ffff8880449ca770
FS:  000055555eb16380(0000) GS:ffff88808c597000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000563be5194008 CR3: 0000000044812000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1518):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/04 05:42 upstream 06a22366d6a1 1740c707 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/09 23:44 linux-next 46086739de22 988b336c .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root kernel BUG in __journal_res_get
2025/04/17 01:33 linux-next 01c6df60d5d4 23b969b7 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root kernel BUG in __journal_res_get
2025/04/15 22:56 linux-next 01c6df60d5d4 23b969b7 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root kernel BUG in __journal_res_get
2024/12/22 21:10 upstream bcde95ce32b6 b4fbdbd4 .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/04/25 18:10 upstream 02ddfb981de8 dea5c7e4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/25 16:37 upstream 02ddfb981de8 dea5c7e4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/25 12:25 upstream 02ddfb981de8 dea5c7e4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/24 23:47 upstream e72e9e693307 e3715315 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/24 19:07 upstream e72e9e693307 9c80ffa0 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/24 11:35 upstream a79be02bba5c 9c80ffa0 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/24 04:40 upstream a79be02bba5c 9882047a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/24 02:53 upstream a79be02bba5c 9882047a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/24 00:54 upstream a79be02bba5c 9882047a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/23 23:16 upstream a79be02bba5c 9882047a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/23 12:51 upstream bc3372351d0c 57d54c08 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/23 05:23 upstream bc3372351d0c 53a8b9bd .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/23 02:59 upstream bc3372351d0c 53a8b9bd .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/22 23:57 upstream bc3372351d0c 53a8b9bd .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/22 19:38 upstream a33b5a08cbbd 53a8b9bd .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/22 17:49 upstream a33b5a08cbbd 53a8b9bd .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/22 10:36 upstream a33b5a08cbbd 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/22 07:18 upstream a33b5a08cbbd 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/22 05:35 upstream a33b5a08cbbd 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/22 00:36 upstream 9d7a0577c9db 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/21 19:50 upstream 9d7a0577c9db 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/21 17:18 upstream 9d7a0577c9db 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/21 14:55 upstream 9d7a0577c9db 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/21 08:49 upstream 9d7a0577c9db 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/20 18:28 upstream 6fea5fabd332 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/20 11:16 upstream 119009db2674 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/20 07:59 upstream 119009db2674 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/19 17:09 upstream 8560697b23dc 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/19 15:24 upstream 8560697b23dc 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/19 11:35 upstream 3088d26962e8 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/19 03:20 upstream 3088d26962e8 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/19 01:47 upstream 3088d26962e8 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/18 22:25 upstream fc96b232f8e7 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/18 18:57 upstream fc96b232f8e7 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/18 15:52 upstream fc96b232f8e7 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/18 14:44 upstream fc96b232f8e7 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/18 02:03 upstream b5c6891b2c5b 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/17 23:56 upstream b5c6891b2c5b 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/17 23:10 upstream b5c6891b2c5b 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/17 19:15 upstream cfb2e2c57aef 552876f8 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/17 11:37 upstream cfb2e2c57aef 552876f8 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/17 10:25 upstream cfb2e2c57aef 552876f8 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/17 08:10 upstream cfb2e2c57aef a95239b1 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2024/11/14 05:10 upstream 0a9b9d17f3a7 a8c99394 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2024/11/10 07:43 upstream de2f378f2b77 6b856513 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __journal_res_get
2025/04/17 06:32 linux-next 01c6df60d5d4 23b969b7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in __journal_res_get
2025/04/17 06:31 linux-next 01c6df60d5d4 23b969b7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in __journal_res_get
2025/04/17 04:50 linux-next 01c6df60d5d4 23b969b7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in __journal_res_get
2025/04/26 12:50 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in __journal_res_get
2024/12/16 08:09 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2e7aff49b5da 7cbfbb3a .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 kernel BUG in __journal_res_get
2024/12/16 07:39 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2e7aff49b5da 7cbfbb3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in __journal_res_get
* Struck through repros no longer work on HEAD.