INFO: task syz-executor131:5817 blocked for more than 143 seconds. Not tainted 6.15.0-rc4-syzkaller-00021-gca91b9500108 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor131 state:D stack:19816 pid:5817 tgid:5817 ppid:5815 task_flags:0x440140 flags:0x00004006 Call Trace: 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 __closure_sync+0x163/0x220 lib/closure.c:146 bch2_wait_on_allocator fs/bcachefs/alloc_foreground.h:256 [inline] __bch2_write+0x324b/0x39b0 fs/bcachefs/io_write.c:1554 closure_queue include/linux/closure.h:270 [inline] closure_call include/linux/closure.h:432 [inline] bch2_writepage_do_io fs/bcachefs/fs-io-buffered.c:494 [inline] bch2_writepages+0x269/0x360 fs/bcachefs/fs-io-buffered.c:677 do_writepages+0x3ae/0x7b0 mm/page-writeback.c:2656 filemap_fdatawrite_wbc mm/filemap.c:386 [inline] __filemap_fdatawrite_range mm/filemap.c:419 [inline] file_write_and_wait_range+0x22c/0x330 mm/filemap.c:794 bch2_fsync+0x127/0x330 fs/bcachefs/fs-io.c:228 generic_write_sync include/linux/fs.h:2976 [inline] bch2_write_iter+0x2822/0x2b90 fs/bcachefs/fs-io-buffered.c:1097 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f5625337b99 RSP: 002b:00007ffd37935378 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5625337b99 RDX: 0000000000000018 RSI: 0000200000000040 RDI: 0000000000000004 RBP: 00007f56253ba5f0 R08: 00005555563e44c0 R09: 00005555563e44c0 R10: 00005555563e44c0 R11: 0000000000000246 R12: 00007ffd379353a0 R13: 00007ffd379355c8 R14: 431bde82d7b634db R15: 00007f562538003b 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 2 locks held by getty/5574: #0: ffff8880324b80a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243 #1: ffffc90002ffe2f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x43e/0x1400 drivers/tty/n_tty.c:2222 1 lock held by syz-executor131/5817: #0: ffff888047c3e420 (sb_writers#8){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:3041 [inline] #0: ffff888047c3e420 (sb_writers#8){.+.+}-{0:0}, at: vfs_write+0x211/0xa90 fs/read_write.c:680 3 locks held by bch-copygc/loop/5826: ============================================= NMI backtrace for cpu 0 CPU: 0 UID: 0 PID: 31 Comm: khungtaskd Not tainted 6.15.0-rc4-syzkaller-00021-gca91b9500108 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025 Call Trace: 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 Sending NMI from CPU 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 UID: 0 PID: 5826 Comm: bch-copygc/loop Not tainted 6.15.0-rc4-syzkaller-00021-gca91b9500108 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025 RIP: 0010:bch2_btree_write_buffer_flush_locked+0x45/0x45a0 fs/bcachefs/btree_write_buffer.c:284 Code: 00 49 89 ff 65 48 8b 05 99 0c 4e 0e 48 89 84 24 00 03 00 00 49 bd 00 00 00 00 00 fc ff df 48 c7 84 24 80 01 00 00 b3 8a b5 41 <48> c7 84 24 88 01 00 00 2e 06 91 8d 48 c7 84 24 90 01 00 00 60 c3 RSP: 0018:ffffc9000408f2c0 EFLAGS: 00000286 RAX: 2c4ea47cbfb1f900 RBX: ffff88807a100000 RCX: ffff88807fd61e00 RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff8880280cc000 RBP: ffffc9000408f618 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000008000 R11: ffffffff84240a40 R12: 0000000000000001 R13: dffffc0000000000 R14: ffff8880280cc000 R15: ffff8880280cc000 FS: 0000000000000000(0000) GS:ffff888126203000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000563e76368600 CR3: 00000000330b8000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_btree_write_buffer_flush_nocheck_rw fs/bcachefs/btree_write_buffer.c:621 [inline] bch2_btree_write_buffer_tryflush+0x150/0x1a0 fs/bcachefs/btree_write_buffer.c:635 bch2_copygc_get_buckets fs/bcachefs/movinggc.c:160 [inline] bch2_copygc+0x28a/0x3cf0 fs/bcachefs/movinggc.c:221 bch2_copygc_thread+0x8c9/0xd40 fs/bcachefs/movinggc.c:405 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 INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.031 msecs