syzbot


INFO: task hung in f2fs_write_data_pages

Status: auto-obsoleted due to no activity on 2023/09/15 13:33
Reported-by: syzbot+8b305e792007932f00f1@syzkaller.appspotmail.com
First crash: 534d, last: 534d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in f2fs_write_data_pages f2fs 1 535d 535d 0/28 auto-obsoleted due to no activity on 2023/09/05 01:24

Sample crash report:
INFO: task syz-executor.3:12990 blocked for more than 143 seconds.
      Not tainted 6.1.32-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.3  state:D stack:21728 pid:12990 ppid:12320  flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x132c/0x4330 kernel/sched/core.c:6554
 schedule+0xbf/0x180 kernel/sched/core.c:6630
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6689
 __mutex_lock_common+0xe2b/0x2520 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
 __f2fs_write_data_pages fs/f2fs/data.c:3250 [inline]
 f2fs_write_data_pages+0xafd/0x2e60 fs/f2fs/data.c:3282
 do_writepages+0x3a2/0x670 mm/page-writeback.c:2469
 filemap_fdatawrite_wbc+0x121/0x180 mm/filemap.c:388
 __filemap_fdatawrite_range mm/filemap.c:421 [inline]
 filemap_write_and_wait_range+0x1a4/0x290 mm/filemap.c:674
 __iomap_dio_rw+0xb38/0x2240 fs/iomap/direct-io.c:573
 f2fs_dio_write_iter fs/f2fs/file.c:4581 [inline]
 f2fs_file_write_iter+0x120c/0x2990 fs/f2fs/file.c:4709
 do_iter_write+0x6e6/0xc50 fs/read_write.c:861
 iter_file_splice_write+0x806/0xfa0 fs/splice.c:686
 do_splice_from fs/splice.c:764 [inline]
 direct_splice_actor+0xe3/0x1c0 fs/splice.c:931
 splice_direct_to_actor+0x4c0/0xbd0 fs/splice.c:886
 do_splice_direct+0x27f/0x3c0 fs/splice.c:974
 do_sendfile+0x61c/0xff0 fs/read_write.c:1255
 __do_sys_sendfile64 fs/read_write.c:1323 [inline]
 __se_sys_sendfile64+0x178/0x1e0 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:0x7fcbc668c169
RSP: 002b:00007fcbc733c168 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007fcbc67ac1f0 RCX: 00007fcbc668c169
RDX: 0000000000000000 RSI: 0000000000000007 RDI: 0000000000000007
RBP: 00007fcbc66e7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000008800000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcc1ff48af R14: 00007fcbc733c300 R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8cf27470 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:510
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8cf27c70 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:510
1 lock held by khungtaskd/28:
 #0: ffffffff8cf272a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3297:
 #0: ffff888013e4b098 (&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+0x6a7/0x1db0 drivers/tty/n_tty.c:2177
4 locks held by syz-executor.3/12988:
5 locks held by syz-executor.3/12990:
 #0: ffff888021550460 (sb_writers#13){.+.+}-{0:0}, at: do_sendfile+0x5f7/0xff0 fs/read_write.c:1254
 #1: ffff888074539320 (&sb->s_type->i_mutex_key#21){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline]
 #1: ffff888074539320 (&sb->s_type->i_mutex_key#21){+.+.}-{3:3}, at: f2fs_file_write_iter+0x297/0x2990 fs/f2fs/file.c:4673
 #2: ffff8880745398f8 (&fi->i_gc_rwsem[WRITE]){++++}-{3:3}, at: f2fs_down_read fs/f2fs/f2fs.h:2154 [inline]
 #2: ffff8880745398f8 (&fi->i_gc_rwsem[WRITE]){++++}-{3:3}, at: f2fs_dio_write_iter fs/f2fs/file.c:4567 [inline]
 #2: ffff8880745398f8 (&fi->i_gc_rwsem[WRITE]){++++}-{3:3}, at: f2fs_file_write_iter+0xf91/0x2990 fs/f2fs/file.c:4709
 #3: ffff888074539860 (&fi->i_gc_rwsem[READ]){++++}-{3:3}, at: f2fs_down_read fs/f2fs/f2fs.h:2154 [inline]
 #3: ffff888074539860 (&fi->i_gc_rwsem[READ]){++++}-{3:3}, at: f2fs_dio_write_iter fs/f2fs/file.c:4569 [inline]
 #3: ffff888074539860 (&fi->i_gc_rwsem[READ]){++++}-{3:3}, at: f2fs_file_write_iter+0xfad/0x2990 fs/f2fs/file.c:4709
 #4: ffff88807cd50128 (&sbi->writepages){+.+.}-{3:3}, at: __f2fs_write_data_pages fs/f2fs/data.c:3250 [inline]
 #4: ffff88807cd50128 (&sbi->writepages){+.+.}-{3:3}, at: f2fs_write_data_pages+0xafd/0x2e60 fs/f2fs/data.c:3282
2 locks held by syz-executor.3/14112:

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

NMI backtrace for cpu 1
CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.1.32-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 nmi_cpu_backtrace+0x4e1/0x560 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1b0/0x3f0 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+0xf18/0xf60 kernel/hung_task.c:377
 kthread+0x26e/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 1105 Comm: kworker/u4:5 Not tainted 6.1.32-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
Workqueue: bat_events batadv_nc_worker
RIP: 0010:__lock_acquire+0x81b/0x1f80 kernel/locking/lockdep.c:5006
Code: 8b 03 41 38 c7 41 0f b6 cf 41 89 c7 44 0f 42 f9 84 c0 44 0f 44 f9 49 ff c6 48 8b 44 24 28 0f b6 04 10 84 c0 0f 85 be 00 00 00 <48> 8b 44 24 18 48 63 00 48 83 c5 28 49 83 c5 28 41 ff c4 49 39 c6
RSP: 0018:ffffc9000513f9a0 EFLAGS: 00000046
RAX: 0000000000000000 RBX: ffffffff8ffd0b98 RCX: 0000000000000004
RDX: dffffc0000000000 RSI: 0000000000000008 RDI: ffffffff902892f8
RBP: ffff8880206946a8 R08: dffffc0000000000 R09: fffffbfff2051260
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000001
R13: ffff8880206946a8 R14: 0000000000000002 R15: 0000000000000004
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3d219dd000 CR3: 000000000cc8e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5669
 rcu_lock_acquire+0x2a/0x30 include/linux/rcupdate.h:306
 rcu_read_lock include/linux/rcupdate.h:747 [inline]
 batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:408 [inline]
 batadv_nc_worker+0xc1/0x5b0 net/batman-adv/network-coding.c:719
 process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289
 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
 kthread+0x26e/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/07 13:32 linux-6.1.y 76ba310227d2 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in f2fs_write_data_pages
* Struck through repros no longer work on HEAD.