syzbot


INFO: task hung in generic_file_direct_write

Status: auto-obsoleted due to no activity on 2023/11/07 07:29
Subsystems: fs mm
[Documentation on labels]
First crash: 268d, last: 268d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-44 INFO: task hung in generic_file_direct_write 1 2221d 2221d 0/2 auto-closed as invalid on 2019/02/22 12:38
android-49 INFO: task hung in generic_file_direct_write 3 2209d 2242d 0/3 auto-closed as invalid on 2019/02/22 14:09

Sample crash report:
INFO: task syz-executor.4:12045 blocked for more than 143 seconds.
      Not tainted 6.5.0-rc5-syzkaller-00053-g13b937206866 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.4  state:D stack:23432 pid:12045 ppid:5062   flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5381 [inline]
 __schedule+0x1873/0x48f0 kernel/sched/core.c:6710
 schedule+0xc3/0x180 kernel/sched/core.c:6786
 io_schedule+0x8c/0x100 kernel/sched/core.c:9028
 folio_wait_bit_common+0x86c/0x12b0 mm/filemap.c:1304
 folio_wait_writeback+0xec/0x1f0 mm/page-writeback.c:3089
 __filemap_fdatawait_range+0x17b/0x400 mm/filemap.c:528
 filemap_write_and_wait_range+0x220/0x2c0 mm/filemap.c:690
 kiocb_invalidate_pages mm/filemap.c:2759 [inline]
 generic_file_direct_write+0xff/0x3f0 mm/filemap.c:3841
 __generic_file_write_iter+0x125/0x230 mm/filemap.c:4004
 generic_file_write_iter+0xaf/0x310 mm/filemap.c:4044
 do_iter_write+0x84f/0xde0 fs/read_write.c:860
 vfs_writev fs/read_write.c:933 [inline]
 do_pwritev+0x21a/0x360 fs/read_write.c:1030
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fadab27cae9
RSP: 002b:00007fadabf2a0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000148
RAX: ffffffffffffffda RBX: 00007fadab39bf80 RCX: 00007fadab27cae9
RDX: 0000000000000001 RSI: 0000000020000680 RDI: 000000000000000a
RBP: 00007fadab2c847a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007fadab39bf80 R15: 00007fffa7f36c78
 </TASK>
INFO: task syz-executor.4:12052 blocked for more than 144 seconds.
      Not tainted 6.5.0-rc5-syzkaller-00053-g13b937206866 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.4  state:D stack:25576 pid:12052 ppid:5062   flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5381 [inline]
 __schedule+0x1873/0x48f0 kernel/sched/core.c:6710
 schedule+0xc3/0x180 kernel/sched/core.c:6786
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:6845
 rwsem_down_write_slowpath+0xedd/0x13a0 kernel/locking/rwsem.c:1178
 __down_write_common+0x1aa/0x200 kernel/locking/rwsem.c:1306
 inode_lock include/linux/fs.h:771 [inline]
 do_truncate+0x20c/0x300 fs/open.c:64
 do_sys_ftruncate+0x2f3/0x390 fs/open.c:194
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fadab27cae9
RSP: 002b:00007fadabf090c8 EFLAGS: 00000246 ORIG_RAX: 000000000000004d
RAX: ffffffffffffffda RBX: 00007fadab39c050 RCX: 00007fadab27cae9
RDX: 0000000000000000 RSI: 000000000000000b RDI: 0000000000000009
RBP: 00007fadab2c847a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007fadab39c050 R15: 00007fffa7f36c78
 </TASK>
INFO: task syz-executor.4:12053 blocked for more than 145 seconds.
      Not tainted 6.5.0-rc5-syzkaller-00053-g13b937206866 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.4  state:D stack:26152 pid:12053 ppid:5062   flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5381 [inline]
 __schedule+0x1873/0x48f0 kernel/sched/core.c:6710
 schedule+0xc3/0x180 kernel/sched/core.c:6786
 io_schedule+0x8c/0x100 kernel/sched/core.c:9028
 folio_wait_bit_common+0x86c/0x12b0 mm/filemap.c:1304
 folio_wait_writeback+0xec/0x1f0 mm/page-writeback.c:3089
 __filemap_fdatawait_range+0x17b/0x400 mm/filemap.c:528
 filemap_write_and_wait_range+0x220/0x2c0 mm/filemap.c:690
 kiocb_write_and_wait mm/filemap.c:2744 [inline]
 generic_file_read_iter+0x1a4/0x550 mm/filemap.c:2809
 call_read_iter include/linux/fs.h:1871 [inline]
 copy_splice_read+0x4c9/0x9c0 fs/splice.c:367
 splice_direct_to_actor+0x2c4/0x9e0 fs/splice.c:1072
 do_splice_direct+0x2ac/0x3f0 fs/splice.c:1197
 do_sendfile+0x623/0x1070 fs/read_write.c:1254
 __do_sys_sendfile64 fs/read_write.c:1322 [inline]
 __se_sys_sendfile64+0x17c/0x1e0 fs/read_write.c:1308
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fadab27cae9
RSP: 002b:00007fada1bfe0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007fadab39c120 RCX: 00007fadab27cae9
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 0000000000000004
RBP: 00007fadab2c847a R08: 0000000000000000 R09: 0000000000000000
R10: 0001000000201005 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007fadab39c120 R15: 00007fffa7f36c78
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/13:
 #0: ffffffff8d3294b0 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:522
