INFO: task syz-executor.0:2357 blocked for more than 143 seconds. Not tainted 6.6.0-rc1-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.0 state:D stack:9696 pid:2357 ppid:1954 flags:0x00004006 Call Trace: context_switch kernel/sched/core.c:5382 [inline] __schedule+0x68b/0x960 kernel/sched/core.c:6695 schedule+0x68/0xc0 kernel/sched/core.c:6771 __closure_sync+0x6b/0xa0 lib/closure.c:129 closure_sync include/linux/closure.h:189 [inline] __bch2_write+0x1521/0x1650 fs/bcachefs/io_write.c:1489 bch2_write+0x248/0x480 fs/bcachefs/io_write.c:1611 closure_queue include/linux/closure.h:254 [inline] closure_call include/linux/closure.h:379 [inline] bch2_dio_write_loop fs/bcachefs/fs-io-direct.c:528 [inline] bch2_direct_write+0x769/0xc80 fs/bcachefs/fs-io-direct.c:646 bch2_write_iter+0x9f/0x10b0 fs/bcachefs/fs-io-buffered.c:1048 call_write_iter include/linux/fs.h:1985 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x35d/0x430 fs/read_write.c:584 ksys_write+0x70/0xe0 fs/read_write.c:637 do_syscall_64+0x46/0xc0 entry_SYSCALL_64_after_hwframe+0x6f/0xd9 RIP: 0033:0x7f7fb207dd29 RSP: 002b:00007f7fb2dee0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f7fb21abf80 RCX: 00007f7fb207dd29 RDX: 00000000175d9003 RSI: 0000000020000200 RDI: 0000000000000004 RBP: 00007f7fb20ca47e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000006 R14: 00007f7fb21abf80 R15: 00007fff475f5ca8 Showing all locks held in the system: 1 lock held by khungtaskd/28: #0: ffffffff8397ec40 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30 include/trace/events/initcall.h:48 2 locks held by getty/1389: #0: ffff888107e740a0 (&tty->ldisc_sem){....}-{0:0}, at: tty_ldisc_ref_wait+0x20/0x40 drivers/tty/tty_ldisc.c:243 #1: ffffc90002c732f0 (&ldata->atomic_read_lock){....}-{3:3}, at: n_tty_read+0x218/0x8f0 drivers/tty/n_tty.c:2206 3 locks held by syz-executor.0/2357: #0: ffff88810ee470c8 (&f->f_pos_lock){....}-{3:3}, at: __fdget_pos+0xa1/0xc0 fs/file.c:1064 #1: ffff8881093983e8 (sb_writers#14){....}-{0:0}, at: ksys_write+0x70/0xe0 fs/read_write.c:637 #2: ffff8881790c8820 (&sb->s_type->i_mutex_key#18){....}-{3:3}, at: inode_lock include/linux/fs.h:802 [inline] #2: ffff8881790c8820 (&sb->s_type->i_mutex_key#18){....}-{3:3}, at: bch2_direct_write+0x66/0xc80 fs/bcachefs/fs-io-direct.c:592 1 lock held by bch-copygc/loop/2365: 2 locks held by syz-executor.0/4537: ============================================= NMI backtrace for cpu 1 CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.6.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x83/0xd0 lib/dump_stack.c:106 nmi_cpu_backtrace+0x146/0x160 lib/nmi_backtrace.c:113 nmi_trigger_cpumask_backtrace+0x8e/0x140 lib/nmi_backtrace.c:62 trigger_all_cpu_backtrace include/linux/nmi.h:160 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:222 [inline] watchdog+0x496/0x4c0 kernel/hung_task.c:379 kthread+0xe9/0x100 kernel/kthread.c:388 ret_from_fork+0x32/0x40 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:304 Sending NMI from CPU 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 PID: 2365 Comm: bch-copygc/loop Not tainted 6.6.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 RIP: 0010:btree_path_node fs/bcachefs/btree_iter.h:39 [inline] RIP: 0010:__btree_path_up_until_good_node+0x46/0x300 fs/bcachefs/btree_iter.c:1065 Code: c1 ed 0a 83 e5 07 48 8d 46 20 48 89 44 24 08 83 fd 03 0f 87 54 01 00 00 41 89 ee 01 ed 4b 8d 04 76 48 8b 4c 24 08 48 8d 1c c1 <48> 8b 03 48 85 c0 0f 84 33 01 00 00 41 89 ed 48 3d 00 f0 ff ff 0f RSP: 0018:ffffc9000272b648 EFLAGS: 00000297 RAX: 0000000000000000 RBX: ffff8881092a4220 RCX: 0000000000000004 RDX: 00000000000000cf RSI: 0000000000000000 RDI: ffff8881092a4000 RBP: 0000000000000006 R08: ffff8881092a4000 R09: ffffc9000272b978 R10: 0000000000000001 R11: 0000000000000000 R12: ffff8881092a41b8 R13: 0000000000000004 R14: 0000000000000003 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff888237c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7535ba8000 CR3: 0000000101f6c000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btree_path_up_until_good_node fs/bcachefs/btree_iter.c:1089 [inline] bch2_btree_path_traverse_one+0x908/0x9e0 fs/bcachefs/btree_iter.c:1129 bch2_btree_path_traverse fs/bcachefs/btree_iter.h:215 [inline] __bch2_btree_iter_peek fs/bcachefs/btree_iter.c:1973 [inline] bch2_btree_iter_peek_upto+0x2ec/0xea0 fs/bcachefs/btree_iter.c:2077 bch2_btree_iter_peek_upto_type fs/bcachefs/btree_iter.h:624 [inline] bch2_copygc_get_buckets fs/bcachefs/movinggc.c:162 [inline] bch2_copygc+0x15f/0xf20 fs/bcachefs/movinggc.c:205 bch2_copygc_thread+0x1ae/0x450 fs/bcachefs/movinggc.c:358 kthread+0xe9/0x100 kernel/kthread.c:388 ret_from_fork+0x32/0x40 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:304