INFO: task kworker/1:1H:58 blocked for more than 144 seconds. Not tainted 6.9.0-syzkaller-08414-g7ee332c9f12b #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/1:1H state:D stack:25208 pid:58 tgid:58 ppid:2 flags:0x00004000 Workqueue: bcachefs_btree_io btree_node_write_work Call Trace: context_switch kernel/sched/core.c:5409 [inline] __schedule+0x17e8/0x4a50 kernel/sched/core.c:6746 __schedule_loop kernel/sched/core.c:6823 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6838 six_lock_slowpath+0x660/0x16a0 fs/bcachefs/six.c:493 six_lock_ip_waiter+0x117/0x160 fs/bcachefs/six.c:550 __btree_node_lock_nopath fs/bcachefs/btree_locking.h:208 [inline] __bch2_btree_node_lock_write+0x11c/0x3c0 fs/bcachefs/btree_locking.c:429 __btree_node_lock_write fs/bcachefs/btree_locking.h:298 [inline] bch2_btree_node_lock_write_nofail+0x24c/0x440 fs/bcachefs/btree_locking.c:443 __bch2_btree_node_update_key fs/bcachefs/btree_update_interior.c:2390 [inline] bch2_btree_node_update_key+0x16ff/0x3260 fs/bcachefs/btree_update_interior.c:2450 bch2_btree_node_update_key_get_iter+0x87a/0xab0 fs/bcachefs/btree_update_interior.c:2494 btree_node_write_work+0x8a2/0xe10 fs/bcachefs/btree_io.c:1870 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2e/0x1830 kernel/workqueue.c:3312 worker_thread+0x86d/0xd70 kernel/workqueue.c:3393 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Showing all locks held in the system: 4 locks held by kworker/u8:0/11: 1 lock held by khungtaskd/30: #0: ffffffff8e3343a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #0: ffffffff8e3343a0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #0: ffffffff8e3343a0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6614 4 locks held by kworker/1:1H/58: #0: ffff88805fc24948 ((wq_completion)bcachefs_btree_io){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] ffff88805fc24948 ((wq_completion)bcachefs_btree_io){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc9000133fd00 ((work_completion)(&wb->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] #1: ffffc9000133fd00 ((work_completion)(&wb->work)){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 #2: ffff888067904250 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:116 [inline] #2: ffff888067904250 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:215 [inline] #2: ffff888067904250 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x911/0xd30 fs/bcachefs/btree_iter.c:3069 #3: ffff88807db4f070 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #3: ffff88807db4f070 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #3: ffff88807db4f070 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:760 [inline] #3: ffff88807db4f070 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xa85/0x3250 fs/bcachefs/btree_iter.c:1178 3 locks held by kworker/u8:10/2811: #0: ffff8880b943e658 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:559 #1: ffff8880b9428948 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x441/0x770 kernel/sched/psi.c:988 #2: ffff88801fb970d8 (&lo->lo_work_lock){..-.}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:376 [inline] #2: ffff88801fb970d8 (&lo->lo_work_lock){..-.}-{2:2}, at: loop_process_work+0x1995/0x1e60 drivers/block/loop.c:1945 2 locks held by getty/4851: #0: ffff88802f5180a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243 #1: ffffc900031332f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6b5/0x1e10 drivers/tty/n_tty.c:2201 5 locks held by kworker/u9:9/5133: #0: ffff8880601c5148 ((wq_completion)bcachefs){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] #0: ffff8880601c5148 ((wq_completion)bcachefs){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc900049d7d00 ((work_completion)(&wp->index_update_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] #1: ffffc900049d7d00 ((work_completion)(&wp->index_update_work)){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 #2: ffff888067904250 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:116 [inline] #2: ffff888067904250 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:215 [inline] #2: ffff888067904250 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x911/0xd30 fs/bcachefs/btree_iter.c:3069 #3: ffff8880541a2870 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #3: ffff8880541a2870 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #3: ffff8880541a2870 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:760 [inline] #3: ffff8880541a2870 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xa85/0x3250 fs/bcachefs/btree_iter.c:1178 #4: ffff88807db4f070 (&dev->mutex){....}-{3:3}, at: bch2_trans_iter_init fs/bcachefs/btree_iter.h:487 [inline] #4: ffff88807db4f070 (&dev->mutex){....}-{3:3}, at: bch2_write_index_default fs/bcachefs/io_write.c:369 [inline] #4: ffff88807db4f070 (&dev->mutex){....}-{3:3}, at: __bch2_write_index+0xbc3/0x2190 fs/bcachefs/io_write.c:528 4 locks held by syz-executor.1/7395: 4 locks held by syz-executor.1/7718: 1 lock held by syz-executor.4/9239: #0: ffffffff8e339778 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:323 [inline] #0: ffffffff8e339778 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x451/0x830 kernel/rcu/tree_exp.h:939 2 locks held by syz-executor.3/9266: 4 locks held by syz-executor.1/9295: #0: ffff8880b943e658 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:559 #1: ffff8880b9428948 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x441/0x770 kernel/sched/psi.c:988 #2: ffff8880b943e658 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:559 #3: ffff8880b9428948 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_change+0xfd/0x280 kernel/sched/psi.c:912 ============================================= NMI backtrace for cpu 1 CPU: 1 PID: 30 Comm: khungtaskd Not tainted 6.9.0-syzkaller-08414-g7ee332c9f12b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 nmi_cpu_backtrace+0x49c/0x4d0 lib/nmi_backtrace.c:113 nmi_trigger_cpumask_backtrace+0x198/0x320 lib/nmi_backtrace.c:62 trigger_all_cpu_backtrace include/linux/nmi.h:160 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:223 [inline] watchdog+0xfde/0x1020 kernel/hung_task.c:380 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Sending NMI from CPU 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 PID: 8481 Comm: syz-executor.4 Not tainted 6.9.0-syzkaller-08414-g7ee332c9f12b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 RIP: 0010:rdtsc_ordered arch/x86/include/asm/msr.h:230 [inline] RIP: 0010:delay_tsc+0x73/0xe0 arch/x86/lib/delay.c:72 Code: 00 e8 f1 be e1 f5 65 8b 05 92 ec 7f 74 85 c0 74 2f f3 90 bf 01 00 00 00 e8 3a bd e1 f5 e8 e5 02 04 00 41 39 c7 75 20 0f 01 f9 <90> 90 48 89 d5 48 c1 e5 20 48 09 c5 48 29 dd 49 39 ee 77 be eb 23 RSP: 0018:ffffc90004327458 EFLAGS: 00000046 RAX: 00000000551a943d RBX: 000000e9551a8b0d RCX: 0000000000000000 RDX: 00000000000000e9 RSI: ffffffff8c1fabc0 RDI: ffffffff8c1fab80 RBP: 000000000000089d R08: ffffffff853ca87a R09: 1ffff11003f16046 R10: dffffc0000000000 R11: ffffffff8b83e6a0 R12: dffffc0000000000 R13: 0000000000002693 R14: 0000000000000993 R15: 0000000000000000 FS: 00005555763d2480(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f22ab0d66e4 CR3: 0000000054a02000 CR4: 0000000000350ef0 Call Trace: wait_for_lsr drivers/tty/serial/8250/8250_port.c:2077 [inline] serial8250_console_fifo_write drivers/tty/serial/8250/8250_port.c:3318 [inline] serial8250_console_write+0x104e/0x1770 drivers/tty/serial/8250/8250_port.c:3396 console_emit_next_record kernel/printk/printk.c:2913 [inline] console_flush_all+0x867/0xfd0 kernel/printk/printk.c:2979 console_unlock+0x13b/0x4d0 kernel/printk/printk.c:3048 vprintk_emit+0x5a6/0x770 kernel/printk/printk.c:2348 _printk+0xd5/0x120 kernel/printk/printk.c:2373 _btrfs_printk+0x59c/0x5c0 fs/btrfs/messages.c:246 btrfs_put_super+0x69/0x80 fs/btrfs/super.c:72 generic_shutdown_super+0x138/0x2d0 fs/super.c:641 kill_anon_super+0x3b/0x70 fs/super.c:1225 btrfs_kill_super+0x41/0x50 fs/btrfs/super.c:2088 deactivate_locked_super+0xc6/0x130 fs/super.c:472 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1267 task_work_run+0x251/0x310 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x168/0x370 kernel/entry/common.c:218 do_syscall_64+0x102/0x240 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7feedba7e217 Code: b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffc8899d938 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007feedba7e217 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffc8899d9f0 RBP: 00007ffc8899d9f0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffc8899eab0 R13: 00007feedbac8336 R14: 00007feedbadc840 R15: 0000000000000000