syzbot


INFO: task hung in __fdget_pos (3)

Status: upstream: reported C repro on 2024/12/30 15:02
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+7afe2c8af40c90bd139f@syzkaller.appspotmail.com
First crash: 22d, last: 19d
Bug presence (2)
Date Name Commit Repro Result
2025/01/02 linux-6.1.y (ToT) 7dc732d24ff7 C [report] INFO: task hung in __fdget_pos
2025/01/02 upstream (ToT) 56e6a3499e14 C Didn't crash
Similar bugs (13)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 INFO: task hung in __fdget_pos (2) 5 129d 163d 0/3 auto-obsoleted due to no activity on 2024/12/23 19:37
upstream INFO: task hung in __fdget_pos kernfs 1 2493d 2493d 0/28 closed as invalid on 2018/03/27 11:08
android-44 INFO: task hung in __fdget_pos 2 2314d 2326d 0/2 auto-closed as invalid on 2019/03/21 05:21
linux-6.1 INFO: task hung in __fdget_pos 1 471d 471d 0/3 auto-obsoleted due to no activity on 2024/01/16 13:13
android-49 INFO: task hung in __fdget_pos 22 2315d 2445d 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 113d 507d 0/28 upstream: reported C repro on 2023/09/03 04:11
upstream INFO: task hung in __fdget_pos (3) fs 3 1200d 1218d 0/28 auto-closed as invalid on 2022/01/07 10:38
android-414 INFO: task hung in __fdget_pos 1 2182d 2113d 0/1 auto-closed as invalid on 2019/07/30 11:39
linux-5.15 INFO: task hung in __fdget_pos (2) 2 271d 282d 0/3 auto-obsoleted due to no activity on 2024/08/04 06:39
linux-5.15 INFO: task hung in __fdget_pos 1 662d 662d 0/3 auto-obsoleted due to no activity on 2023/07/29 10:54
upstream INFO: task hung in __fdget_pos (2) fs 36 2206d 2430d 0/28 closed as dup on 2018/10/27 13:29
linux-5.15 INFO: task hung in __fdget_pos (3) 50 75d 163d 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 1075d 1075d 0/28 auto-closed as invalid on 2022/04/12 09:48

Sample crash report:
INFO: task syz-executor155:4265 blocked for more than 143 seconds.
      Tainted: G        W          6.1.122-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor155 state:D stack:28672 pid:4265  ppid:4261   flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x143f/0x4570 kernel/sched/core.c:6558
 schedule+0xbf/0x180 kernel/sched/core.c:6634
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6693
 __mutex_lock_common kernel/locking/mutex.c:679 [inline]
 __mutex_lock+0x6b9/0xd80 kernel/locking/mutex.c:747
 __fdget_pos+0x2ba/0x360 fs/file.c:1031
 fdget_pos include/linux/file.h:74 [inline]
 __do_sys_getdents64 fs/readdir.c:365 [inline]
 __se_sys_getdents64+0x1d8/0x4f0 fs/readdir.c:354
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f8a869817d9
RSP: 002b:00007f8a8691d218 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 00007f8a86a09718 RCX: 00007f8a869817d9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005
RBP: 00007f8a86a09710 R08: 00007ffc764750b7 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8a869d65e0
R13: 00007f8a869d507e R14: 00007f8a869d50e0 R15: 0030656c69662f2e
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8d32b290 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x34/0xde0 kernel/rcu/tasks.h:543
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8d32bab0 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x34/0xde0 kernel/rcu/tasks.h:543
1 lock held by khungtaskd/27:
 #0: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #0: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #0: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6510
2 locks held by getty/4006:
 #0: ffff888030f29098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc9000325e2f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2198
3 locks held by syz-executor155/4263:
1 lock held by syz-executor155/4265:
 #0: ffff88807cce5768 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2ba/0x360 fs/file.c:1031

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Tainted: G        W          6.1.122-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/0x2cb lib/dump_stack.c:106
 nmi_cpu_backtrace+0x4e1/0x560 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1ae/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+0xf88/0xfd0 kernel/hung_task.c:377
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 4263 Comm: syz-executor155 Tainted: G        W          6.1.122-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:__find_get_block+0x103/0x1120 fs/buffer.c:1303
Code: e8 52 d2 e0 ff 4c 8b bc 24 a0 00 00 00 bb 00 02 00 00 be 00 02 00 00 4c 21 fe 31 ff e8 d6 42 89 ff 4c 21 fb 0f 84 b9 0f 00 00 <4c> 8d bc 24 c0 00 00 00 4c 89 fb 48 c1 eb 03 48 b8 00 00 00 00 00
RSP: 0018:ffffc90003c074c0 EFLAGS: 00000206
RAX: 0000000000000000 RBX: 0000000000000200 RCX: ffff888030f9bb80
RDX: 0000000000000000 RSI: 0000000000000200 RDI: 0000000000000000
RBP: ffffc90003c07600 R08: ffffffff82015d7a R09: ffffffff825bfb03
R10: 0000000000000003 R11: ffff888030f9bb80 R12: dffffc0000000000
R13: 1ffff92000780ea0 R14: 0000000000000200 R15: 0000000000000246
FS:  00007f8a8693e6c0(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8a8693f000 CR3: 0000000074487000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 __getblk_gfp+0x2d/0xa20 fs/buffer.c:1329
 __bread_gfp+0x2a/0x370 fs/buffer.c:1367
 sb_bread include/linux/buffer_head.h:338 [inline]
 exfat_get_dentry+0x64d/0x8f0 fs/exfat/dir.c:735
 exfat_readdir fs/exfat/dir.c:121 [inline]
 exfat_iterate+0xb4c/0x3270 fs/exfat/dir.c:257
 iterate_dir+0x224/0x560
 __do_sys_getdents64 fs/readdir.c:369 [inline]
 __se_sys_getdents64+0x209/0x4f0 fs/readdir.c:354
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f8a869817d9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 18 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f8a8693e218 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 00007f8a86a09708 RCX: 00007f8a869817d9
RDX: 0000000000000646 RSI: 0000000020000240 RDI: 0000000000000005
RBP: 00007f8a86a09700 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8a869d65e0
R13: 00007f8a869d507e R14: 00007f8a869d50e0 R15: 0030656c69662f2e
 </TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.078 msecs

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/30 15:02 linux-6.1.y 563edd786f0a d3ccff63 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan INFO: task hung in __fdget_pos
* Struck through repros no longer work on HEAD.