syzbot


INFO: task hung in btree_write_buffer_flush_seq

Status: upstream: reported C repro on 2024/11/10 08:33
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+cf3d1015b55ff73dcdc8@syzkaller.appspotmail.com
First crash: 323d, last: 27d
Cause bisection: introduced by (bisect log) :
commit 49fd90b2cc332b8607a616d99d4bb792f18208b9
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date: Wed Sep 25 22:17:31 2024 +0000

  bcachefs: Fix unlocked access to c->disk_sb.sb in bch2_replicas_entry_validate()

Crash: INFO: task hung in bch2_replicas_entry_validate (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly bcachefs report (May 2025) 0 (1) 2025/05/24 10:04
[syzbot] [bcachefs?] INFO: task hung in btree_write_buffer_flush_seq 0 (1) 2024/11/10 08:33
Last patch testing requests (6)
Created Duration User Patch Repo Result
2025/06/10 09:11 16m retest repro upstream report log
2025/06/10 02:22 18m retest repro linux-next report log
2025/02/28 21:47 22m retest repro upstream OK log
2025/02/28 11:36 28m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2025/02/28 11:36 25m retest repro linux-next error
2024/11/20 10:08 26m retest repro upstream OK log
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2025/06/26 11:03 2h04m bisect fix upstream OK (0) job log log

Sample crash report:
INFO: task bch-reclaim/loo:5854 blocked for more than 143 seconds.
      Not tainted 6.15.0-rc4-syzkaller-00011-gf15d97df5afa #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:bch-reclaim/loo state:D stack:26552 pid:5854  tgid:5854  ppid:2      task_flags:0x200840 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x168f/0x4c70 kernel/sched/core.c:6767
 __schedule_loop kernel/sched/core.c:6845 [inline]
 schedule+0x165/0x360 kernel/sched/core.c:6860
 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6917
 __mutex_lock_common kernel/locking/mutex.c:678 [inline]
 __mutex_lock+0x724/0xe80 kernel/locking/mutex.c:746
 btree_write_buffer_flush_seq+0x1829/0x19a0 fs/bcachefs/btree_write_buffer.c:569
 bch2_btree_write_buffer_journal_flush+0x69/0xb0 fs/bcachefs/btree_write_buffer.c:586
 journal_flush_pins+0x8e0/0xe90 fs/bcachefs/journal_reclaim.c:592
 __bch2_journal_reclaim+0x781/0xd10 fs/bcachefs/journal_reclaim.c:723
 bch2_journal_reclaim_thread+0x177/0x4f0 fs/bcachefs/journal_reclaim.c:765
 kthread+0x70e/0x8a0 kernel/kthread.c:464
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/31:
 #0: ffffffff8df3b860 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
 #0: ffffffff8df3b860 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline]
 #0: ffffffff8df3b860 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180 kernel/locking/lockdep.c:6764
1 lock held by klogd/5180:
 #0: ffff8880b89399d8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:605
2 locks held by getty/5570:
 #0: ffff8880346da0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc9000333b2f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x43e/0x1400 drivers/tty/n_tty.c:2222
3 locks held by syz-executor156/5842:
 #0: ffff88807d5b8420 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:556
 #1: ffff888075c84228 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:161 [inline]
 #1: ffff888075c84228 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:253 [inline]
 #1: ffff888075c84228 (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_trans_srcu_lock+0xaf/0x220 fs/bcachefs/btree_iter.c:3202
 #2: ffff888075ca6590 (&c->gc_lock){.+.+}-{4:4}, at: bch2_btree_update_start+0x68f/0x14c0 fs/bcachefs/btree_update_interior.c:1179
3 locks held by bch-reclaim/loo/5854:
 #0: ffff888075ccad28 (&j->reclaim_lock){+.+.}-{4:4}, at: bch2_journal_reclaim_thread+0x16b/0x4f0 fs/bcachefs/journal_reclaim.c:764
 #1: ffff888075c84228 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:161 [inline]
 #1: ffff888075c84228 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:253 [inline]
 #1: ffff888075c84228 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x806/0xda0 fs/bcachefs/btree_iter.c:3385
 #2: ffff888075c845d0 (&wb->flushing.lock){+.+.}-{4:4}, at: btree_write_buffer_flush_seq+0x1829/0x19a0 fs/bcachefs/btree_write_buffer.c:569
3 locks held by bch-copygc/loop/5855:
 #0: ffff888075c84228 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:161 [inline]
 #0: ffff888075c84228 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:253 [inline]
 #0: ffff888075c84228 (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_trans_srcu_lock+0xaf/0x220 fs/bcachefs/btree_iter.c:3202
 #1: ffff888075c845d0 (&wb->flushing.lock){+.+.}-{4:4}, at: btree_write_buffer_flush_seq+0x1829/0x19a0 fs/bcachefs/btree_write_buffer.c:569
 #2: ffff888075ca6590 (&c->gc_lock){.+.+}-{4:4}, at: bch2_btree_update_start+0x68f/0x14c0 fs/bcachefs/btree_update_interior.c:1179

=============================================

NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 31 Comm: khungtaskd Not tainted 6.15.0-rc4-syzkaller-00011-gf15d97df5afa #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 nmi_cpu_backtrace+0x39e/0x3d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x17a/0x300 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:158 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:274 [inline]
 watchdog+0xfee/0x1030 kernel/hung_task.c:437
 kthread+0x70e/0x8a0 kernel/kthread.c:464
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Not tainted 6.15.0-rc4-syzkaller-00011-gf15d97df5afa #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
RIP: 0010:pv_native_safe_halt+0x13/0x20 arch/x86/kernel/paravirt.c:81
Code: cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 66 90 0f 00 2d 03 7b 19 00 f3 0f 1e fa fb f4 <c3> cc cc cc cc cc cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc90000197de0 EFLAGS: 000002c6
RAX: 6b8de21d5304c900 RBX: ffffffff81973cc8 RCX: 6b8de21d5304c900
RDX: 0000000000000001 RSI: ffffffff8d73579d RDI: ffffffff8bc0fa60
RBP: ffffc90000197f20 R08: ffff8880b8932b5b R09: 1ffff1101712656b
R10: dffffc0000000000 R11: ffffed101712656c R12: ffffffff8f7d9f70
R13: 0000000000000001 R14: 0000000000000001 R15: 1ffff110038d9b40
FS:  0000000000000000(0000) GS:ffff888126202000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055c2b31e0600 CR3: 000000000dd36000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 arch_safe_halt arch/x86/include/asm/paravirt.h:107 [inline]
 default_idle+0x13/0x20 arch/x86/kernel/process.c:748
 default_idle_call+0x74/0xb0 kernel/sched/idle.c:117
 cpuidle_idle_call kernel/sched/idle.c:185 [inline]
 do_idle+0x1e8/0x510 kernel/sched/idle.c:325
 cpu_startup_entry+0x44/0x60 kernel/sched/idle.c:423
 start_secondary+0x101/0x110 arch/x86/kernel/smpboot.c:315
 common_startup_64+0x13e/0x147
 </TASK>

Crashes (730):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/29 05:14 upstream f15d97df5afa aeb6ec69 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2024/12/08 08:58 linux-next af2ea8ab7a54 9ac0fdc6 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root INFO: task hung in btree_write_buffer_flush_seq
2025/07/10 16:08 upstream 8c2e52ebbe88 956bd956 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/10 10:35 upstream 8c2e52ebbe88 956bd956 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/10 03:05 upstream 8c2e52ebbe88 956bd956 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/10 01:44 upstream 8c2e52ebbe88 f4e5e155 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/09 23:37 upstream 8c2e52ebbe88 f4e5e155 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/09 22:29 upstream 8c2e52ebbe88 f4e5e155 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/09 20:20 upstream 733923397fd9 f4e5e155 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/09 14:56 upstream 733923397fd9 f4e5e155 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/09 13:56 upstream 733923397fd9 f4e5e155 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/09 10:08 upstream 733923397fd9 f4e5e155 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/09 08:49 upstream 733923397fd9 f4e5e155 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/09 06:27 upstream 733923397fd9 4d9fdfa4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/09 04:04 upstream d006330be3f7 4d9fdfa4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/08 23:51 upstream d006330be3f7 4d9fdfa4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/08 21:39 upstream d006330be3f7 abade794 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in btree_write_buffer_flush_seq
2025/07/08 17:22 upstream d006330be3f7 4d9fdfa4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/08 11:40 upstream d7b8f8e20813 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/08 07:06 upstream d7b8f8e20813 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/08 02:43 upstream d7b8f8e20813 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/07 05:53 upstream d7b8f8e20813 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/07 00:35 upstream d7b8f8e20813 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/06 11:40 upstream 1f988d0788f5 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/06 06:41 upstream 05df91921da6 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/06 04:54 upstream 05df91921da6 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/05 21:17 upstream 05df91921da6 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/05 21:17 upstream 05df91921da6 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/05 13:07 upstream a79a588fc176 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/05 08:47 upstream a79a588fc176 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/05 06:58 upstream a79a588fc176 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/05 04:19 upstream a79a588fc176 d869b261 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/04 23:29 upstream 4c06e63b9203 d869b261 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/04 11:57 upstream 4c06e63b9203 76ad128c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/04 02:50 upstream 17bbde2e1716 76ad128c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in btree_write_buffer_flush_seq
2025/07/03 22:16 upstream 17bbde2e1716 76ad128c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/03 20:10 upstream 17bbde2e1716 115ceea7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/07/03 09:55 upstream b4911fb0b060 115ceea7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/06/29 13:28 upstream dfba48a70cb6 fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in btree_write_buffer_flush_seq
2025/05/27 01:50 upstream 0ff41df1cb26 874a1386 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/05/27 00:24 upstream 0ff41df1cb26 874a1386 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/05/26 23:22 upstream 0ff41df1cb26 874a1386 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/05/26 21:04 upstream 0ff41df1cb26 874a1386 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/05/26 09:35 upstream 0f8c0258bf04 2d4582d0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/05/26 06:16 upstream 0f8c0258bf04 2d4582d0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/05/25 16:43 upstream d0c22de9995b ed351ea7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2025/05/23 08:55 upstream 94305e83eccb fa44301a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2024/12/13 18:16 upstream f932fb9b4074 3547e30f .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in btree_write_buffer_flush_seq
2024/11/06 08:21 upstream 2e1b3cc9d7f7 3a465482 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root INFO: task hung in btree_write_buffer_flush_seq
2025/07/08 19:39 linux-next 58ba80c47402 abade794 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in btree_write_buffer_flush_seq
2025/06/29 11:57 linux-next 2aeda9592360 fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in btree_write_buffer_flush_seq
2025/06/26 19:17 linux-next ecb259c4f70d 803ce19b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in btree_write_buffer_flush_seq
2025/02/10 20:36 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2014c95afece 43f51a00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in btree_write_buffer_flush_seq
2024/12/26 05:22 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 573067a5a685 444551c4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 INFO: task hung in btree_write_buffer_flush_seq
* Struck through repros no longer work on HEAD.