syzbot


INFO: task hung in tty_release_struct (2)

Status: closed as invalid on 2022/02/07 19:19
Subsystems: serial
[Documentation on labels]
First crash: 949d, last: 813d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: task hung in tty_release_struct 1 495d 495d 0/1 auto-obsoleted due to no activity on 2023/04/15 07:55
linux-4.14 INFO: task hung in tty_release_struct 2 1455d 1565d 0/1 auto-closed as invalid on 2020/08/28 17:40
upstream INFO: task hung in tty_release_struct serial 2 1379d 1386d 0/26 auto-closed as invalid on 2020/10/13 06:21
upstream INFO: task hung in tty_release_struct (6) serial 1 101d 101d 0/26 auto-obsoleted due to no activity on 2024/04/13 21:30
upstream INFO: task hung in tty_release_struct (3) serial 3 755d 799d 0/26 auto-closed as invalid on 2022/06/29 20:46
android-414 INFO: task hung in tty_release_struct 7 1960d 1839d 0/1 auto-closed as invalid on 2019/06/10 11:00
upstream INFO: task hung in tty_release_struct (5) serial 1 290d 290d 0/26 auto-obsoleted due to no activity on 2023/10/07 22:46
upstream INFO: task hung in tty_release_struct (4) serial 2 574d 612d 0/26 auto-obsoleted due to no activity on 2023/01/03 08:49

Sample crash report:
INFO: task syz-executor.3:15152 blocked for more than 143 seconds.
      Not tainted 5.17.0-rc2-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.3  state:D stack:26576 pid:15152 ppid: 15137 flags:0x00004006
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
 tty_release_struct+0xa9/0xe0 drivers/tty/tty_io.c:1704
 tty_release+0xc70/0x1200 drivers/tty/tty_io.c:1865
 __fput+0x286/0x9f0 fs/file_table.c:311
 task_work_run+0xdd/0x1a0 kernel/task_work.c:164
 exit_task_work include/linux/task_work.h:32 [inline]
 do_exit+0xb29/0x2a30 kernel/exit.c:806
 do_group_exit+0xd2/0x2f0 kernel/exit.c:935
 get_signal+0x4b0/0x28c0 kernel/signal.c:2862
 arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:868
 handle_signal_work kernel/entry/common.c:148 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:172 [inline]
 exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300
 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f234c5a6059
RSP: 002b:00007f234aefa168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: 0000000000000000 RBX: 00007f234c6b9030 RCX: 00007f234c5a6059
RDX: 0000000000000000 RSI: 0000000000005608 RDI: 0000000000000010
RBP: 00007f234c60008d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f234cbecb1f R14: 00007f234aefa300 R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8bb83c20 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6460
2 locks held by getty/3274:
 #0: ffff88802345e098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:244
 #1: ffffc90002b632e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0xcf0/0x1230 drivers/tty/n_tty.c:2077
2 locks held by kworker/1:1/14058:
 #0: ffff8880b9d39c58 (&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: psi_task_switch+0x3e7/0x4e0 kernel/sched/psi.c:891
1 lock held by syz-executor.3/15152:
 #0: ffffffff8c5aeae8 (tty_mutex){+.+.}-{3:3}, at: tty_release_struct+0xa9/0xe0 drivers/tty/tty_io.c:1704
