INFO: task syz.2.56:5734 blocked for more than 147 seconds.
Not tainted 6.11.0-syzkaller-10669-g11a299a7933e #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.2.56 state:D stack:24032 pid:5734 tgid:5716 ppid:5217 flags:0x00000004
Call Trace:
context_switch kernel/sched/core.c:5315 [inline]
__schedule+0x1843/0x4ae0 kernel/sched/core.c:6675
__schedule_loop kernel/sched/core.c:6752 [inline]
schedule+0x14b/0x320 kernel/sched/core.c:6767
io_schedule+0x8d/0x110 kernel/sched/core.c:7552
folio_wait_bit_common+0x882/0x12b0 mm/filemap.c:1309
folio_wait_writeback+0xe7/0x1e0 mm/page-writeback.c:3189
truncate_inode_pages_range+0xafd/0xfc0 mm/truncate.c:398
bchfs_fallocate+0x2d1/0x730 fs/bcachefs/fs-io.c:718
bch2_fallocate_dispatch+0x3ac/0x540 fs/bcachefs/fs-io.c:771
vfs_fallocate+0x569/0x6e0 fs/open.c:333
do_vfs_ioctl+0x2583/0x2e40 fs/ioctl.c:886
__do_sys_ioctl fs/ioctl.c:905 [inline]
__se_sys_ioctl+0x81/0x170 fs/ioctl.c:893
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:0x7fb9e537df39
RSP: 002b:00007fb9e6090038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fb9e5536208 RCX: 00007fb9e537df39
RDX: 0000000020000180 RSI: 0000000040305839 RDI: 0000000000000009
RBP: 00007fb9e53f0216 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fb9e5536208 R15: 00007ffe56f86d58
Showing all locks held in the system:
6 locks held by kworker/u8:0/11:
#0: ffff88801baeb148 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline]
#0: ffff88801baeb148 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1850 kernel/workqueue.c:3310
#1: ffffc90000107d00 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline]
#1: ffffc90000107d00 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1850 kernel/workqueue.c:3310
#2: ffffffff8fcb2910 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0x16a/0xcc0 net/core/net_namespace.c:580
#3: ffff88806124f0e8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:1014 [inline]
#3: ffff88806124f0e8 (&dev->mutex){....}-{3:3}, at: devl_dev_lock net/devlink/devl_internal.h:108 [inline]
#3: ffff88806124f0e8 (&dev->mutex){....}-{3:3}, at: devlink_pernet_pre_exit+0x13b/0x440 net/devlink/core.c:506
#4: ffff88802ab00250 (&devlink->lock_key#9){+.+.}-{3:3}, at: devl_lock net/devlink/core.c:276 [inline]
#4: ffff88802ab00250 (&devlink->lock_key#9){+.+.}-{3:3}, at: devl_dev_lock net/devlink/devl_internal.h:109 [inline]
#4: ffff88802ab00250 (&devlink->lock_key#9){+.+.}-{3:3}, at: devlink_pernet_pre_exit+0x14d/0x440 net/devlink/core.c:506
#5: ffffffff8fcbf408 (rtnl_mutex){+.+.}-{3:3}, at: nsim_destroy+0x71/0x5c0 drivers/net/netdevsim/netdev.c:773
1 lock held by khungtaskd/30:
#0: ffffffff8e937ee0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#0: ffffffff8e937ee0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#0: ffffffff8e937ee0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6701
2 locks held by kworker/u8:2/35:
2 locks held by kworker/u8:3/53:
#0: ffff88801ac89148 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline]
#0: ffff88801ac89148 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1850 kernel/workqueue.c:3310
#1: ffffc90000be7d00 (connector_reaper_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline]
#1: ffffc90000be7d00 (connector_reaper_work){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1850 kernel/workqueue.c:3310
2 locks held by kworker/u8:5/142:
#0: ffff88801ac89148 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline]
#0: ffff88801ac89148 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1850 kernel/workqueue.c:3310
#1: ffff8880b8728948 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x441/0x770 kernel/sched/psi.c:989
2 locks held by getty/4975:
#0: ffff888032b2a0a0 (&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
2 locks held by kworker/1:3/5229:
#0: ffff88801ac80948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline]
#0: ffff88801ac80948 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1850 kernel/workqueue.c:3310
#1: ffffc900040e7d00 (free_ipc_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline]
#1: ffffc900040e7d00 (free_ipc_work){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1850 kernel/workqueue.c:3310
3 locks held by syz-executor/5437:
#0: ffff888074134d80 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close net/bluetooth/hci_core.c:481 [inline]
#0: ffff888074134d80 (&hdev->req_lock){+.+.}-{3:3}, at: hci_unregister_dev+0x203/0x510 net/bluetooth/hci_core.c:2698
#1: ffff888074134078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_close_sync+0x572/0x11a0 net/bluetooth/hci_sync.c:5183
#2: ffffffff8fe2bbe8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1972 [inline]
#2: ffffffff8fe2bbe8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xa6/0x240 net/bluetooth/hci_conn.c:2589
3 locks held by syz-executor/5583:
#0: ffff88807e298d80 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close net/bluetooth/hci_core.c:481 [inline]
#0: ffff88807e298d80 (&hdev->req_lock){+.+.}-{3:3}, at: hci_unregister_dev+0x203/0x510 net/bluetooth/hci_core.c:2698
#1: ffff88807e298078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_close_sync+0x572/0x11a0 net/bluetooth/hci_sync.c:5183
#2: ffffffff8fe2bbe8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1972 [inline]
#2: ffffffff8fe2bbe8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xa6/0x240 net/bluetooth/hci_conn.c:2589
1 lock held by syz.2.56/5717:
#0: ffff8880740e6420 (sb_writers#14){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2931 [inline]
#0: ffff8880740e6420 (sb_writers#14){.+.+}-{0:0}, at: vfs_write+0x224/0xc90 fs/read_write.c:679
1 lock held by syz.2.56/5732:
#0: ffff8880740e6420 (sb_writers#14){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2931 [inline]
#0: ffff8880740e6420 (sb_writers#14){.+.+}-{0:0}, at: vfs_writev+0x2d1/0xba0 fs/read_write.c:1062
2 locks held by syz.2.56/5734:
#0: ffff8880740e6420 (sb_writers#14){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2931 [inline]
#0: ffff8880740e6420 (sb_writers#14){.+.+}-{0:0}, at: vfs_fallocate+0x4fe/0x6e0 fs/open.c:332
#1: ffff88805bb917b0 (&sb->s_type->i_mutex_key#24){++++}-{3:3}, at: inode_lock include/linux/fs.h:815 [inline]
#1: ffff88805bb917b0 (&sb->s_type->i_mutex_key#24){++++}-{3:3}, at: bch2_fallocate_dispatch+0x1e2/0x540 fs/bcachefs/fs-io.c:762
1 lock held by bch-copygc/loop/5730:
4 locks held by syz-executor/6251:
#0: ffff88802f8f8d80 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close net/bluetooth/hci_core.c:481 [inline]
#0: ffff88802f8f8d80 (&hdev->req_lock){+.+.}-{3:3}, at: hci_unregister_dev+0x203/0x510 net/bluetooth/hci_core.c:2698
#1: ffff88802f8f8078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_close_sync+0x572/0x11a0 net/bluetooth/hci_sync.c:5183
#2: ffffffff8fe2bbe8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1972 [inline]
#2: ffffffff8fe2bbe8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xa6/0x240 net/bluetooth/hci_conn.c:2589
#3: ffffffff8e93d478 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:329 [inline]
#3: ffffffff8e93d478 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x451/0x830 kernel/rcu/tree_exp.h:976
2 locks held by syz.3.237/6983:
#0: ffff8880665480e0 (&type->s_umount_key#64/1){+.+.}-{3:3}, at: alloc_super+0x221/0x9d0 fs/super.c:344
#1: ffffffff8e93d340 (rcu_state.barrier_mutex){+.+.}-{3:3}, at: rcu_barrier+0x4c/0x530 kernel/rcu/tree.c:4561
=============================================
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 30 Comm: khungtaskd Not tainted 6.11.0-syzkaller-10669-g11a299a7933e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/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 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 5730 Comm: bch-copygc/loop Not tainted 6.11.0-syzkaller-10669-g11a299a7933e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:get_inc_field fs/bcachefs/bkey.c:172 [inline]
RIP: 0010:__bkey_unpack_pos+0x392/0x790 fs/bcachefs/bkey.c:302
Code: 89 f5 bf 40 00 00 00 44 89 f6 e8 49 74 87 fd 41 83 fe 3f 0f 87 49 03 00 00 e8 fa 6f 87 fd 89 e9 48 d3 eb 44 89 e9 48 d3 24 24 <4c> 09 e3 48 8b 44 24 18 48 8d 68 04 4c 8d 68 0b 48 89 e8 48 c1 e8
RSP: 0018:ffffc90003b16980 EFLAGS: 00000246
RAX: ffffffff840d44f6 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000040
RBP: 000000000000003f R08: ffffffff840d44e7 R09: 0000000000000000
R10: ffffc90003b16a80 R11: fffff52000762d52 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000040
FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7687dc1f98 CR3: 000000000e734000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
bkey_unpack_pos_format_checked fs/bcachefs/bkey.h:456 [inline]
bkey_unpack_pos fs/bcachefs/bkey.h:464 [inline]
__bch2_bkey_cmp_packed_format_checked_inlined fs/bcachefs/bkey_cmp.h:103 [inline]
__bch2_bkey_cmp_packed_format_checked+0x32c/0x800 fs/bcachefs/bkey.c:1021
bkey_cmp_p_or_unp fs/bcachefs/bset.h:291 [inline]
bkey_iter_cmp_p_or_unp fs/bcachefs/bset.h:400 [inline]
bch2_bset_search_linear fs/bcachefs/bset.c:1189 [inline]
bch2_btree_node_iter_init+0x234b/0x4280 fs/bcachefs/bset.c:1334
__btree_path_level_init fs/bcachefs/btree_iter.c:615 [inline]
bch2_btree_path_level_init+0x4d2/0x9f0 fs/bcachefs/btree_iter.c:635
btree_path_lock_root fs/bcachefs/btree_iter.c:769 [inline]
bch2_btree_path_traverse_one+0x10de/0x2940 fs/bcachefs/btree_iter.c:1170
bch2_btree_path_traverse fs/bcachefs/btree_iter.h:247 [inline]
__bch2_btree_iter_peek fs/bcachefs/btree_iter.c:2197 [inline]
bch2_btree_iter_peek_upto+0xb58/0x6f00 fs/bcachefs/btree_iter.c:2297
bch2_btree_iter_peek_upto_type fs/bcachefs/btree_iter.h:685 [inline]
bch2_copygc_get_buckets fs/bcachefs/movinggc.c:164 [inline]
bch2_copygc+0x8e2/0x4650 fs/bcachefs/movinggc.c:215
bch2_copygc_thread+0x737/0xc20 fs/bcachefs/movinggc.c:375
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