syzbot


INFO: task hung in __fdget_pos (2)

Status: upstream: reported on 2024/08/11 21:32
Reported-by: syzbot+0c7b7b769bdadd5c27f2@syzkaller.appspotmail.com
First crash: 113d, last: 79d
Similar bugs (12)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in __fdget_pos kernfs 1 2444d 2444d 0/28 closed as invalid on 2018/03/27 11:08
android-44 INFO: task hung in __fdget_pos 2 2264d 2276d 0/2 auto-closed as invalid on 2019/03/21 05:21
linux-6.1 INFO: task hung in __fdget_pos 1 422d 422d 0/3 auto-obsoleted due to no activity on 2024/01/16 13:13
android-49 INFO: task hung in __fdget_pos 22 2265d 2396d 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 64d 457d 0/28 upstream: reported C repro on 2023/09/03 04:11
upstream INFO: task hung in __fdget_pos (3) fs 3 1151d 1168d 0/28 auto-closed as invalid on 2022/01/07 10:38
android-414 INFO: task hung in __fdget_pos 1 2133d 2064d 0/1 auto-closed as invalid on 2019/07/30 11:39
linux-5.15 INFO: task hung in __fdget_pos (2) 2 221d 232d 0/3 auto-obsoleted due to no activity on 2024/08/04 06:39
linux-5.15 INFO: task hung in __fdget_pos 1 613d 613d 0/3 auto-obsoleted due to no activity on 2023/07/29 10:54
upstream INFO: task hung in __fdget_pos (2) fs 36 2156d 2381d 0/28 closed as dup on 2018/10/27 13:29
linux-5.15 INFO: task hung in __fdget_pos (3) 50 26d 114d 0/3 upstream: reported on 2024/08/11 10:43
upstream INFO: task can't die in __fdget_pos fs 1 1026d 1026d 0/28 auto-closed as invalid on 2022/04/12 09:48

Sample crash report:
INFO: task syz.2.2733:13619 blocked for more than 143 seconds.
      Not tainted 6.1.104-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.2.2733      state:D stack:27288 pid:13619 ppid:11020  flags:0x00004004
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:1062
 fdget_pos include/linux/file.h:74 [inline]
 ksys_read+0x7e/0x2c0 fs/read_write.c:604
 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:0x7f95b05779f9
RSP: 002b:00007f95b13e3038 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007f95b0706058 RCX: 00007f95b05779f9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007f95b05e58ee R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f95b0706058 R15: 00007fffe0d23e28
 </TASK>

Showing all locks held in the system:
3 locks held by kworker/0:0/7:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8d32b190 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:516
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8d32b990 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:516
2 locks held by kworker/1:1/27:
 #0: ffff888012872138 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc90000a3fd20 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
1 lock held by khungtaskd/28:
 #0: ffffffff8d32afc0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #0: ffffffff8d32afc0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #0: ffffffff8d32afc0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6494
2 locks held by getty/3395:
 #0: ffff888028b07098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc900031332f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2198
3 locks held by kworker/1:3/3681:
 #0: ffff8880281d3538 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc9000439fd20 ((work_completion)(&(&ifa->dad_work)->work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #2: ffffffff8e4f7ce8 (rtnl_mutex){+.+.}-{3:3}, at: addrconf_dad_work+0xcc/0x16b0 net/ipv6/addrconf.c:4115
2 locks held by kworker/u4:13/3887:
 #0: ffff888012879138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc90004a27d20 ((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
3 locks held by kworker/1:15/9192:
 #0: ffff888012870938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc9000cd97d20 ((work_completion)(&data->fib_event_work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #2: ffff8880780dd240 (&data->fib_lock){+.+.}-{3:3}, at: nsim_fib_event_work+0x2cd/0x4120 drivers/net/netdevsim/fib.c:1489
3 locks held by syz.2.2733/13617:
1 lock held by syz.2.2733/13619:
 #0: ffff8880288d20e8 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2ba/0x360 fs/file.c:1062