1 lock held by rcu_tasks_trace/14:
 #0: ffffffff8d329870 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:522
1 lock held by khungtaskd/28:
 #0: ffffffff8d3292e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/4776:
 #0: ffff88802d28a098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc900015b02f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6b1/0x1dc0 drivers/tty/n_tty.c:2187
2 locks held by kworker/1:4/5101:
 #0: ffff888012870d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7e3/0x12c0 kernel/workqueue.c:2572
 #1: ffffc90004a07d00 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x82b/0x12c0 kernel/workqueue.c:2574
2 locks held by kworker/1:16/6802:
 #0: ffff888012870d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7e3/0x12c0 kernel/workqueue.c:2572
 #1: ffffc9000a77fd00 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x82b/0x12c0 kernel/workqueue.c:2574
3 locks held by kworker/u4:8/10444:
 #0: ffff8880b983bf98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:558
 #1: ffff8880b98287c8 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x441/0x770 kernel/sched/psi.c:999
 #2: ffff888032e94910 (&hard_iface->bat_iv.ogm_buff_mutex){+.+.}-{3:3}, at: batadv_iv_ogm_schedule+0xe3/0x1010 net/batman-adv/bat_iv_ogm.c:867
2 locks held by kworker/1:0/7713:
 #0: ffff888012870d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7e3/0x12c0 kernel/workqueue.c:2572
 #1: ffffc900052cfd00 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x82b/0x12c0 kernel/workqueue.c:2574
3 locks held by kworker/1:1/7717:
 #0: ffff888012870d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7e3/0x12c0 kernel/workqueue.c:2572
 #1: 
ffffc900054bfd00 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x82b/0x12c0 kernel/workqueue.c:2574
 #2: ffffffff8d32e978 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:325 [inline]
 #2: ffffffff8d32e978 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x46c/0x890 kernel/rcu/tree_exp.h:992
3 locks held by kworker/1:2/7718:
 #0: ffff888012870d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7e3/0x12c0 kernel/workqueue.c:2572
 #1: ffffc900053efd00 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x82b/0x12c0 kernel/workqueue.c:2574
 #2: ffffffff8d32e978 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:293 [inline]
 #2: ffffffff8d32e978 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x3a3/0x890 kernel/rcu/tree_exp.h:992
2 locks held by kworker/1:3/8044:
 #0: ffff888012870d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7e3/0x12c0 kernel/workqueue.c:2572
 #1: ffffc9000b39fd00 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x82b/0x12c0 kernel/workqueue.c:2574
2 locks held by kworker/1:5/8045:
 #0: ffff888012870d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7e3/0x12c0 kernel/workqueue.c:2572
 #1: ffffc9000b32fd00 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x82b/0x12c0 kernel/workqueue.c:2574
2 locks held by kworker/1:6/8046:
 #0: ffff888012870d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7e3/0x12c0 kernel/workqueue.c:2572
 #1: ffffc9000b44fd00 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x82b/0x12c0 kernel/workqueue.c:2574
2 locks held by kworker/1:7/8047:
 #0: ffff888012870d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7e3/0x12c0 kernel/workqueue.c:2572
 #1: ffffc9000b45fd00 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x82b/0x12c0 kernel/workqueue.c:2574
2 locks held by kworker/1:9/8049:
 #0: ffff888012870d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7e3/0x12c0 kernel/workqueue.c:2572
 #1: ffffc9000b47fd00 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x82b/0x12c0 kernel/workqueue.c:2574
2 locks held by kworker/1:10/8050:
 #0: ffff888012870d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7e3/0x12c0 kernel/workqueue.c:2572
 #1: ffffc9000b48fd00 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x82b/0x12c0 kernel/workqueue.c:2574
2 locks held by kworker/1:14/8053:
 #0: ffff888012870d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7e3/0x12c0 kernel/workqueue.c:2572
 #1: ffffc9000b4bfd00 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x82b/0x12c0 kernel/workqueue.c:2574
