syzbot


INFO: task hung in ptmx_open

Status: closed as invalid on 2022/02/08 09:40
Subsystems: serial
[Documentation on labels]
First crash: 1322d, last: 1247d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-49 INFO: task hung in ptmx_open 1 2478d 2478d 0/3 auto-closed as invalid on 2019/03/21 04:01

Sample crash report:
INFO: task syz-executor.1:9239 blocked for more than 143 seconds.
      Not tainted 5.17.0-rc2-syzkaller-00071-g1f2cfdd349b7 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.1  state:D stack:28616 pid: 9239 ppid:  8701 flags:0x00000004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4986 [inline]
 __schedule+0xab2/0x4db0 kernel/sched/core.c:6295
 schedule+0xd2/0x260 kernel/sched/core.c:6368
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6427
 __mutex_lock_common kernel/locking/mutex.c:673 [inline]
 __mutex_lock+0xa32/0x12f0 kernel/locking/mutex.c:733
 ptmx_open drivers/tty/pty.c:833 [inline]
 ptmx_open+0x103/0x360 drivers/tty/pty.c:800
 chrdev_open+0x266/0x770 fs/char_dev.c:414
 do_dentry_open+0x4b9/0x1240 fs/open.c:824
 do_open fs/namei.c:3476 [inline]
 path_openat+0x1c9e/0x2940 fs/namei.c:3609
 do_filp_open+0x1aa/0x400 fs/namei.c:3636
 do_sys_openat2+0x16d/0x4d0 fs/open.c:1214
 do_sys_open fs/open.c:1230 [inline]
 __do_sys_openat fs/open.c:1246 [inline]
 __se_sys_openat fs/open.c:1241 [inline]
 __x64_sys_openat+0x13f/0x1f0 fs/open.c:1241
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fb8f91b8059
RSP: 002b:00007fb8f7b2d168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fb8f92caf60 RCX: 00007fb8f91b8059
RDX: 0000000000000000 RSI: 00000000200000c0 RDI: ffffffffffffff9c
RBP: 00007fb8f921208d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffdceed786f R14: 00007fb8f7b2d300 R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8bb81120 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6460
2 locks held by getty/3274:
 #0: ffff88807ec65098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:244
 #1: ffffc90002b5b2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0xcf0/0x1230 drivers/tty/n_tty.c:2077
2 locks held by kworker/u4:1/8929:
 #0: ffff8880b9d39cd8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2b/0x120 kernel/sched/core.c:489
 #1: ffff8880b9d27948 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: process_one_work+0x8c4/0x1650 kernel/workqueue.c:2282
3 locks held by syz-executor.0/9241:
1 lock held by syz-executor.1/9239:
 #0: ffffffff8c5acb88 (tty_mutex){+.+.}-{3:3}, at: ptmx_open drivers/tty/pty.c:833 [inline]
 #0: ffffffff8c5acb88 (tty_mutex){+.+.}-{3:3}, at: ptmx_open+0x103/0x360 drivers/tty/pty.c:800
1 lock held by syz-executor.3/9284:
 #0: ffffffff8c5acb88 (tty_mutex){+.+.}-{3:3}, at: ptmx_open drivers/tty/pty.c:833 [inline]
 #0: ffffffff8c5acb88 (tty_mutex){+.+.}-{3:3}, at: ptmx_open+0x103/0x360 drivers/tty/pty.c:800
1 lock held by syz-executor.2/9327:
 #0: ffffffff8c5acb88 (tty_mutex){+.+.}-{3:3}, at: ptmx_open drivers/tty/pty.c:833 [inline]
 #0: ffffffff8c5acb88 (tty_mutex){+.+.}-{3:3}, at: ptmx_open+0x103/0x360 drivers/tty/pty.c:800

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.17.0-rc2-syzkaller-00071-g1f2cfdd349b7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 nmi_cpu_backtrace.cold+0x47/0x144 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1b3/0x230 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:212 [inline]
 watchdog+0xc1d/0xf50 kernel/hung_task.c:369
 kthread+0x2e9/0x3a0 kernel/kthread.c:377
 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: 8929 Comm: kworker/u4:1 Not tainted 5.17.0-rc2-syzkaller-00071-g1f2cfdd349b7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: bat_events batadv_nc_worker