1 lock held by syz-executor/15728:
 #0: ffffffff8e4f7ce8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:74 [inline]
 #0: ffffffff8e4f7ce8 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x7c1/0xff0 net/core/rtnetlink.c:6118
4 locks held by syz.1.3265/15999:
 #0: ffff88805795d098 (&tty->ldisc_sem){++++}-{0:0}, at: __tty_ldisc_lock drivers/tty/tty_ldisc.c:290 [inline]
 #0: ffff88805795d098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_lock_pair_timeout drivers/tty/tty_ldisc.c:336 [inline]
 #0: ffff88805795d098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_lock_pair drivers/tty/tty_ldisc.c:367 [inline]
 #0: ffff88805795d098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_release+0x58/0x200 drivers/tty/tty_ldisc.c:781
 #1: ffff88805795f098 (&tty->ldisc_sem/1){+.+.}-{0:0}, at: __tty_ldisc_lock_nested drivers/tty/tty_ldisc.c:296 [inline]
 #1: ffff88805795f098 (&tty->ldisc_sem/1){+.+.}-{0:0}, at: tty_ldisc_lock_pair_timeout drivers/tty/tty_ldisc.c:338 [inline]
 #1: ffff88805795f098 (&tty->ldisc_sem/1){+.+.}-{0:0}, at: tty_ldisc_lock_pair drivers/tty/tty_ldisc.c:367 [inline]
 #1: ffff88805795f098 (&tty->ldisc_sem/1){+.+.}-{0:0}, at: tty_ldisc_release+0x7c/0x200 drivers/tty/tty_ldisc.c:781
 #2: ffffffff8e4f7ce8 (rtnl_mutex){+.+.}-{3:3}, at: unregister_netdev+0x79/0x210 net/core/dev.c:10940
 #3: ffffffff8d3305b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:291 [inline]
 #3: ffffffff8d3305b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x4f0/0x930 kernel/rcu/tree_exp.h:962
1 lock held by dhcpcd-run-hook/16022:

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.1.104-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/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+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+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: 3797 Comm: kworker/u4:8 Not tainted 6.1.104-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Workqueue: phy53 ieee80211_iface_work
RIP: 0010:kfence_guarded_free+0x3ca/0x7f0 mm/kfence/core.c:499
Code: 44 89 f5 83 e5 07 81 f5 aa 00 00 00 89 ef 89 de e8 fb 6b a8 ff 39 dd 0f 85 7a 02 00 00 49 ff c6 4d 39 e6 73 2c e8 86 6a a8 ff <48> bd 00 00 00 00 00 fc ff df eb b7 44 89 f1 80 e1 07 38 c1 7c bc
RSP: 0018:ffffc90004777890 EFLAGS: 00000293
RAX: ffffffff81e2357a RBX: 00000000000000ad RCX: ffff888014f21dc0
RDX: 0000000000000000 RSI: 00000000000000ad RDI: 00000000000000ad
RBP: 00000000000000ad R08: ffffffff81e23565 R09: fffffbfff23feeff
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88823bd73000
R13: 1ffffffff23f9de6 R14: ffff88823bd724c0 R15: ffffffff91fcef30
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555d66787950 CR3: 000000000d08e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 ieee80211_ibss_rx_queued_mgmt+0x1b35/0x2dd0
 ieee80211_iface_process_skb net/mac80211/iface.c:1632 [inline]
 ieee80211_iface_work+0x7aa/0xce0 net/mac80211/iface.c:1686
 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/11 21:32 linux-6.1.y 36790ef5e00b 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in __fdget_pos
2024/09/14 19:37 linux-6.1.y 5f55cad62cc9 c7e35043 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in __fdget_pos
2024/09/14 19:36 linux-6.1.y 5f55cad62cc9 c7e35043 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in __fdget_pos
2024/09/14 19:34 linux-6.1.y 5f55cad62cc9 c7e35043 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in __fdget_pos
2024/08/11 23:13 linux-6.1.y 36790ef5e00b 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in __fdget_pos
* Struck through repros no longer work on HEAD.