INFO: task syz.9.160:7363 blocked for more than 143 seconds.
Not tainted 6.12.0-rc7-syzkaller-00189-ge8bdb3c8be08 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.9.160 state:D stack:18040 pid:7363 tgid:7361 ppid:6997 flags:0x00004006
Call Trace:
context_switch kernel/sched/core.c:5328 [inline]
__schedule+0x17fa/0x4bd0 kernel/sched/core.c:6693
__schedule_loop kernel/sched/core.c:6770 [inline]
schedule+0x14b/0x320 kernel/sched/core.c:6785
__closure_sync+0x259/0x2f0 lib/closure.c:146
bch2_wait_on_allocator fs/bcachefs/alloc_foreground.h:239 [inline]
bch2_btree_update_start+0x11a2/0x14e0 fs/bcachefs/btree_update_interior.c:1269
bch2_btree_split_leaf+0x123/0x840 fs/bcachefs/btree_update_interior.c:1856
bch2_trans_commit_error+0x212/0x1390 fs/bcachefs/btree_trans_commit.c:942
__bch2_trans_commit+0x7ead/0x93c0 fs/bcachefs/btree_trans_commit.c:1140
bch2_trans_commit fs/bcachefs/btree_update.h:184 [inline]
bch2_logged_op_start+0x1c8/0x310 fs/bcachefs/logged_ops.c:92
bch2_truncate+0x19e/0x2d0 fs/bcachefs/io_misc.c:294
bchfs_truncate+0x85f/0xc90 fs/bcachefs/fs-io.c:464
notify_change+0xbca/0xe90 fs/attr.c:503
do_truncate+0x220/0x310 fs/open.c:65
handle_truncate fs/namei.c:3395 [inline]
do_open fs/namei.c:3778 [inline]
path_openat+0x2e1e/0x3590 fs/namei.c:3933
do_filp_open+0x235/0x490 fs/namei.c:3960
do_sys_openat2+0x13e/0x1d0 fs/open.c:1415
do_sys_open fs/open.c:1430 [inline]
__do_sys_openat fs/open.c:1446 [inline]
__se_sys_openat fs/open.c:1441 [inline]
__x64_sys_openat+0x247/0x2a0 fs/open.c:1441
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:0x7fa3f0b7e719
RSP: 002b:00007fa3f19be038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fa3f0d35f80 RCX: 00007fa3f0b7e719
RDX: 0000000000000300 RSI: 0000000020000200 RDI: ffffffffffffff9c
RBP: 00007fa3f0bf175e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fa3f0d35f80 R15: 00007ffe5e943bd8
INFO: task bch-copygc/loop:7403 blocked for more than 144 seconds.
Not tainted 6.12.0-rc7-syzkaller-00189-ge8bdb3c8be08 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:bch-copygc/loop state:D stack:20088 pid:7403 tgid:7403 ppid:2 flags:0x00004000
Call Trace:
context_switch kernel/sched/core.c:5328 [inline]
__schedule+0x17fa/0x4bd0 kernel/sched/core.c:6693
__schedule_loop kernel/sched/core.c:6770 [inline]
schedule+0x14b/0x320 kernel/sched/core.c:6785
__closure_sync+0x259/0x2f0 lib/closure.c:146
bch2_wait_on_allocator fs/bcachefs/alloc_foreground.h:239 [inline]
__bch2_write+0x562a/0x5dd0 fs/bcachefs/io_write.c:1501
bch2_write+0x9b5/0x1760 fs/bcachefs/io_write.c:1631
closure_queue include/linux/closure.h:270 [inline]
closure_call include/linux/closure.h:432 [inline]
bch2_data_update_read_done+0x22e/0x330 fs/bcachefs/data_update.c:426
move_write fs/bcachefs/move.c:133 [inline]
bch2_moving_ctxt_do_pending_writes+0x44c/0x8d0 fs/bcachefs/move.c:164
move_buckets_wait+0x182/0x1290 fs/bcachefs/movinggc.c:120
bch2_copygc_thread+0x83f/0xc20 fs/bcachefs/movinggc.c:392
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:
1 lock held by khungtaskd/30:
#0: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#0: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#0: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6720
2 locks held by getty/5583:
#0: ffff8880322870a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
#1: ffffc90002f062f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a6/0x1e00 drivers/tty/n_tty.c:2211
1 lock held by syz-executor/5799:
3 locks held by kworker/u8:11/6117:
5 locks held by syz.9.160/7363:
#0: ffff8880119ac420 (sb_writers#26){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:515
#1: ffff888056d688c8 (&sb->s_type->i_mutex_key#32){++++}-{3:3}, at: inode_lock include/linux/fs.h:815 [inline]
#1: ffff888056d688c8 (&sb->s_type->i_mutex_key#32){++++}-{3:3}, at: do_truncate+0x20c/0x310 fs/open.c:63
#2: ffff888056000a38 (&c->snapshot_create_lock){.+.+}-{3:3}, at: bch2_truncate+0x166/0x2d0 fs/bcachefs/io_misc.c:292
#3: ffff888056004398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:151 [inline]
#3: ffff888056004398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:250 [inline]
#3: ffff888056004398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7de/0xd20 fs/bcachefs/btree_iter.c:3228
#4: ffff8880560266d0 (&c->gc_lock){++++}-{3:3}, at: bch2_btree_update_start+0x682/0x14e0 fs/bcachefs/btree_update_interior.c:1197
1 lock held by syz-executor/9696:
#0: ffff8880514720e0 (&type->s_umount_key#59){++++}-{3:3}, at: __super_lock fs/super.c:56 [inline]
#0: ffff8880514720e0 (&type->s_umount_key#59){++++}-{3:3}, at: __super_lock_excl fs/super.c:71 [inline]
#0: ffff8880514720e0 (&type->s_umount_key#59){++++}-{3:3}, at: deactivate_super+0xb5/0xf0 fs/super.c:505
1 lock held by syz-executor/11108:
1 lock held by dhcpcd/11128:
#0: ffff88807ed19408 (&sb->s_type->i_mutex_key#9){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:815 [inline]
#0: ffff88807ed19408 (&sb->s_type->i_mutex_key#9){+.+.}-{3:3}, at: __sock_release net/socket.c:657 [inline]
#0: ffff88807ed19408 (&sb->s_type->i_mutex_key#9){+.+.}-{3:3}, at: sock_close+0x90/0x240 net/socket.c:1426
1 lock held by dhcpcd/11557:
#0: ffff88807c83b808 (&sb->s_type->i_mutex_key#9){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:815 [inline]
#0: ffff88807c83b808 (&sb->s_type->i_mutex_key#9){+.+.}-{3:3}, at: __sock_release net/socket.c:657 [inline]
#0: ffff88807c83b808 (&sb->s_type->i_mutex_key#9){+.+.}-{3:3}, at: sock_close+0x90/0x240 net/socket.c:1426
2 locks held by syz-executor/11644:
#0: ffff88807d0e80e0 (&type->s_umount_key#62){++++}-{3:3}, at: __super_lock fs/super.c:56 [inline]
#0: ffff88807d0e80e0 (&type->s_umount_key#62){++++}-{3:3}, at: __super_lock_excl fs/super.c:71 [inline]
#0: ffff88807d0e80e0 (&type->s_umount_key#62){++++}-{3:3}, at: deactivate_super+0xb5/0xf0 fs/super.c:505
#1: ffffffff8e93d200 (rcu_state.barrier_mutex){+.+.}-{3:3}, at: rcu_barrier+0x4c/0x530 kernel/rcu/tree.c:4562
1 lock held by dhcpcd-run-hook/13098:
=============================================
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 30 Comm: khungtaskd Not tainted 6.12.0-rc7-syzkaller-00189-ge8bdb3c8be08 #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:223 [inline]
watchdog+0xff4/0x1040 kernel/hung_task.c:379
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: 9696 Comm: syz-executor Not tainted 6.12.0-rc7-syzkaller-00189-ge8bdb3c8be08 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
RIP: 0010:preempt_latency_start kernel/sched/core.c:5779 [inline]
RIP: 0010:preempt_count_add+0xb1/0x190 kernel/sched/core.c:5802
Code: 8b 74 24 18 4c 89 f7 e8 3d 6c 0e 00 85 c0 74 0a 45 31 f6 31 ff e8 2f 6c 0e 00 65 48 8b 1c 25 80 d7 03 00 48 81 c3 c8 14 00 00 <48> 89 d8 48 c1 e8 03 42 80 3c 38 00 74 08 48 89 df e8 49 65 98 00
RSP: 0018:ffffc900108172a0 EFLAGS: 00000082
RAX: 0000000000000000 RBX: ffff8880309932c8 RCX: ffffffff8bc93500
RDX: 0000000000000000 RSI: ffffffff8c6038c0 RDI: 0000000000000000
RBP: ffffc90010817350 R08: ffffffff901be06f R09: 1ffffffff2037c0d
R10: dffffc0000000000 R11: fffffbfff2037c0e R12: 0000000000000246
R13: 1ffff92002102e58 R14: 0000000000000000 R15: dffffc0000000000
FS: 000055555648e500(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555851ea00d8 CR3: 0000000050d28000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:109 [inline]
_raw_spin_lock_irqsave+0xba/0x120 kernel/locking/spinlock.c:162
__debug_check_no_obj_freed lib/debugobjects.c:978 [inline]
debug_check_no_obj_freed+0x234/0x580 lib/debugobjects.c:1019
free_pages_prepare mm/page_alloc.c:1134 [inline]
free_unref_folios+0x52b/0x1a10 mm/page_alloc.c:2704
folios_put_refs+0x76c/0x860 mm/swap.c:993
folio_batch_release include/linux/pagevec.h:101 [inline]
shmem_undo_range+0x64c/0x1cf0 mm/shmem.c:1032
shmem_truncate_range mm/shmem.c:1144 [inline]
shmem_evict_inode+0x29b/0xa80 mm/shmem.c:1274
evict+0x4e8/0x9b0 fs/inode.c:725
__dentry_kill+0x20d/0x630 fs/dcache.c:615
dput+0x19f/0x2b0 fs/dcache.c:857
__fput+0x5d2/0x880 fs/file_table.c:439
task_work_run+0x24f/0x310 kernel/task_work.c:239
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+0x100/0x230 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f9c28b7d3aa
Code: 48 3d 00 f0 ff ff 77 48 c3 0f 1f 80 00 00 00 00 48 83 ec 18 89 7c 24 0c e8 13 8c 02 00 8b 7c 24 0c 89 c2 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 36 89 d7 89 44 24 0c e8 73 8c 02 00 8b 44 24
RSP: 002b:00007ffc781fa690 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000003 RCX: 00007f9c28b7d3aa
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00007ffc781fa6dc R08: 0000000000000000 R09: 00007ffc781fa3f7
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000032
R13: 000000000004df46 R14: 000000000004d824 R15: 00007ffc781fa730