syzbot


INFO: task hung in __fdget_pos (4)

Status: upstream: reported C repro on 2025/05/31 22:18
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+229b5abd47623496cc52@syzkaller.appspotmail.com
First crash: 28d, last: 26d
Fix commit to backport (bisect log) :
tree: upstream
commit fe1371d0f8c6a9aa4441ddd09ea6d4f31b975a81
Author: Eric Van Hensbergen <ericvh@kernel.org>
Date: Fri Jan 5 16:16:36 2024 +0000

  fs/9p: switch vfsmount to use v9fs_get_new_inode

  
Bug presence (2)
Date Name Commit Repro Result
2025/06/03 linux-5.15.y (ToT) 98f47d0e9b8c C [report] INFO: task hung in __fdget_pos
2025/06/03 upstream (ToT) 546b1c9e93c2 C Didn't crash
Similar bugs (14)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 INFO: task hung in __fdget_pos (3) origin:lts-only C done 1 178d 181d 3/3 fixed on 2025/02/05 14:14
linux-6.1 INFO: task hung in __fdget_pos (2) 5 288d 322d 0/3 auto-obsoleted due to no activity on 2024/12/23 19:37
upstream INFO: task hung in __fdget_pos kernfs 1 2652d 2652d 0/29 closed as invalid on 2018/03/27 11:08
android-44 INFO: task hung in __fdget_pos 2 2472d 2485d 0/2 auto-closed as invalid on 2019/03/21 05:21
linux-6.1 INFO: task hung in __fdget_pos 1 630d 630d 0/3 auto-obsoleted due to no activity on 2024/01/16 13:13
android-49 INFO: task hung in __fdget_pos 22 2473d 2604d 0/3 auto-closed as invalid on 2019/03/20 03:41
upstream INFO: task hung in __fdget_pos (4) fs C error done 297 272d 665d 0/29 upstream: reported C repro on 2023/09/03 04:11
upstream INFO: task hung in __fdget_pos (3) fs 3 1359d 1376d 0/29 auto-closed as invalid on 2022/01/07 10:38
android-414 INFO: task hung in __fdget_pos 1 2341d 2272d 0/1 auto-closed as invalid on 2019/07/30 11:39
linux-5.15 INFO: task hung in __fdget_pos (2) 2 429d 441d 0/3 auto-obsoleted due to no activity on 2024/08/04 06:39
linux-5.15 INFO: task hung in __fdget_pos 1 821d 821d 0/3 auto-obsoleted due to no activity on 2023/07/29 10:54
upstream INFO: task hung in __fdget_pos (2) fs 36 2364d 2589d 0/29 closed as dup on 2018/10/27 13:29
linux-5.15 INFO: task hung in __fdget_pos (3) 50 234d 322d 0/3 auto-obsoleted due to no activity on 2025/01/16 10:32
upstream INFO: task can't die in __fdget_pos fs 1 1234d 1234d 0/29 auto-closed as invalid on 2022/04/12 09:48
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2025/06/28 07:17 7h29m fix candidate upstream OK (1) job log

Sample crash report:
INFO: task syz-executor980:4169 blocked for more than 143 seconds.
      Not tainted 5.15.184-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor980 state:D stack:29448 pid: 4169 ppid:  4165 flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5030 [inline]
 __schedule+0x11b8/0x43b0 kernel/sched/core.c:6376
 schedule+0x11b/0x1e0 kernel/sched/core.c:6459
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6518
 __mutex_lock_common+0xc71/0x2390 kernel/locking/mutex.c:669
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
 __fdget_pos+0x2bf/0x370 fs/file.c:1058
 fdget_pos include/linux/file.h:75 [inline]
 __do_sys_getdents64 fs/readdir.c:365 [inline]
 __se_sys_getdents64+0xbe/0x260 fs/readdir.c:354
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f3b366e6869
RSP: 002b:00007f3b36686218 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 00007f3b36770418 RCX: 00007f3b366e6869
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000006
RBP: 00007f3b36770410 R08: 00007ffe0d789157 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f3b3673d07c
R13: 0030656c69662f2e R14: 00007ffe0d789070 R15: 0000200000004280
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8c11c060 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3933:
 #0: ffff88802a7c3098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc900025c62e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x5ba/0x1a30 drivers/tty/n_tty.c:2158
2 locks held by syz-executor980/4167:
 #0: ffff88802a416370 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2bf/0x370 fs/file.c:1058
 #1: ffff888074550298 (&sb->s_type->i_mutex_key#15){.+.+}-{3:3}, at: iterate_dir+0x10d/0x560 fs/readdir.c:55
1 lock held by syz-executor980/4169:
 #0: ffff88802a416370 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2bf/0x370 fs/file.c:1058

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.15.184-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x397/0x3d0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x163/0x280 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:212 [inline]
 watchdog+0xe0f/0xe50 kernel/hung_task.c:369
 kthread+0x436/0x520 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1 skipped: idling at native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
NMI backtrace for cpu 1 skipped: idling at arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
NMI backtrace for cpu 1 skipped: idling at default_idle+0xb/0x10 arch/x86/kernel/process.c:722

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/31 22:17 linux-5.15.y 98f47d0e9b8c 3d2f584d .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in __fdget_pos
* Struck through repros no longer work on HEAD.