INFO: task hung in ptmx_open

Status: upstream: reported on 2026/07/29 05:43
Reported-by: syzbot+323bac32de9cbe40c1da@syzkaller.appspotmail.com
First crash: 12d, last: 6h51m
Similar bugs (5)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in ptmx_open serial 1 4 1649d 1723d 0/29 closed as invalid on 2022/02/08 09:40
linux-6.1 INFO: task hung in ptmx_open 1 1 11d 11d 0/3 upstream: reported on 2026/07/30 13:51
android-49 INFO: task hung in ptmx_open 1 1 2880d 2880d 0/3 auto-closed as invalid on 2019/03/21 04:01
upstream INFO: task hung in ptmx_open (2) serial 1 6 469d 634d 0/29 auto-obsoleted due to no activity on 2025/07/27 16:38
upstream INFO: task hung in ptmx_open (3) prio:high serial 1 7 111d 320d 0/29 auto-obsoleted due to no activity on 2026/07/20 22:39

Sample crash report:
INFO: task syz.2.890:8319 blocked for more than 143 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.2.890       state:D stack:27888 pid: 8319 ppid:  8140 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5049 [inline]
 __schedule+0x11c3/0x4350 kernel/sched/core.c:6395
 schedule+0x11b/0x1e0 kernel/sched/core.c:6478
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6537
 __mutex_lock_common+0xdf5/0x2400 kernel/locking/mutex.c:669
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
 ptmx_open+0xd2/0x2c0 drivers/tty/pty.c:823
 chrdev_open+0x585/0x5f0 fs/char_dev.c:414
 do_dentry_open+0x7f7/0xf90 fs/open.c:826
 do_open fs/namei.c:3616 [inline]
 path_openat+0x2718/0x2fb0 fs/namei.c:3750
 do_filp_open+0x1df/0x400 fs/namei.c:3777
 do_sys_openat2+0x14b/0x500 fs/open.c:1255
 do_sys_open fs/open.c:1271 [inline]
 __do_sys_openat fs/open.c:1287 [inline]
 __se_sys_openat fs/open.c:1282 [inline]
 __x64_sys_openat+0x135/0x160 fs/open.c:1282
 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:0x7fd827aa00d9
RSP: 002b:00007fd825cf8028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fd827d27fa0 RCX: 00007fd827aa00d9
RDX: 0000000000000000 RSI: 0000200000000040 RDI: ffffffffffffff9c
RBP: 00007fd827b37024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fd827d28038 R14: 00007fd827d27fa0 R15: 00007fff41203828
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8c31ef60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3943:
 #0: ffff88807f609098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc900025e62e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x594/0x1a50 drivers/tty/n_tty.c:2158
4 locks held by udevd/4180:
 #0: ffff888022f74540 (&p->lock){+.+.}-{3:3}, at: seq_read_iter+0x9d/0xc50 fs/seq_file.c:182
 #1: ffff88801eab2888 (&of->mutex){+.+.}-{3:3}, at: kernfs_seq_start+0x55/0x3c0 fs/kernfs/file.c:112
 #2: ffff8880737c4830 (kn->active#32){++++}-{0:0}, at: kernfs_seq_start+0x75/0x3c0 fs/kernfs/file.c:113
 #3: ffff88805e3a8220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:809 [inline]
 #3: ffff88805e3a8220 (&dev->mutex){....}-{3:3}, at: uevent_show+0x16c/0x320 drivers/base/core.c:2408
6 locks held by kworker/0:13/5845:
 #0: ffff8881423fbd38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x75c/0xff0 kernel/workqueue.c:-1
 #1: ffffc9000356fd00 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x79e/0xff0 kernel/workqueue.c:2285
 #2: ffff8881480aa220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:809 [inline]
 #2: ffff8881480aa220 (&dev->mutex){....}-{3:3}, at: hub_event+0x178/0x5260 drivers/usb/core/hub.c:5827
 #3: ffff88805e3a8220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:809 [inline]
 #3: ffff88805e3a8220 (&dev->mutex){....}-{3:3}, at: __device_attach+0x85/0x480 drivers/base/dd.c:974
 #4: ffff88801e9fc1a8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:809 [inline]
 #4: ffff88801e9fc1a8 (&dev->mutex){....}-{3:3}, at: __device_attach+0x85/0x480 drivers/base/dd.c:974
 #5: ffffffff8c97f088 (registration_lock){+.+.}-{3:3}, at: register_framebuffer+0x8a/0xa70 drivers/video/fbdev/core/fbmem.c:1919
3 locks held by kworker/u4:8/6461:
3 locks held by syz.0.815/7789:
1 lock held by syz.2.890/8319:
 #0: ffffffff8c9f62e8 (tty_mutex){+.+.}-{3:3}, at: ptmx_open+0xd2/0x2c0 drivers/tty/pty.c:823
1 lock held by syz.4.1171/9324:
 #0: ffffffff8c9f62e8 (tty_mutex){+.+.}-{3:3}, at: ptmx_open+0xd2/0x2c0 drivers/tty/pty.c:823
1 lock held by syz.6.1201/9429:
 #0: ffffffff8c9f62e8 (tty_mutex){+.+.}-{3:3}, at: tty_open_by_driver drivers/tty/tty_io.c:2064 [inline]
 #0: ffffffff8c9f62e8 (tty_mutex){+.+.}-{3:3}, at: tty_open+0x20a/0xcd0 drivers/tty/tty_io.c:2148
1 lock held by syz.9.1303/9973:
 #0: ffffffff8c9f62e8 (tty_mutex){+.+.}-{3:3}, at: ptmx_open+0xd2/0x2c0 drivers/tty/pty.c:823
4 locks held by syz.2.1332/10094:
 #0: ffff888024e1f9f0 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2bf/0x370 fs/file.c:1056
 #1: ffff88807b6bc460 (sb_writers#8){.+.+}-{0:0}, at: vfs_write+0x296/0xd70 fs/read_write.c:590
 #2: ffff88806020a488 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x1dc/0x500 fs/kernfs/file.c:287
 #3: ffff8881480aa220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:809 [inline]
 #3: ffff8881480aa220 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1063 [inline]
 #3: ffff8881480aa220 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0x85/0x710 drivers/base/dd.c:1279
1 lock held by syz.2.1332/10097:
 #0: ffff888024e1f9f0 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2bf/0x370 fs/file.c:1056
1 lock held by syz.5.1441/10666:
 #0: ffffffff8c9f62e8 (tty_mutex){+.+.}-{3:3}, at: ptmx_open+0xd2/0x2c0 drivers/tty/pty.c:823
1 lock held by syz.3.1512/10922:
 #0: ffffffff8c9f62e8 (tty_mutex){+.+.}-{3:3}, at: tty_open_by_driver drivers/tty/tty_io.c:2064 [inline]
 #0: ffffffff8c9f62e8 (tty_mutex){+.+.}-{3:3}, at: tty_open+0x20a/0xcd0 drivers/tty/tty_io.c:2148
1 lock held by syz.8.1673/11687:
 #0: ffffffff8c9f62e8 (tty_mutex){+.+.}-{3:3}, at: ptmx_open+0xd2/0x2c0 drivers/tty/pty.c:823

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x3a2/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+0xe1b/0xe60 kernel/hung_task.c:369
 kthread+0x42e/0x520 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/10 22:21 linux-5.15.y aabd761612db 508909ea .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in ptmx_open
2026/08/09 02:01 linux-5.15.y aabd761612db 5d63f80b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in ptmx_open
2026/07/29 05:42 linux-5.15.y 674f684f7c61 19622d9d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in ptmx_open
* Struck through repros no longer work on HEAD.