INFO: task kworker/u8:4:5908 blocked for more than 143 seconds.
      Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u8:4    state:D stack:22968 pid:5908  tgid:5908  ppid:2      task_flags:0x4208060 flags:0x00004000
Workqueue: btree_node_rewrite async_btree_node_rewrite_work
Call Trace:
 <TASK>
 __schedule+0x1798/0x4cc0
 schedule+0x165/0x360
 __closure_sync+0x163/0x220
 bch2_btree_update_start+0x18dc/0x1de0
 bch2_btree_node_rewrite+0x17e/0x1120
 bch2_btree_node_rewrite_key+0x273/0x320
 async_btree_node_rewrite_work+0x110/0x4f0
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </TASK>
INFO: task syz.9.1272:12396 blocked for more than 143 seconds.
      Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.9.1272      state:D stack:19816 pid:12396 tgid:12395 ppid:11365  task_flags:0x400140 flags:0x00004006
Call Trace:
 <TASK>
 __schedule+0x1798/0x4cc0
 schedule+0x165/0x360
 __closure_sync+0x163/0x220
 bch2_btree_update_start+0x18dc/0x1de0
 bch2_btree_split_leaf+0x14b/0x8e0
 bch2_trans_commit_error+0x1b7/0x1130
 __bch2_trans_commit+0x1bb5/0x8870
 bch2_journal_replay+0x1e85/0x2630
 __bch2_run_recovery_passes+0x3bd/0x1060
 bch2_run_recovery_passes+0x184/0x210
 bch2_fs_recovery+0x2690/0x3a50
 bch2_fs_start+0xaaf/0xda0
 bch2_fs_get_tree+0xb39/0x1520
 vfs_get_tree+0x92/0x2b0
 do_new_mount+0x2a2/0x9e0
 __se_sys_mount+0x317/0x410
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fe590b9038a
RSP: 002b:00007fe591a4fe68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fe591a4fef0 RCX: 00007fe590b9038a
RDX: 00002000000003c0 RSI: 0000200000000000 RDI: 00007fe591a4feb0
RBP: 00002000000003c0 R08: 00007fe591a4fef0 R09: 000000000180c844
R10: 000000000180c844 R11: 0000000000000246 R12: 0000200000000000
R13: 00007fe591a4feb0 R14: 0000000000005960 R15: 0000200000000180
 </TASK>
INFO: task bch-reclaim/loo:12407 blocked for more than 143 seconds.
      Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:bch-reclaim/loo state:D stack:23944 pid:12407 tgid:12407 ppid:2      task_flags:0x200840 flags:0x00004000
Call Trace:
 <TASK>
 __schedule+0x1798/0x4cc0
 schedule+0x165/0x360
 __closure_sync+0x163/0x220
 bch2_btree_update_start+0x18dc/0x1de0
 bch2_btree_split_leaf+0x14b/0x8e0
 bch2_trans_commit_error+0x1b7/0x1130
 __bch2_trans_commit+0x1bb5/0x8870
 bch2_btree_write_buffer_flush_locked+0x451f/0x4dd0
 btree_write_buffer_flush_seq+0x18c7/0x1a40
 bch2_btree_write_buffer_journal_flush+0x69/0xb0
 journal_flush_pins+0x8e3/0xe90
 __bch2_journal_reclaim+0x910/0xed0
 bch2_journal_reclaim_thread+0x177/0x4f0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/34:
 #0: ffffffff8e139ee0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180
4 locks held by kworker/u9:2/53:
 #0: ffff88801b36c948 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc900007bfbc0 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff88802da060e0 (&type->s_umount_key#81){++++}-{4:4}, at: super_trylock_shared+0x20/0xf0
 #3: ffff8880394d4b88 (&jfs_ip->commit_mutex){+.+.}-{4:4}, at: jfs_commit_inode+0x1ca/0x530
2 locks held by getty/5673:
 #0: ffff8880296d50a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70
 #1: ffffc900029062f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x43e/0x1400