2 locks held by kworker/1:17/8267:
 #0: ffff888012870d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7e3/0x12c0 kernel/workqueue.c:2572
 #1: ffffc9001514fd00 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x82b/0x12c0 kernel/workqueue.c:2574
2 locks held by syz-executor.4/12045:
 #0: ffff888031408410 (sb_writers#22){.+.+}-{0:0}, at: vfs_writev fs/read_write.c:932 [inline]
 #0: ffff888031408410 (sb_writers#22){.+.+}-{0:0}, at: do_pwritev+0x1fe/0x360 fs/read_write.c:1030
 #1: ffff888085678910 (&sb->s_type->i_mutex_key#27){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:771 [inline]
 #1: ffff888085678910 (&sb->s_type->i_mutex_key#27){+.+.}-{3:3}, at: generic_file_write_iter+0x83/0x310 mm/filemap.c:4041
2 locks held by syz-executor.4/12052:
 #0: ffff888031408410 (sb_writers#22){.+.+}-{0:0}, at: do_sys_ftruncate+0x258/0x390 fs/open.c:191
 #1: ffff888085678910 (&sb->s_type->i_mutex_key#27){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:771 [inline]
 #1: ffff888085678910 (&sb->s_type->i_mutex_key#27){+.+.}-{3:3}, at: do_truncate+0x20c/0x300 fs/open.c:64
1 lock held by syz-executor.4/12053:
 #0: ffff888031408410 (sb_writers#22){.+.+}-{0:0}, at: do_sendfile+0x600/0x1070 fs/read_write.c:1253
2 locks held by kworker/1:18/14596:
 #0: ffff888012872538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x7e3/0x12c0 kernel/workqueue.c:2572
 #1: ffffc9001813fd00 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work+0x82b/0x12c0 kernel/workqueue.c:2574
2 locks held by kworker/1:20/14598:
 #0: ffff888012870d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7e3/0x12c0 kernel/workqueue.c:2572
 #1: ffffc9001814fd00 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x82b/0x12c0 kernel/workqueue.c:2574

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.5.0-rc5-syzkaller-00053-g13b937206866 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x498/0x4d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x187/0x300 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:160 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:222 [inline]
 watchdog+0xec2/0xf00 kernel/hung_task.c:379
 kthread+0x2b8/0x350 kernel/kthread.c:389
 ret_from_fork+0x2e/0x60 arch/x86/kernel/process.c:145
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 7717 Comm: kworker/1:1 Not tainted 6.5.0-rc5-syzkaller-00053-g13b937206866 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
Workqueue: rcu_gp process_srcu
RIP: 0010:in_lock_functions+0x20/0x30 kernel/locking/spinlock.c:413
Code: 18 78 00 e9 66 ff ff ff 66 90 f3 0f 1e fa 48 c7 c0 90 af c6 8a 48 39 c7 0f 93 c0 48 c7 c1 b4 e3 c6 8a 48 39 cf 0f 92 c1 20 c1 <0f> b6 c1 c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 66 0f 1f 00 55 41
RSP: 0018:ffffc900054bfa50 EFLAGS: 00000246
RAX: ffffffff8ac6af00 RBX: 0000000000000001 RCX: ffffffff8ac6e300
RDX: 0000000000000362 RSI: ffffffff8b58ac60 RDI: ffffffff8ab98136
RBP: 000000000000263d R08: ffff8880b994580f R09: 1ffff11017328b01
R10: dffffc0000000000 R11: ffffed1017328b02 R12: ffffffff92076de8
R13: 0000000000000002 R14: ffffffff8ab98136 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555556a82978 CR3: 000000000d130000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 get_lock_parent_ip include/linux/ftrace.h:979 [inline]
 preempt_latency_start kernel/sched/core.c:5834 [inline]
 preempt_count_add+0x93/0x180 kernel/sched/core.c:5859
 delay_tsc+0x66/0xd0 arch/x86/lib/delay.c:79
 try_check_zero+0x3a4/0x3e0 kernel/rcu/srcutree.c:1091
 srcu_advance_state kernel/rcu/srcutree.c:1666 [inline]
 process_srcu+0x244/0x1390 kernel/rcu/srcutree.c:1769
 process_one_work+0x92c/0x12c0 kernel/workqueue.c:2600
 worker_thread+0xa63/0x1210 kernel/workqueue.c:2751
 kthread+0x2b8/0x350 kernel/kthread.c:389
 ret_from_fork+0x2e/0x60 arch/x86/kernel/process.c:145
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/08/09 07:27 upstream 13b937206866 8ad1a287 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in generic_file_direct_write
* Struck through repros no longer work on HEAD.