INFO: task hung in __generic_file_write_iter

Status: upstream: reported C repro on 2022/12/10 22:14
First crash: 531d, last: 531d
Fix bisection: failed (error log, bisect log)
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in __generic_file_write_iter mm fs 2 558d 569d 0/26 auto-obsoleted due to no activity on 2023/02/13 11:46

Sample crash report:
F2FS-fs (loop0): invalid crc value
F2FS-fs (loop0): Found nat_bits in checkpoint
F2FS-fs (loop0): f2fs_check_nid_range: out-of-range nid=2, run fsck to fix.
F2FS-fs (loop0): Mounted with checkpoint version = 48b305e4
INFO: task syz-executor466:8105 blocked for more than 140 seconds.
      Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor466 D26528  8105   8104 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2828 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3517
 schedule+0x8d/0x1b0 kernel/sched/core.c:3561
 io_schedule+0xb5/0x120 kernel/sched/core.c:5181
 wait_on_page_bit_common mm/filemap.c:1123 [inline]
 wait_on_page_bit+0x2c5/0x3f0 mm/filemap.c:1156
 wait_on_page_writeback include/linux/pagemap.h:547 [inline]
 __filemap_fdatawait_range+0x3ae/0x510 mm/filemap.c:535
 filemap_fdatawait_range mm/filemap.c:560 [inline]
 filemap_write_and_wait_range mm/filemap.c:683 [inline]
 filemap_write_and_wait_range+0x6e/0xd0 mm/filemap.c:673
 __generic_file_write_iter+0x4cf/0x610 mm/filemap.c:3281
 f2fs_file_write_iter+0x3c4/0xbe0 fs/f2fs/file.c:3031
 call_write_iter include/linux/fs.h:1821 [inline]
 aio_write+0x37f/0x5c0 fs/aio.c:1574
 __io_submit_one fs/aio.c:1858 [inline]
 io_submit_one+0xecd/0x20c0 fs/aio.c:1909
 __do_sys_io_submit fs/aio.c:1953 [inline]
 __se_sys_io_submit+0x11b/0x4a0 fs/aio.c:1924
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
RIP: 0033:0x7f4ec4b252e9
Code: Bad RIP value.
RSP: 002b:00007ffe82a3eb28 EFLAGS: 00000246 ORIG_RAX: 00000000000000d1
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f4ec4b252e9
RDX: 0000000020000540 RSI: 0000000000000008 RDI: 00007f4ec06b7000
RBP: 0000000000000000 R08: 00007f4ec4ba3ec0 R09: 00007f4ec4ba3ec0
R10: 00007f4ec4ba3ec0 R11: 0000000000000246 R12: 00007ffe82a3eb50
R13: 0000000000000000 R14: 431bde82d7b634db R15: 0000000000000000

Showing all locks held in the system:
1 lock held by khungtaskd/1571:
 #0: 000000000d094c00 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
1 lock held by syz-executor466/8105:
 #0: 0000000037f00765 (&sb->s_type->i_mutex_key#17){+.+.}, at: inode_trylock include/linux/fs.h:768 [inline]
 #0: 0000000037f00765 (&sb->s_type->i_mutex_key#17){+.+.}, at: f2fs_file_write_iter+0x1b6/0xbe0 fs/f2fs/file.c:2993


NMI backtrace for cpu 0
CPU: 0 PID: 1571 Comm: khungtaskd Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 nmi_cpu_backtrace.cold+0x63/0xa2 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x1a6/0x1f0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline]
 watchdog+0x991/0xe60 kernel/hung_task.c:287
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 10 Comm: rcu_preempt Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x50 kernel/kcov.c:97
Code: ff 48 89 df e8 11 dd 35 00 e9 ab fe ff ff 4c 89 ef e8 04 dd 35 00 e9 23 fe ff ff 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 <48> 8b 34 24 65 48 8b 04 25 c0 df 01 00 65 8b 15 cc 59 9f 7e 81 e2
RSP: 0018:ffff8880b5a67b98 EFLAGS: 00000003
RAX: 1ffff1101742456f RBX: 1ffff11016b4cf74 RCX: ffffffff8153155b
RDX: 0000000000000000 RSI: ffffffff8153161f RDI: ffff8880ba122b78
RBP: ffff8880ba122b40 R08: 0000000000000001 R09: 0000000008c00001
R10: 0000000000000004 R11: 0000000000000000 R12: ffff8880b5a67cc0
R13: dffffc0000000000 R14: ffff8880ba122b40 R15: 00000000ffffffff
FS:  0000000000000000(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f02068da000 CR3: 00000000a1364000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 try_to_del_timer_sync+0x9a/0x110 kernel/time/timer.c:1240
 del_timer_sync+0x1a4/0x270 kernel/time/timer.c:1305
 schedule_timeout+0x4d7/0xfe0 kernel/time/timer.c:1819
 rcu_gp_kthread+0xdad/0x21c0 kernel/rcu/tree.c:2202
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/11 02:02 linux-4.19.y 3f8a27f9e27b 67be1ae7 .config console log report syz C [disk image] [vmlinux] [mounted in repro] ci2-linux-4-19 INFO: task hung in __generic_file_write_iter
2022/12/10 22:13 linux-4.19.y 3f8a27f9e27b 67be1ae7 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 INFO: task hung in __generic_file_write_iter
* Struck through repros no longer work on HEAD.