syzbot


WARNING in bch2_dev_free

Status: upstream: reported C repro on 2025/04/08 11:53
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+aec9606169fbc3a12ca6@syzkaller.appspotmail.com
Fix commit: d62922ba3cfc bcachefs: Prevent granting write refs when filesystem is read-only
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-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 ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce], missing on: [ci-qemu-native-arm64-kvm ci-qemu2-arm32 ci-qemu2-riscv64 ci-upstream-gce-arm64 ci-upstream-linux-next-kasan-gce-root ci2-upstream-usb]
First crash: 19d, last: 1h56m
Cause bisection: introduced by (bisect log) :
commit dcffc3b1ae3251d796a25c673f614e3099ca83d3
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date: Sun Mar 30 03:11:08 2025 +0000

  bcachefs: Split up bch_dev.io_ref

Crash: WARNING in bch2_dev_free (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] WARNING in bch2_dev_free 2 (7) 2025/04/18 00:37
[PATCH] bcache: Prevent granting write refs when filesystem is read-only 2 (2) 2025/04/13 09:56
Last patch testing requests (3)
Created Duration User Patch Repo Result
2025/04/12 18:11 6m gshahrouzi@gmail.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5fc31936081919a8572a3d644f3fbb258038f337 error
2025/04/12 18:04 15m gshahrouzi@gmail.com patch upstream report log
2025/04/09 16:09 19m charmitro@posteo.net patch upstream report log

Sample crash report:
bcachefs (loop0): Cannot remove without losing data
bcachefs (loop0): shutting down
------------[ cut here ]------------
WARNING: CPU: 1 PID: 5847 at fs/bcachefs/super.c:1229 bch2_dev_free+0x228/0x290 fs/bcachefs/super.c:1229
Modules linked in:
CPU: 1 UID: 0 PID: 5847 Comm: syz-executor164 Not tainted 6.15.0-rc1-syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:bch2_dev_free+0x228/0x290 fs/bcachefs/super.c:1229
Code: ff e8 6c f8 6e 00 4c 89 ef e8 64 f8 6e 00 48 89 df 48 83 c4 10 5b 41 5c 41 5d 41 5e 41 5f 5d e9 7e fd 90 07 e8 29 0b 36 fd 90 <0f> 0b 90 e9 09 fe ff ff e8 1b 0b 36 fd 90 0f 0b 90 e9 15 fe ff ff
RSP: 0018:ffffc9000431fb28 EFLAGS: 00010293
RAX: ffffffff848d3937 RBX: ffff888069bca000 RCX: ffff88807bd58000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff888069bca0c0 R08: ffffffff84fc4177 R09: 0000000000000000
R10: ffff888069bca208 R11: ffffed100d37944a R12: ffff8880770003f0
R13: ffff888069bca0b0 R14: ffff888077000000 R15: ffff8880770007b2
FS:  0000000000000000(0000) GS:ffff8881250c9000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055af10ad3878 CR3: 000000007c826000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bch2_fs_free+0x2b0/0x400 fs/bcachefs/super.c:688
 deactivate_locked_super+0xc4/0x130 fs/super.c:473
 cleanup_mnt+0x422/0x4c0 fs/namespace.c:1435
 task_work_run+0x251/0x310 kernel/task_work.c:227
 exit_task_work include/linux/task_work.h:40 [inline]
 do_exit+0xa11/0x27f0 kernel/exit.c:953
 do_group_exit+0x207/0x2c0 kernel/exit.c:1102
 __do_sys_exit_group kernel/exit.c:1113 [inline]
 __se_sys_exit_group kernel/exit.c:1111 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1111
 x64_sys_call+0x26c3/0x26d0 arch/x86/include/generated/asm/syscalls_64.h:232
 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:0x7fce4a4ffe49
Code: Unable to access opcode bytes at 0x7fce4a4ffe1f.
RSP: 002b:00007ffec7bc1bb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fce4a4ffe49
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 00007fce4a581390 R08: ffffffffffffffb8 R09: 0000000000000006
R10: 00000000000058ae R11: 0000000000000246 R12: 00007fce4a581390
R13: 0000000000000000 R14: 00007fce4a582100 R15: 00007fce4a4ce110
 </TASK>

Crashes (200):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/07 02:35 upstream 0af2f6be1b42 1c65791e .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs WARNING in bch2_dev_free
2025/04/07 01:02 upstream 0af2f6be1b42 1c65791e .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs WARNING in bch2_dev_free
2025/04/07 06:57 linux-next a4cda136f021 1c65791e .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root WARNING in bch2_dev_free
2025/04/07 04:58 linux-next a4cda136f021 1c65791e .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root WARNING in bch2_dev_free
2025/04/07 03:12 linux-next a4cda136f021 1c65791e .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root WARNING in bch2_dev_free
2025/04/07 01:49 linux-next a4cda136f021 1c65791e .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root WARNING in bch2_dev_free
2025/04/07 00:14 linux-next a4cda136f021 1c65791e .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root WARNING in bch2_dev_free
2025/04/24 07:26 upstream a79be02bba5c 9882047a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in bch2_dev_free
2025/04/23 01:39 upstream bc3372351d0c 53a8b9bd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in bch2_dev_free
2025/04/17 00:46 upstream c62f4b82d571 23b969b7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in bch2_dev_free
2025/04/18 05:20 upstream b5c6891b2c5b 2a20f901 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in bch2_dev_free
2025/04/12 19:32 linux-next 01c6df60d5d4 0bd6db41 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in bch2_dev_free
2025/04/26 07:22 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 WARNING in bch2_dev_free
2025/04/26 05:51 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 WARNING in bch2_dev_free
2025/04/25 19:22 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 WARNING in bch2_dev_free
2025/04/25 17:29 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 WARNING in bch2_dev_free
2025/04/25 12:08 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 e3715315 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/25 04:02 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 e3715315 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/25 01:28 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 9c80ffa0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/24 10:53 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 9c80ffa0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/24 01:55 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 9882047a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/23 23:37 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 d971f7e2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/23 18:24 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 d971f7e2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/23 13:49 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 d971f7e2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/23 10:43 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 53a8b9bd .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/22 21:26 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 53a8b9bd .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/22 15:57 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 53a8b9bd .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/22 12:34 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/22 11:26 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/22 05:12 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/22 03:34 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/22 01:43 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/21 19:26 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/21 16:32 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/21 14:07 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/21 12:20 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/21 10:58 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/21 09:15 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/20 18:36 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/20 16:54 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/20 13:10 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/20 09:55 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/20 04:14 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/19 21:07 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/19 19:48 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/19 18:44 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/19 15:25 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/19 09:34 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/18 20:07 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/17 23:03 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/17 17:37 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a6ededb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/17 11:25 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 2a6ededb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/17 06:44 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 23b969b7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/17 04:26 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 23b969b7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
2025/04/17 03:19 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c72692105976 23b969b7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in bch2_dev_free
* Struck through repros no longer work on HEAD.