INFO: task kworker/0:0H:10 blocked for more than 143 seconds. Not tainted 6.9.0-syzkaller-08414-g7ee332c9f12b #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/0:0H state:D stack:25208 pid:10 tgid:10 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 INFO: task kworker/u9:0:53 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/u9:0 state:D stack:25592 pid:53 tgid:53 ppid:2 flags:0x00004000 Workqueue: bcachefs bch2_write_point_do_index_updates 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] btree_node_lock_nopath+0xb6/0x160 fs/bcachefs/btree_locking.h:221 btree_node_lock fs/bcachefs/btree_locking.h:268 [inline] btree_path_lock_root fs/bcachefs/btree_iter.c:760 [inline] bch2_btree_path_traverse_one+0xc78/0x3250 fs/bcachefs/btree_iter.c:1178 bch2_extent_update+0x11b/0xbb0 fs/bcachefs/io_write.c:289 bch2_write_index_default fs/bcachefs/io_write.c:374 [inline] __bch2_write_index+0xee9/0x2190 fs/bcachefs/io_write.c:528 bch2_write_point_do_index_updates+0x32e/0x690 fs/bcachefs/io_write.c:637 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/0:0H/10: #0: ffff888060068948 ((wq_completion)bcachefs_btree_io){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] #0: ffff888060068948 ((wq_completion)bcachefs_btree_io){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc900000f7d00 ((work_completion)(&wb->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] #1: ffffc900000f7d00 ((work_completion)(&wb->work)){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 #2: ffff88804fc04250 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:116 [inline] #2: ffff88804fc04250 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:215 [inline] #2: ffff88804fc04250 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x911/0xd30 fs/bcachefs/btree_iter.c:3069 #3: ffff88802c795870 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #3: ffff88802c795870 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #3: ffff88802c795870 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:760 [inline] #3: ffff88802c795870 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xa85/0x3250 fs/bcachefs/btree_iter.c:1178 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 3 locks held by kworker/u8:3/51: 5 locks held by kworker/u9:0/53: #0: ffff8880744e5148 ((wq_completion)bcachefs){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] #0: ffff8880744e5148 ((wq_completion)bcachefs){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc90000bd7d00 ((work_completion)(&wp->index_update_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] #1: ffffc90000bd7d00 ((work_completion)(&wp->index_update_work)){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 #2: ffff88804fc04250 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:116 [inline] #2: ffff88804fc04250 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:215 [inline] #2: ffff88804fc04250 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x911/0xd30 fs/bcachefs/btree_iter.c:3069 #3: ffff888066c8b870 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #3: ffff888066c8b870 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #3: ffff888066c8b870 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:760 [inline] #3: ffff888066c8b870 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xa85/0x3250 fs/bcachefs/btree_iter.c:1178 #4: ffff88802c795870 (&dev->mutex){....}-{3:3}, at: bch2_trans_iter_init fs/bcachefs/btree_iter.h:487 [inline] #4: ffff88802c795870 (&dev->mutex){....}-{3:3}, at: bch2_write_index_default fs/bcachefs/io_write.c:369 [inline] #4: ffff88802c795870 (&dev->mutex){....}-{3:3}, at: __bch2_write_index+0xbc3/0x2190 fs/bcachefs/io_write.c:528 3 locks held by kworker/0:2/781: #0: ffff888015078948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] #0: ffff888015078948 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc9000376fd00 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] #1: ffffc9000376fd00 ((linkwatch_work).work){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 #2: ffffffff8f5e0608 (rtnl_mutex){+.+.}-{3:3}, at: linkwatch_event+0xe/0x60 net/core/link_watch.c:276 2 locks held by getty/4850: #0: ffff88802a7970a0 (&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 2 locks held by kworker/1:9/6756: #0: ffff888015078948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] #0: ffff888015078948 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc9000cb2fd00 ((work_completion)(&fw_work->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] #1: ffffc9000cb2fd00 ((work_completion)(&fw_work->work)){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 3 locks held by kworker/0:16/6787: #0: ffff888015078948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] #0: ffff888015078948 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc900095b7d00 (deferred_process_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] #1: ffffc900095b7d00 (deferred_process_work){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 #2: ffffffff8f5e0608 (rtnl_mutex){+.+.}-{3:3}, at: switchdev_deferred_process_work+0xe/0x20 net/switchdev/switchdev.c:104 4 locks held by syz-executor.1/9417: 3 locks held by kworker/u8:15/9453: #0: ffff8880b943e658 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:559 #1: ffffc9000c2a7d00 ((work_completion)(&(&bat_priv->nc.work)->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] #1: ffffc9000c2a7d00 ((work_completion)(&(&bat_priv->nc.work)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 #2: ffff8880b942a718 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x112/0x240 kernel/time/timer.c:1052 1 lock held by syz-executor.4/9708: #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 1 lock held by syz-executor.0/11628: #0: ffff888011286e10 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:791 [inline] #0: ffff888011286e10 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release net/socket.c:658 [inline] #0: ffff888011286e10 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: sock_close+0x90/0x240 net/socket.c:1421 2 locks held by syz-executor.3/11634: #0: ffffffff8f5e0608 (rtnl_mutex){+.+.}-{3:3}, at: tun_detach drivers/net/tun.c:698 [inline] #0: ffffffff8f5e0608 (rtnl_mutex){+.+.}-{3:3}, at: tun_chr_close+0x3e/0x1b0 drivers/net/tun.c:3500 #1: ffffffff8e339778 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:323 [inline] #1: ffffffff8e339778 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x451/0x830 kernel/rcu/tree_exp.h:939 1 lock held by syz-executor.5/11643: #0: ffffffff8f09cf48 (input_mutex){+.+.}-{3:3}, at: __input_unregister_device+0x308/0x630 drivers/input/input.c:2219 ============================================= NMI backtrace for cpu 0 CPU: 0 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 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 PID: 9417 Comm: syz-executor.1 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:__trans_next_path fs/bcachefs/btree_iter.h:99 [inline] RIP: 0010:bch2_trans_relock+0x1c7/0x1130 fs/bcachefs/btree_locking.c:736 Code: 80 3c 08 00 74 08 48 89 df e8 65 4c e6 fd 4d 8b 2e 44 89 e1 49 d3 ed 31 ff 4c 89 ee e8 12 3d 81 fd 4d 85 ed 75 22 41 83 c7 40 <41> 83 e7 c0 44 3b 7c 24 18 0f 83 64 01 00 00 49 83 c6 08 e8 11 38 RSP: 0018:ffffc9000c637480 EFLAGS: 00000206 RAX: 0000000000000002 RBX: ffff888024a00190 RCX: ffff8880599bda00 RDX: ffffc9000a2ed000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc9000c637630 R08: ffffffff8414f91e R09: ffffc9000c637520 R10: dffffc0000000000 R11: fffff520018c6ea6 R12: 0000000000000004 R13: 0000000000000000 R14: ffff888024a00190 R15: 0000000000000044 FS: 00007f02f346b6c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002097b000 CR3: 0000000068980000 CR4: 0000000000350ef0 Call Trace: __bch2_read+0x128c/0x2090 fs/bcachefs/io_read.c:1125 bch2_read fs/bcachefs/io_read.h:138 [inline] bch2_direct_IO_read fs/bcachefs/fs-io-direct.c:160 [inline] bch2_read_iter+0xce1/0x1430 fs/bcachefs/fs-io-direct.c:201 call_read_iter include/linux/fs.h:2114 [inline] new_sync_read fs/read_write.c:395 [inline] vfs_read+0x97d/0xb70 fs/read_write.c:476 ksys_read+0x1a0/0x2c0 fs/read_write.c:619 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f02f267cee9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f02f346b0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007f02f27abf80 RCX: 00007f02f267cee9 RDX: 00000000fffffd9f RSI: 0000000020000280 RDI: 0000000000000005 RBP: 00007f02f26c949e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f02f27abf80 R15: 00007ffeaf853298