syzbot


INFO: task hung in __f2fs_ioctl

Status: upstream: reported on 2024/10/19 04:51
Reported-by: syzbot+82b67bbee72f6aeec4eb@syzkaller.appspotmail.com
First crash: 3d15h, last: 3d15h
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in __f2fs_ioctl (2) f2fs 1 235d 235d 0/28 auto-obsoleted due to no activity on 2024/05/30 13:06
linux-6.1 INFO: task hung in __f2fs_ioctl 1 105d 105d 0/3 auto-obsoleted due to no activity on 2024/10/17 13:48
upstream INFO: task hung in __f2fs_ioctl f2fs 21 341d 445d 0/28 auto-obsoleted due to no activity on 2024/01/27 09:43

Sample crash report:
INFO: task syz.4.1739:11226 blocked for more than 143 seconds.
      Not tainted 5.15.168-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.4.1739      state:D stack:27808 pid:11226 ppid: 10186 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 schedule+0x11b/0x1f0 kernel/sched/core.c:6456
 rwsem_down_write_slowpath+0xf0c/0x16a0 kernel/locking/rwsem.c:1165
 f2fs_ioc_gc fs/f2fs/file.c:2490 [inline]
 __f2fs_ioctl+0x4a8b/0xca00 fs/f2fs/file.c:4230
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f2ef5d01ff9
RSP: 002b:00007f2ef4138038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f2ef5eba130 RCX: 00007f2ef5d01ff9
RDX: 0000000020000100 RSI: 000000004004f506 RDI: 0000000000000006
RBP: 00007f2ef5d74296 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000001 R14: 00007f2ef5eba130 R15: 00007ffc98e704c8
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8c91fc20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
1 lock held by udevd/3028:
2 locks held by getty/3325:
 #0: ffff8880293c2098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc900024a62e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1db0 drivers/tty/n_tty.c:2158
2 locks held by kworker/u4:8/3681:
 #0: ffff8880b903a318 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475
 #1: ffff8880b9027848 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x53d/0x810 kernel/sched/psi.c:891
2 locks held by kworker/1:9/6027:
 #0: ffff888017072138 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc90002dc7d20 ((work_completion)(&rew.rew_work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
4 locks held by kworker/u4:10/9756:
 #0: ffff8880199d9138 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc90002ea7d20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffff8880639a60e0 (&type->s_umount_key#66){++++}-{3:3}, at: trylock_super+0x1b/0xf0 fs/super.c:418
 #3: ffff88807636d1b0 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_balance_fs+0x4d4/0x6a0 fs/f2fs/segment.c:528
4 locks held by syz.4.1739/11225:
2 locks held by syz.4.1739/11226:
 #0: ffff8880639a6460 (sb_writers#17){.+.+}-{0:0}, at: mnt_want_write_file+0x5a/0x1f0 fs/namespace.c:421
 #1: ffff88807636d1b0 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_ioc_gc fs/f2fs/file.c:2490 [inline]
 #1: ffff88807636d1b0 (&sbi->gc_lock){+.+.}-{3:3}, at: __f2fs_ioctl+0x4a8b/0xca00 fs/f2fs/file.c:4230
1 lock held by syz-executor/12487:
 #0: ffffffff8c9241e8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:290 [inline]
 #0: ffffffff8c9241e8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x280/0x740 kernel/rcu/tree_exp.h:845
2 locks held by syz.3.2157/13030:
 #0: ffff8880208c0518 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xfb/0x790 block/bdev.c:912
 #1: ffff888147ada468 (&lo->lo_mutex){+.+.}-{3:3}, at: lo_release+0x4d/0x1f0 drivers/block/loop.c:2070

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

NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.15.168-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x46a/0x4a0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x181/0x2a0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xe72/0xeb0 kernel/hung_task.c:295
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0 skipped: idling at native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
NMI backtrace for cpu 0 skipped: idling at arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
NMI backtrace for cpu 0 skipped: idling at acpi_safe_halt drivers/acpi/processor_idle.c:108 [inline]
NMI backtrace for cpu 0 skipped: idling at acpi_idle_do_entry+0x10f/0x340 drivers/acpi/processor_idle.c:562

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/19 04:50 linux-5.15.y 584a40a22cb9 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in __f2fs_ioctl
* Struck through repros no longer work on HEAD.