4 locks held by kworker/u8:4/5908:
 #0: ffff888028f1e148 ((wq_completion)btree_node_rewrite){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc900049bfbc0 ((work_completion)(&a->work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff888044504398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_trans_srcu_lock+0xaf/0x220
 #3: ffff888044526710 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x542/0x1de0
2 locks held by syz.9.1272/12396:
 #0: ffff888044504398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_trans_srcu_lock+0xaf/0x220
 #1: ffff888044526710 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x542/0x1de0
4 locks held by bch-reclaim/loo/12407:
 #0: ffff88804454af68 (&j->reclaim_lock){+.+.}-{4:4}, at: bch2_journal_reclaim_thread+0x16b/0x4f0
 #1: ffff888044504398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7f4/0xd80
 #2: ffff888044504740 (&wb->flushing.lock){+.+.}-{4:4}, at: btree_write_buffer_flush_seq+0x18bd/0x1a40
 #3: ffff888044526710 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x542/0x1de0
4 locks held by syz.2.1785/14816:
2 locks held by syz.2.1785/14826:
 #0: ffff88802da06428 (sb_writers#21){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90
 #1: ffff8880394d4f38 (&type->i_mutex_dir_key#14/1){+.+.}-{4:4}, at: filename_create+0x1f8/0x3c0
2 locks held by syz.2.1785/14827:
 #0: ffff88802da06428 (sb_writers#21){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90
 #1: ffff8880394d4f38 (&type->i_mutex_dir_key#15){++++}-{4:4}, at: path_openat+0x8da/0x3830

=============================================

NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 34 Comm: khungtaskd Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094 #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250
 nmi_cpu_backtrace+0x39e/0x3d0
 nmi_trigger_cpumask_backtrace+0x17a/0x300
 watchdog+0xf93/0xfe0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 5822 Comm: syz-executor Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094 #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
RIP: 0010:native_apic_msr_write+0x39/0x50
Code: 74 2a 83 ff 30 74 25 eb 10 81 ff d0 00 00 00 74 1b 81 ff e0 00 00 00 74 13 c1 ef 04 81 c7 00 08 00 00 89 f9 89 f0 31 d2 0f 30 <66> 90 c3 cc cc cc cc cc f3 0f 1e fa 89 f6 31 d2 e9 d2 68 8e 03 66
RSP: 0018:ffffc900036ffaf8 EFLAGS: 00000046
RAX: 0000000000010012 RBX: ffff88804b023900 RCX: 0000000000000838
RDX: 0000000000000000 RSI: 0000000000010012 RDI: 0000000000000838
RBP: 0000000000000001 R08: 0000000000000000 R09: ffffffff81ae027e
R10: 0000000000000003 R11: ffffffff81703490 R12: 000000000ffff94a
R13: dffffc0000000000 R14: 0000000000010012 R15: 0000000000000020
FS:  0000555569cef500(0000) GS:ffff8880b861c000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007efda005cfc8 CR3: 0000000029600000 CR4: 00000000000006f0
Call Trace:
 <TASK>
 lapic_next_event+0x11/0x20
 clockevents_program_event+0x1cf/0x360
 hrtimer_start_range_ns+0xda6/0x1080
 do_nanosleep+0x191/0x600
 hrtimer_nanosleep+0x169/0x360
 __se_sys_clock_nanosleep+0x2f1/0x380
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f884d7c1463
Code: 1f 84 00 00 00 00 00 83 ff 03 74 7b 83 ff 02 b8 fa ff ff ff 49 89 ca 0f 44 f8 80 3d fe 70 1c 00 00 74 14 b8 e6 00 00 00 0f 05 <f7> d8 c3 66 2e 0f 1f 84 00 00 00 00 00 48 83 ec 28 48 89 54 24 10
RSP: 002b:00007ffcf7e0aea8 EFLAGS: 00000202 ORIG_RAX: 00000000000000e6
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f884d7c1463
RDX: 00007ffcf7e0aec0 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000010bf6536 R09: 7fffffffffffffff
R10: 0000000000000000 R11: 0000000000000202 R12: 00007ffcf7e0b310
R13: 0000000000000004 R14: 00007ffcf7e0aefc R15: 00007ffcf7e0af90
 </TASK>
