syzbot


INFO: task hung in __generic_file_write_iter

Status: auto-obsoleted due to no activity on 2023/02/13 11:46
Subsystems: mm fs
[Documentation on labels]
First crash: 548d, last: 537d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: task hung in __generic_file_write_iter C error 2 510d 510d 0/1 upstream: reported C repro on 2022/12/10 22:14

Sample crash report:
INFO: task syz-executor.0:9884 blocked for more than 143 seconds.
      Not tainted 6.1.0-rc4-syzkaller-00372-gaf7a05689189 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.0  state:D stack:20448 pid:9884  ppid:3641   flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5191 [inline]
 __schedule+0x8c9/0xd70 kernel/sched/core.c:6503
 schedule+0xcb/0x190 kernel/sched/core.c:6579
 io_schedule+0x83/0x100 kernel/sched/core.c:8723
 folio_wait_bit_common+0x83a/0x12a0 mm/filemap.c:1296
 folio_wait_writeback+0xf8/0x200 mm/page-writeback.c:3036
 __filemap_fdatawait_range+0x20c/0x780 mm/filemap.c:524
 filemap_write_and_wait_range+0x1ff/0x2b0 mm/filemap.c:683
 __generic_file_write_iter+0x2cc/0x400 mm/filemap.c:3867
 generic_file_write_iter+0xab/0x310 mm/filemap.c:3913
 do_iter_write+0x6c2/0xc20 fs/read_write.c:861
 iter_file_splice_write+0x7fc/0xfc0 fs/splice.c:686
 do_splice_from fs/splice.c:764 [inline]
 direct_splice_actor+0xe6/0x1c0 fs/splice.c:931
 splice_direct_to_actor+0x4e4/0xc00 fs/splice.c:886
 do_splice_direct+0x279/0x3d0 fs/splice.c:974
 do_sendfile+0x5fb/0xf80 fs/read_write.c:1255
 __do_sys_sendfile64 fs/read_write.c:1323 [inline]
 __se_sys_sendfile64+0x14f/0x1b0 fs/read_write.c:1309
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f51d208b639
RSP: 002b:00007f51d13ff168 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f51d21ac050 RCX: 00007f51d208b639
RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000004
RBP: 00007f51d20e6ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0008000000000004 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffde9ed708f R14: 00007f51d13ff300 R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8cb226f0 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x30/0xd00 kernel/rcu/tasks.h:507
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8cb22ef0 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x30/0xd00 kernel/rcu/tasks.h:507
1 lock held by khungtaskd/28:
 #0: ffffffff8cb22520 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3284:
 #0: ffff88814ac13098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc900031262f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x53b/0x1650 drivers/tty/n_tty.c:2177
2 locks held by syz-executor.0/9884:
 #0: ffff88804a600460 (sb_writers#24){.+.+}-{0:0}, at: do_sendfile+0x5d6/0xf80 fs/read_write.c:1254
 #1: ffff888073cbbc50 (&sb->s_type->i_mutex_key#31){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline]
 #1: ffff888073cbbc50 (&sb->s_type->i_mutex_key#31){+.+.}-{3:3}, at: generic_file_write_iter+0x7f/0x310 mm/filemap.c:3910
2 locks held by syz-executor.0/10208:
 #0: ffff88804a6000e0 (&type->s_umount_key#84){++++}-{3:3}, at: iterate_supers+0xb0/0x1f0 fs/super.c:722
 #1: ffff88804a600990 (&s->s_sync_lock){+.+.}-{3:3}, at: wait_sb_inodes fs/fs-writeback.c:2526 [inline]
 #1: ffff88804a600990 (&s->s_sync_lock){+.+.}-{3:3}, at: sync_inodes_sb+0x32d/0xaa0 fs/fs-writeback.c:2709
2 locks held by syz-executor.0/10214:
 #0: ffff88804a6000e0 (&type->s_umount_key#84){++++}-{3:3}, at: iterate_supers+0xb0/0x1f0 fs/super.c:722
 #1: ffff88804a600990 (&s->s_sync_lock){+.+.}-{3:3}, at: wait_sb_inodes fs/fs-writeback.c:2526 [inline]
 #1: ffff88804a600990 (&s->s_sync_lock){+.+.}-{3:3}, at: sync_inodes_sb+0x32d/0xaa0 fs/fs-writeback.c:2709
2 locks held by syz-executor.0/10220:
 #0: ffff88804a6000e0 (&type->s_umount_key#84){++++}-{3:3}, at: iterate_supers+0xb0/0x1f0 fs/super.c:722
 #1: ffff88804a600990 (&s->s_sync_lock){+.+.}-{3:3}, at: wait_sb_inodes fs/fs-writeback.c:2526 [inline]
 #1: ffff88804a600990 (&s->s_sync_lock){+.+.}-{3:3}, at: sync_inodes_sb+0x32d/0xaa0 fs/fs-writeback.c:2709
