INFO: task syz.3.13:5953 blocked for more than 143 seconds. Not tainted 6.12.0-rc6-next-20241108-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz.3.13 state:D stack:20304 pid:5953 tgid:5952 ppid:5828 flags:0x00004006 Call Trace: context_switch kernel/sched/core.c:5369 [inline] __schedule+0x1850/0x4c30 kernel/sched/core.c:6753 __schedule_loop kernel/sched/core.c:6830 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6845 __closure_sync+0x259/0x2f0 lib/closure.c:146 closure_sync include/linux/closure.h:195 [inline] bch2_btree_interior_updates_flush+0x1ef/0x370 fs/bcachefs/btree_update_interior.c:2614 __bch2_fs_read_only+0x105/0x430 fs/bcachefs/super.c:274 bch2_fs_read_only+0xbb9/0x1270 fs/bcachefs/super.c:355 __bch2_fs_stop+0x105/0x5c0 fs/bcachefs/super.c:622 bch2_fs_stop+0x15/0x20 fs/bcachefs/super.c:679 bch2_fs_get_tree+0xd9f/0x1710 fs/bcachefs/fs.c:2279 vfs_get_tree+0x90/0x2b0 fs/super.c:1814 do_new_mount+0x2be/0xb40 fs/namespace.c:3507 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4057 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4034 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4b8517feba RSP: 002b:00007f4b85f40e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f4b85f40ef0 RCX: 00007f4b8517feba RDX: 00000000200000c0 RSI: 0000000020000000 RDI: 00007f4b85f40eb0 RBP: 00000000200000c0 R08: 00007f4b85f40ef0 R09: 0000000000800000 R10: 0000000000800000 R11: 0000000000000246 R12: 0000000020000000 R13: 00007f4b85f40eb0 R14: 0000000000005906 R15: 0000000020000100 INFO: task bch-reclaim/loo:5991 blocked for more than 143 seconds. Not tainted 6.12.0-rc6-next-20241108-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:bch-reclaim/loo state:D stack:21592 pid:5991 tgid:5991 ppid:2 flags:0x00004000 Call Trace: context_switch kernel/sched/core.c:5369 [inline] __schedule+0x1850/0x4c30 kernel/sched/core.c:6753 __schedule_loop kernel/sched/core.c:6830 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6845 schedule_timeout+0x15a/0x290 kernel/time/sleep_timeout.c:99 __closure_sync_timeout+0x2d8/0x450 lib/closure.c:217 closure_sync_timeout include/linux/closure.h:206 [inline] __bch2_wait_on_allocator+0x11a/0x250 fs/bcachefs/alloc_foreground.c:1754 bch2_wait_on_allocator fs/bcachefs/alloc_foreground.h:239 [inline] bch2_btree_update_start+0x11a5/0x14e0 fs/bcachefs/btree_update_interior.c:1263 bch2_btree_split_leaf+0x121/0x880 fs/bcachefs/btree_update_interior.c:1857 bch2_trans_commit_error+0x212/0x1390 fs/bcachefs/btree_trans_commit.c:918 __bch2_trans_commit+0x8069/0x9610 fs/bcachefs/btree_trans_commit.c:1099 bch2_trans_commit fs/bcachefs/btree_update.h:182 [inline] bch2_btree_write_buffer_flush_locked+0x4f72/0x5a40 fs/bcachefs/btree_write_buffer.c:429 btree_write_buffer_flush_seq+0x1a43/0x1bc0 fs/bcachefs/btree_write_buffer.c:510 bch2_btree_write_buffer_journal_flush+0x4e/0x80 fs/bcachefs/btree_write_buffer.c:525 journal_flush_pins+0x5f7/0xb20 fs/bcachefs/journal_reclaim.c:565 __bch2_journal_reclaim+0x789/0xdc0 fs/bcachefs/journal_reclaim.c:698 bch2_journal_reclaim_thread+0x17a/0x570 fs/bcachefs/journal_reclaim.c:740 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/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: 2 locks held by kworker/u8:1/12: 1 lock held by khungtaskd/30: #0: ffffffff8e93c560 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #0: ffffffff8e93c560 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #0: ffffffff8e93c560 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6744 6 locks held by kworker/u8:3/36: #0: ffff8880b873e798 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:598 #1: ffff8880b8728948 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x41d/0x7a0 kernel/sched/psi.c:987 #2: ffff888142fd00d8 (&wb->list_lock){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline] #2: ffff888142fd00d8 (&wb->list_lock){+.+.}-{3:3}, at: __wb_update_bandwidth+0x89/0x900 mm/page-writeback.c:1538 #3: ffffffff9a64efe8 (&obj_hash[i].lock){-.-.}-{2:2}, at: debug_object_activate+0x17f/0x580 lib/debugobjects.c:818 #4: ffffffff9a600ee0 (&obj_hash[i].lock){-.-.}-{2:2}, at: __debug_check_no_obj_freed lib/debugobjects.c:1088 [inline] #4: ffffffff9a600ee0 (&obj_hash[i].lock){-.-.}-{2:2}, at: debug_check_no_obj_freed+0x234/0x580 lib/debugobjects.c:1129 #5: ffff88813fffc298 (&zone->lock){-.-.}-{3:3}, at: rmqueue_bulk mm/page_alloc.c:2343 [inline] #5: ffff88813fffc298 (&zone->lock){-.-.}-{3:3}, at: __rmqueue_pcplist+0x4c6/0x2b70 mm/page_alloc.c:3037 2 locks held by kworker/u8:5/1110: 2 locks held by getty/5585: #0: ffff88814d54c0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243 #1: ffffc90002f162f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x6a6/0x1e00 drivers/tty/n_tty.c:2211 1 lock held by syz.3.13/5953: #0: ffff88805c600278 (&c->state_lock){+.+.}-{4:4}, at: __bch2_fs_stop+0xfd/0x5c0 fs/bcachefs/super.c:621 4 locks held by bch-reclaim/loo/5991: #0: ffff88805c64b128 (&j->reclaim_lock){+.+.}-{4:4}, at: bch2_journal_reclaim_thread+0x16d/0x570 fs/bcachefs/journal_reclaim.c:739 #1: ffff88805c6043a8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:158 [inline] #1: ffff88805c6043a8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:255 [inline] #1: ffff88805c6043a8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7e4/0xd30 fs/bcachefs/btree_iter.c:3378 #2: ffff88805c604750 (&wb->flushing.lock){+.+.}-{4:4}, at: btree_write_buffer_flush_seq+0x1a39/0x1bc0 fs/bcachefs/btree_write_buffer.c:509 #3: ffff88805c626710 (&c->gc_lock){.+.+}-{4:4}, at: bch2_btree_update_start+0x682/0x14e0 fs/bcachefs/btree_update_interior.c:1191 3 locks held by kworker/u8:12/6917: 2 locks held by syz.8.419/8478: 1 lock held by syz.6.421/8485: #0: ffff888011b781e0 (&mm->mmap_lock){++++}-{4:4}, at: mmap_write_lock_killable include/linux/mmap_lock.h:147 [inline] #0: ffff888011b781e0 (&mm->mmap_lock){++++}-{4:4}, at: vm_mmap_pgoff+0x182/0x430 mm/util.c:578 2 locks held by syz.6.421/8492: 1 lock held by syz.1.424/8488: 1 lock held by syz.7.426/8495: 2 locks held by dhcpcd/8498: #0: ffff8880786e6208 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:817 [inline] #0: ffff8880786e6208 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: __sock_release net/socket.c:639 [inline] #0: ffff8880786e6208 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: sock_close+0x90/0x240 net/socket.c:1408 #1: ffffffff8e941af8 (rcu_state.exp_mutex){+.+.}-{4:4}, at: exp_funnel_lock kernel/rcu/tree_exp.h:297 [inline] #1: ffffffff8e941af8 (rcu_state.exp_mutex){+.+.}-{4:4}, at: synchronize_rcu_expedited+0x381/0x830 kernel/rcu/tree_exp.h:976 1 lock held by dhcpcd/8503: #0: ffff888026600258 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1617 [inline] #0: ffff888026600258 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: packet_do_bind+0x32/0xcb0 net/packet/af_packet.c:3267 ============================================= NMI backtrace for cpu 0 CPU: 0 UID: 0 PID: 30 Comm: khungtaskd Not tainted 6.12.0-rc6-next-20241108-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 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:162 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:234 [inline] watchdog+0xffb/0x1040 kernel/hung_task.c:397 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/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 UID: 0 PID: 8478 Comm: syz.8.419 Not tainted 6.12.0-rc6-next-20241108-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 RIP: 0010:_test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] RIP: 0010:hlock_class kernel/locking/lockdep.c:228 [inline] RIP: 0010:check_wait_context kernel/locking/lockdep.c:4875 [inline] RIP: 0010:__lock_acquire+0x890/0x2100 kernel/locking/lockdep.c:5176 Code: 0f 83 1b 02 00 00 4c 89 f8 48 c1 e8 03 0f b6 04 10 84 c0 0f 85 4c 01 00 00 41 8b 5d 00 81 e3 ff 1f 00 00 48 89 d8 48 c1 e8 06 <48> 8d 3c c5 80 88 2b 94 be 08 00 00 00 e8 de 47 8f 00 48 0f a3 1d RSP: 0018:ffffc9000356f3b0 EFLAGS: 00000006 RAX: 0000000000000017 RBX: 00000000000005c7 RCX: 0000000000000001 RDX: dffffc0000000000 RSI: ffff88802f850ae0 RDI: ffffffff942b8880 RBP: 00000000ffffffff R08: ffffffff942b8887 R09: 1ffffffff2857110 R10: dffffc0000000000 R11: fffffbfff2857111 R12: 0000000000000000 R13: ffff88802f850b00 R14: 0000000000000000 R15: ffff88802f850b00 FS: 00007fd75c7f66c0(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005629288fa680 CR3: 0000000055cde000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 rcu_lock_acquire include/linux/rcupdate.h:337 [inline] rcu_read_lock include/linux/rcupdate.h:849 [inline] __lruvec_stat_mod_folio+0x9a/0x300 mm/memcontrol.c:799 shmem_add_to_page_cache+0xaa0/0x1690 mm/shmem.c:826 shmem_alloc_and_add_folio+0x96a/0x13d0 mm/shmem.c:1861 shmem_get_folio_gfp+0x5a9/0x20a0 mm/shmem.c:2357 shmem_get_folio mm/shmem.c:2463 [inline] shmem_write_begin+0x17e/0x460 mm/shmem.c:3119 generic_perform_write+0x344/0x6d0 mm/filemap.c:4055 shmem_file_write_iter+0xf9/0x120 mm/shmem.c:3295 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fd75e37d1ff Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 c9 8d 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 1c 8e 02 00 48 RSP: 002b:00007fd75c7f5df0 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000001000000 RCX: 00007fd75e37d1ff RDX: 0000000001000000 RSI: 00007fd754200000 RDI: 0000000000000006 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000004709 R10: 0000000000000002 R11: 0000000000000293 R12: 0000000000000006 R13: 00007fd75c7f5ef0 R14: 00007fd75c7f5eb0 R15: 00007fd754200000