RIP: 0010:prandom_u32+0x1ed/0x470 lib/random32.c:391
Code: 46 9c fd 84 db 0f 85 2b 01 00 00 e8 ed 42 9c fd bf 01 00 00 00 e8 93 41 74 fd 31 ff 65 8b 1d 5a 04 27 7c 89 de e8 f3 44 9c fd <85> db 0f 84 d4 01 00 00 e8 c6 42 9c fd 44 89 e0 48 83 c4 08 5b 5d
RSP: 0018:ffffc90003687ae8 EFLAGS: 00000046
RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000002
RDX: 0000000000000000 RSI: ffff88807e1740c0 RDI: 0000000000000003
RBP: ffff8880b9d36a20 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff83db6b6d R11: 0000000000000000 R12: 0000000041e6e83b
R13: ffff88807e174b20 R14: ffff88807e174b20 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fea14e4a680 CR3: 000000001fa4b000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __lock_pin_lock kernel/locking/lockdep.c:5409 [inline]
 lock_pin_lock+0x1a3/0x2c0 kernel/locking/lockdep.c:5703
 rq_pin_lock kernel/sched/sched.h:1539 [inline]
 rq_lock kernel/sched/sched.h:1617 [inline]
 __schedule+0x291/0x4db0 kernel/sched/core.c:6209
 preempt_schedule_common+0x45/0xc0 kernel/sched/core.c:6461
 preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:35
 __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline]
 _raw_spin_unlock_irq+0x3c/0x40 kernel/locking/spinlock.c:202
 process_one_work+0x8a2/0x1650 kernel/workqueue.c:2280
 worker_thread+0x657/0x1110 kernel/workqueue.c:2454
 kthread+0x2e9/0x3a0 kernel/kthread.c:377
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
----------------
Code disassembly (best guess):
   0:	46 9c                	rex.RX pushfq
   2:	fd                   	std
   3:	84 db                	test   %bl,%bl
   5:	0f 85 2b 01 00 00    	jne    0x136
   b:	e8 ed 42 9c fd       	callq  0xfd9c42fd
  10:	bf 01 00 00 00       	mov    $0x1,%edi
  15:	e8 93 41 74 fd       	callq  0xfd7441ad
  1a:	31 ff                	xor    %edi,%edi
  1c:	65 8b 1d 5a 04 27 7c 	mov    %gs:0x7c27045a(%rip),%ebx        # 0x7c27047d
  23:	89 de                	mov    %ebx,%esi
  25:	e8 f3 44 9c fd       	callq  0xfd9c451d
* 2a:	85 db                	test   %ebx,%ebx <-- trapping instruction
  2c:	0f 84 d4 01 00 00    	je     0x206
  32:	e8 c6 42 9c fd       	callq  0xfd9c42fd
  37:	44 89 e0             	mov    %r12d,%eax
  3a:	48 83 c4 08          	add    $0x8,%rsp
  3e:	5b                   	pop    %rbx
  3f:	5d                   	pop    %rbp

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/02/03 21:47 upstream 1f2cfdd349b7 30646bfe .config console log report info ci-upstream-kasan-gce-selinux-root INFO: task hung in ptmx_open
2022/02/03 12:34 upstream 88808fbbead4 4ebb2798 .config console log report info ci-upstream-kasan-gce INFO: task hung in ptmx_open
2021/11/23 04:29 upstream 136057256686 545ab074 .config console log report info ci-upstream-kasan-gce-selinux-root INFO: task hung in ptmx_open
2021/11/21 06:17 upstream 923dcc5eb0c1 4eb20a4e .config console log report info ci-upstream-kasan-gce-386 INFO: task hung in ptmx_open
* Struck through repros no longer work on HEAD.