3 locks held by syz-executor.2/15156:

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.17.0-rc2-syzkaller #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: 14520 Comm: kworker/u4:2 Not tainted 5.17.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: phy4 ieee80211_iface_work
RIP: 0010:__this_cpu_preempt_check+0x0/0x20 lib/smp_processor_id.c:65
Code: e8 29 75 cc ff eb a2 0f 1f 00 0f 1f 44 00 00 48 c7 c6 e0 46 06 8a 48 c7 c7 20 47 06 8a e9 78 fe ff ff 0f 1f 84 00 00 00 00 00 <55> 48 89 fd 0f 1f 44 00 00 48 89 ee 5d 48 c7 c7 60 47 06 8a e9 57
RSP: 0018:ffffc9000ed97958 EFLAGS: 00000046
RAX: 0000000000000007 RBX: 1ffff92001db2f2e RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffffffff89ac6140
RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff8d93bb97
R10: fffffbfff1b27772 R11: 0000000000000000 R12: 0000000000000002
R13: 0000000000000000 R14: ffffffff8bb83c20 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f31350e1990 CR3: 000000000b88e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 lockdep_recursion_inc kernel/locking/lockdep.c:433 [inline]
 lock_acquire kernel/locking/lockdep.c:5638 [inline]
 lock_acquire+0x170/0x510 kernel/locking/lockdep.c:5604
 rcu_lock_acquire include/linux/rcupdate.h:268 [inline]
 rcu_read_lock include/linux/rcupdate.h:694 [inline]
 ieee80211_vif_get_shift net/mac80211/ieee80211_i.h:1072 [inline]
 ieee80211_sta_get_rates+0x13e/0x960 net/mac80211/util.c:2120
 ieee80211_update_sta_info net/mac80211/ibss.c:1003 [inline]
 ieee80211_rx_bss_info net/mac80211/ibss.c:1117 [inline]
 ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1610 [inline]
 ieee80211_ibss_rx_queued_mgmt+0x1131/0x3150 net/mac80211/ibss.c:1639
 ieee80211_iface_process_skb net/mac80211/iface.c:1527 [inline]
 ieee80211_iface_work+0xa69/0xd00 net/mac80211/iface.c:1581
 process_one_work+0x9ac/0x1650 kernel/workqueue.c:2307
 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:	e8 29 75 cc ff       	callq  0xffcc752e
   5:	eb a2                	jmp    0xffffffa9
   7:	0f 1f 00             	nopl   (%rax)
   a:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
   f:	48 c7 c6 e0 46 06 8a 	mov    $0xffffffff8a0646e0,%rsi
  16:	48 c7 c7 20 47 06 8a 	mov    $0xffffffff8a064720,%rdi
  1d:	e9 78 fe ff ff       	jmpq   0xfffffe9a
  22:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
  29:	00
* 2a:	55                   	push   %rbp <-- trapping instruction
  2b:	48 89 fd             	mov    %rdi,%rbp
  2e:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
  33:	48 89 ee             	mov    %rbp,%rsi
  36:	5d                   	pop    %rbp
  37:	48 c7 c7 60 47 06 8a 	mov    $0xffffffff8a064760,%rdi
  3e:	e9                   	.byte 0xe9
  3f:	57                   	push   %rdi

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/02/01 11:59 upstream 26291c54e111 c1c1631d .config console log report info ci-upstream-kasan-gce INFO: task hung in tty_release_struct
2022/01/29 11:04 upstream 169387e2aa29 495e00c5 .config console log report info ci-upstream-kasan-gce-root INFO: task hung in tty_release_struct
2022/01/28 05:06 upstream 23a46422c561 495e00c5 .config console log report info ci-upstream-kasan-gce-root INFO: task hung in tty_release_struct
2021/10/16 21:00 upstream 304040fb4909 0c5d9412 .config console log report info ci-upstream-kasan-gce-root INFO: task hung in tty_release_struct
2021/11/12 17:06 upstream 5833291ab6de 83f5c9b5 .config console log report info ci-upstream-kasan-gce-386 INFO: task hung in tty_release_struct
2021/11/03 15:53 upstream dcd68326d29b 4c1be0be .config console log report info ci-upstream-kasan-gce-386 INFO: task hung in tty_release_struct
2021/09/18 09:29 upstream 4357f03d6611 70b76c1d .config console log report info ci-upstream-kasan-gce-386 INFO: task hung in tty_release_struct
* Struck through repros no longer work on HEAD.