2 locks held by syz-executor.0/10228:
 #0: ffff88804a6000e0 (&type->s_umount_key#84){++++}-{3:3}, at: iterate_supers+0xb0/0x1f0 fs/super.c:722
 #1: ffff88804a600990 (&s->s_sync_lock){+.+.}-{3:3}, at: wait_sb_inodes fs/fs-writeback.c:2526 [inline]
 #1: ffff88804a600990 (&s->s_sync_lock){+.+.}-{3:3}, at: sync_inodes_sb+0x32d/0xaa0 fs/fs-writeback.c:2709
2 locks held by syz-executor.0/10232:
 #0: ffff88804a6000e0 (&type->s_umount_key#84){++++}-{3:3}, at: iterate_supers+0xb0/0x1f0 fs/super.c:722
 #1: ffff88804a600990 (&s->s_sync_lock){+.+.}-{3:3}, at: wait_sb_inodes fs/fs-writeback.c:2526 [inline]
 #1: ffff88804a600990 (&s->s_sync_lock){+.+.}-{3:3}, at: sync_inodes_sb+0x32d/0xaa0 fs/fs-writeback.c:2709
2 locks held by syz-executor.4/10482:
 #0: ffff88804a6000e0 (&type->s_umount_key#84){++++}-{3:3}, at: iterate_supers+0xb0/0x1f0 fs/super.c:722
 #1: ffff88804a600990 (&s->s_sync_lock){+.+.}-{3:3}, at: wait_sb_inodes fs/fs-writeback.c:2526 [inline]
 #1: ffff88804a600990 (&s->s_sync_lock){+.+.}-{3:3}, at: sync_inodes_sb+0x32d/0xaa0 fs/fs-writeback.c:2709
2 locks held by syz-executor.4/10491:
 #0: ffff88804a6000e0 (&type->s_umount_key#84){++++}-{3:3}, at: iterate_supers+0xb0/0x1f0 fs/super.c:722
 #1: ffff88804a600990 (&s->s_sync_lock){+.+.}-{3:3}, at: wait_sb_inodes fs/fs-writeback.c:2526 [inline]
 #1: ffff88804a600990 (&s->s_sync_lock){+.+.}-{3:3}, at: sync_inodes_sb+0x32d/0xaa0 fs/fs-writeback.c:2709

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.1.0-rc4-syzkaller-00372-gaf7a05689189 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106
 nmi_cpu_backtrace+0x46f/0x4f0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1ba/0x420 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:220 [inline]
 watchdog+0xcf5/0xd40 kernel/hung_task.c:377
 kthread+0x266/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 2444 Comm: kworker/u4:5 Not tainted 6.1.0-rc4-syzkaller-00372-gaf7a05689189 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Workqueue: bat_events batadv_nc_worker
RIP: 0010:arch_static_branch include/trace/events/lock.h:69 [inline]
RIP: 0010:static_key_false include/linux/jump_label.h:207 [inline]
RIP: 0010:trace_lock_release+0x1/0x220 include/trace/events/lock.h:69
Code: 98 ea 0d 8e 80 e1 07 80 c1 03 38 c1 0f 8c 74 fb ff ff 48 c7 c7 98 ea 0d 8e e8 6b 1c 74 00 e9 63 fb ff ff 66 0f 1f 44 00 00 55 <41> 57 41 56 41 54 53 0f 1f 44 00 00 65 8b 2d 64 57 9a 7e 48 c7 c0
RSP: 0018:ffffc9000aaefa90 EFLAGS: 00000a06
RAX: f3f3f3f3f300f2f2 RBX: ffff888025b28040 RCX: ffff8880270c0000
RDX: 0000000000000000 RSI: ffffffff8a063d85 RDI: ffffffff8cb22520
RBP: ffffc9000aaefbc8 R08: dffffc0000000000 R09: fffffbfff1fc9009
R10: fffffbfff1fc9009 R11: 1ffffffff1fc9008 R12: dffffc0000000000
R13: ffff888079168000 R14: 1ffff9200155df60 R15: ffffffff8a063d85
FS:  0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055d68bcca4c0 CR3: 000000002854e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 lock_release+0x81/0x820 kernel/locking/lockdep.c:5679
 rcu_read_unlock include/linux/rcupdate.h:771 [inline]
 batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:412 [inline]
 batadv_nc_worker+0x251/0x5b0 net/batman-adv/network-coding.c:719
 process_one_work+0x877/0xdb0 kernel/workqueue.c:2289
 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436
 kthread+0x266/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/11/13 20:11 upstream af7a05689189 7ba4d859 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __generic_file_write_iter
2022/11/03 03:18 upstream b229b6ca5abb 08977f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __generic_file_write_iter
* Struck through repros no longer work on HEAD.