INFO: task syz.1.40:6125 blocked for more than 143 seconds.
Not tainted 6.13.0-rc3-next-20241220-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.1.40 state:D stack:9360 pid:6125 tgid:6124 ppid:5843 flags:0x00004006
Call Trace:
context_switch kernel/sched/core.c:5371 [inline]
__schedule+0x189f/0x4c80 kernel/sched/core.c:6758
__schedule_loop kernel/sched/core.c:6835 [inline]
schedule+0x14b/0x320 kernel/sched/core.c:6850
bch2_btree_update_start+0x5b9/0x14e0 fs/bcachefs/btree_update_interior.c:1159
bch2_btree_split_leaf+0x121/0x880 fs/bcachefs/btree_update_interior.c:1862
bch2_trans_commit_error+0x212/0x1380 fs/bcachefs/btree_trans_commit.c:908
__bch2_trans_commit+0x8126/0x97a0 fs/bcachefs/btree_trans_commit.c:1085
bch2_trans_commit fs/bcachefs/btree_update.h:183 [inline]
bch2_extent_update+0x4c0/0xbb0 fs/bcachefs/io_write.c:326
bch2_write_index_default fs/bcachefs/io_write.c:374 [inline]
__bch2_write_index+0xee4/0x2160 fs/bcachefs/io_write.c:542
__bch2_write+0x57c0/0x5eb0 fs/bcachefs/io_write.c:1522
bch2_write+0x85b/0x15f0 fs/bcachefs/io_write.c:1649
closure_queue include/linux/closure.h:270 [inline]
closure_call include/linux/closure.h:432 [inline]
bch2_dio_write_loop fs/bcachefs/fs-io-direct.c:537 [inline]
bch2_direct_write+0x1b0b/0x3190 fs/bcachefs/fs-io-direct.c:660
bch2_write_iter+0x194/0x2c10 fs/bcachefs/fs-io-buffered.c:1047
new_sync_write fs/read_write.c:586 [inline]
vfs_write+0xacf/0xd10 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:0x7f2977d85d29
RSP: 002b:00007f2978b72038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f2977f75fa0 RCX: 00007f2977d85d29
RDX: 00000000175d9003 RSI: 0000000020000200 RDI: 0000000000000004
RBP: 00007f2977e01b08 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f2977f75fa0 R15: 00007fffcdf0e798
INFO: task bch-reclaim/loo:6153 blocked for more than 143 seconds.
Not tainted 6.13.0-rc3-next-20241220-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:bch-reclaim/loo state:D stack:13136 pid:6153 tgid:6153 ppid:2 flags:0x00004000
Call Trace:
context_switch kernel/sched/core.c:5371 [inline]
__schedule+0x189f/0x4c80 kernel/sched/core.c:6758
__schedule_loop kernel/sched/core.c:6835 [inline]
schedule+0x14b/0x320 kernel/sched/core.c:6850
schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6907
__mutex_lock_common kernel/locking/mutex.c:665 [inline]
__mutex_lock+0x7e7/0xee0 kernel/locking/mutex.c:735
btree_write_buffer_flush_seq+0x1c3f/0x1e10 fs/bcachefs/btree_write_buffer.c:548
bch2_btree_write_buffer_journal_flush+0xc7/0x150 fs/bcachefs/btree_write_buffer.c:565
journal_flush_pins+0x5f7/0xb20 fs/bcachefs/journal_reclaim.c:574
__bch2_journal_reclaim+0x789/0xda0 fs/bcachefs/journal_reclaim.c:707
bch2_journal_reclaim_thread+0x17a/0x570 fs/bcachefs/journal_reclaim.c:749
kthread+0x7a9/0x920 kernel/kthread.c:464
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Showing all locks held in the system:
1 lock held by pool_workqueue_/3:
#0: ffffffff8e93d278 (rcu_state.exp_mutex){+.+.}-{4:4}, at: exp_funnel_lock kernel/rcu/tree_exp.h:334 [inline]
#0: ffffffff8e93d278 (rcu_state.exp_mutex){+.+.}-{4:4}, at: synchronize_rcu_expedited+0x451/0x830 kernel/rcu/tree_exp.h:996
3 locks held by kworker/0:0/8:
#0: ffff888020767148 ((wq_completion)bcachefs_write_ref){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline]
#0: ffff888020767148 ((wq_completion)bcachefs_write_ref){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3310
#1: ffffc900000d7c60 ((work_completion)(&ca->discard_fast_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline]
#1: ffffc900000d7c60 ((work_completion)(&ca->discard_fast_work)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3310
#2: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:164 [inline]
#2: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:256 [inline]
#2: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7e4/0xd30 fs/bcachefs/btree_iter.c:3361
1 lock held by khungtaskd/30:
#0: ffffffff8e937da0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#0: ffffffff8e937da0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#0: ffffffff8e937da0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6744
3 locks held by kworker/1:1/51:
#0: ffff88801ac80d48 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline]
#0: ffff88801ac80d48 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3310
#1: ffffc90000bb7c60 (free_ipc_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline]
#1: ffffc90000bb7c60 (free_ipc_work){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3310
#2: ffffffff8e93d278 (rcu_state.exp_mutex){+.+.}-{4:4}, at: exp_funnel_lock kernel/rcu/tree_exp.h:302 [inline]
#2: ffffffff8e93d278 (rcu_state.exp_mutex){+.+.}-{4:4}, at: synchronize_rcu_expedited+0x381/0x830 kernel/rcu/tree_exp.h:996
5 locks held by kworker/u8:3/52:
#0: ffff88801e6d6148 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline]
#0: ffff88801e6d6148 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3310
#1: ffffc90000bd7c60 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline]
#1: ffffc90000bd7c60 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3310
#2: ffff8880345e00e0 (&type->s_umount_key#52){++++}-{4:4}, at: super_trylock_shared+0x22/0xf0 fs/super.c:562
#3: ffff888056579460 (&inode->ei_update_lock){+.+.}-{4:4}, at: bch2_vfs_write_inode+0x69/0xc0 fs/bcachefs/fs.c:1831
#4: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:164 [inline]
#4: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:256 [inline]
#4: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7e4/0xd30 fs/bcachefs/btree_iter.c:3361
4 locks held by kworker/u8:9/3552:
#0: ffff88802e686148 ((wq_completion)btree_update){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline]
#0: ffff88802e686148 ((wq_completion)btree_update){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3310
#1: ffffc9000cb07c60 ((work_completion)(&c->btree_interior_update_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline]
#1: ffffc9000cb07c60 ((work_completion)(&c->btree_interior_update_work)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3310
#2: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:164 [inline]
#2: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:256 [inline]
#2: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7e4/0xd30 fs/bcachefs/btree_iter.c:3361
#3: ffff888059e266d0 (&c->gc_lock){.+.+}-{4:4}, at: bch2_btree_update_start+0x682/0x14e0 fs/bcachefs/btree_update_interior.c:1191
2 locks held by getty/5585:
#0: ffff888034f090a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
#1: ffffc9000332b2f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x6a6/0x1e00 drivers/tty/n_tty.c:2211
4 locks held by kworker/0:3/5846:
3 locks held by kworker/1:5/5884:
#0: ffff888020767148 ((wq_completion)bcachefs_write_ref){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline]
#0: ffff888020767148 ((wq_completion)bcachefs_write_ref){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3310
#1: ffffc900043efc60 ((work_completion)(&ca->discard_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline]
#1: ffffc900043efc60 ((work_completion)(&ca->discard_work)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3310
#2: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:164 [inline]
#2: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:256 [inline]
#2: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7e4/0xd30 fs/bcachefs/btree_iter.c:3361
3 locks held by kworker/1:6/5885:
4 locks held by syz.1.40/6125:
#0: ffff88802fbc5cf8 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x254/0x320 fs/file.c:1192
#1: ffff8880345e0420 (sb_writers#17){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:3012 [inline]
#1: ffff8880345e0420 (sb_writers#17){.+.+}-{0:0}, at: vfs_write+0x225/0xd10 fs/read_write.c:675
#2: ffff888056579078 (&sb->s_type->i_mutex_key#25){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:863 [inline]
#2: ffff888056579078 (&sb->s_type->i_mutex_key#25){+.+.}-{4:4}, at: bch2_direct_write+0x244/0x3190 fs/bcachefs/fs-io-direct.c:604
#3: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:164 [inline]
#3: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:256 [inline]
#3: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_trans_srcu_lock+0x9a/0x1a0 fs/bcachefs/btree_iter.c:3186
3 locks held by bch-reclaim/loo/6153:
#0: ffff888059e4b028 (&j->reclaim_lock){+.+.}-{4:4}, at: bch2_journal_reclaim_thread+0x16d/0x570 fs/bcachefs/journal_reclaim.c:748
#1: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:164 [inline]
#1: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:256 [inline]
#1: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7e4/0xd30 fs/bcachefs/btree_iter.c:3361
#2: ffff888059e04720 (&wb->flushing.lock){+.+.}-{4:4}, at: btree_write_buffer_flush_seq+0x1c3f/0x1e10 fs/bcachefs/btree_write_buffer.c:548
3 locks held by bch-copygc/loop/6166:
#0: ffff888059e04720 (&wb->flushing.lock){+.+.}-{4:4}, at: bch2_btree_write_buffer_flush_nocheck_rw fs/bcachefs/btree_write_buffer.c:599 [inline]
#0: ffff888059e04720 (&wb->flushing.lock){+.+.}-{4:4}, at: bch2_btree_write_buffer_tryflush+0x14b/0x1c0 fs/bcachefs/btree_write_buffer.c:614
#1: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:164 [inline]
#1: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:256 [inline]
#1: ffff888059e04378 (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_trans_srcu_lock+0x9a/0x1a0 fs/bcachefs/btree_iter.c:3186
#2: ffff888059e266d0 (&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:10/6261:
5 locks held by kworker/u8:19/8534:
#0: ffff8880b863e998 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:598
#1: ffff8880b8628948 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x41d/0x7a0 kernel/sched/psi.c:987
#2: ffff8880b862a398 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x112/0x240 kernel/time/timer.c:1050
#3: ffffffff9a6c6430 (&obj_hash[i].lock){-.-.}-{2:2}, at: debug_object_activate+0x17f/0x580 lib/debugobjects.c:818
#4: ffffffff8e7e7ea8 (text_mutex){+.+.}-{4:4}, at: arch_jump_label_transform_apply+0x17/0x30 arch/x86/kernel/jump_label.c:145
1 lock held by syz.8.326/8604:
#0: ffffffff8fcbab48 (rtnl_mutex){+.+.}-{4:4}, at: tun_detach drivers/net/tun.c:702 [inline]
#0: ffffffff8fcbab48 (rtnl_mutex){+.+.}-{4:4}, at: tun_chr_close+0x3b/0x1b0 drivers/net/tun.c:3521
2 locks held by syz.6.329/8643:
#0: ffff888064108d80 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_do_close net/bluetooth/hci_core.c:480 [inline]
#0: ffff888064108d80 (&hdev->req_lock){+.+.}-{4:4}, at: hci_unregister_dev+0x203/0x510 net/bluetooth/hci_core.c:2697
#1: ffff888064108078 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x5c8/0x11c0 net/bluetooth/hci_sync.c:5209
1 lock held by dhcpcd/8650:
#0: ffff888062c04258 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1618 [inline]
#0: ffff888062c04258 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: packet_do_bind+0x32/0xcb0 net/packet/af_packet.c:3267
1 lock held by sed/8660:
=============================================
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 30 Comm: khungtaskd Not tainted 6.13.0-rc3-next-20241220-syzkaller #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:234 [inline]
watchdog+0xff6/0x1040 kernel/hung_task.c:397
kthread+0x7a9/0x920 kernel/kthread.c:464
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
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: 5845 Comm: kworker/u9:6 Not tainted 6.13.0-rc3-next-20241220-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Workqueue: hci1 hci_cmd_timeout
RIP: 0010:visit_lock_entry kernel/locking/lockdep.c:1532 [inline]
RIP: 0010:__bfs kernel/locking/lockdep.c:1812 [inline]
RIP: 0010:__bfs_backwards kernel/locking/lockdep.c:1856 [inline]
RIP: 0010:check_irq_usage kernel/locking/lockdep.c:2827 [inline]
RIP: 0010:check_prev_add kernel/locking/lockdep.c:3165 [inline]
RIP: 0010:check_prevs_add kernel/locking/lockdep.c:3280 [inline]
RIP: 0010:validate_chain+0x1fe4/0x5920 kernel/locking/lockdep.c:3904
Code: 41 b4 01 eb 0c 4d 8b 3f 4d 39 f7 0f 84 5d fc ff ff 49 8d 5f 30 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df 80 3c 08 00 <74> 08 48 89 df e8 a2 3d 8a 00 4c 89 2b 41 f6 c4 01 74 7f 8b 1d 47
RSP: 0018:ffffc9000414ed20 EFLAGS: 00000046
RAX: 1ffffffff2db10e5 RBX: ffffffff96d88728 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff93ce96a8
RBP: ffffc9000414f020 R08: ffffffff942d7847 R09: 1ffffffff285af08
R10: dffffc0000000000 R11: fffffbfff285af09 R12: dffffc0000000001
R13: ffffffff96d8b718 R14: ffffffff93ce9678 R15: ffffffff96d886f8
FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fffe834a438 CR3: 0000000048288000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
uart_port_lock_irqsave include/linux/serial_core.h:715 [inline]
serial8250_console_write+0x1a7/0x1ed0 drivers/tty/serial/8250/8250_port.c:3372
console_emit_next_record kernel/printk/printk.c:3122 [inline]
console_flush_all+0x869/0xeb0 kernel/printk/printk.c:3210
__console_flush_and_unlock kernel/printk/printk.c:3269 [inline]
console_unlock+0x14f/0x3b0 kernel/printk/printk.c:3309
vprintk_emit+0x730/0xa10 kernel/printk/printk.c:2432
_printk+0xd5/0x120 kernel/printk/printk.c:2457
bt_err+0x127/0x180 net/bluetooth/lib.c:296
hci_cmd_timeout+0x104/0x1e0 net/bluetooth/hci_core.c:1456
process_one_work kernel/workqueue.c:3229 [inline]
process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3310
worker_thread+0x870/0xd30 kernel/workqueue.c:3391
kthread+0x7a9/0x920 kernel/kthread.c:464
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244