syzbot


INFO: task hung in tty_ldisc_hangup

Status: closed as dup on 2020/07/30 01:09
Reported-by: syzbot+3105793febc8f3e591ce@syzkaller.appspotmail.com
First crash: 1811d, last: 1736d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: no output from test machine (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit e8c75a30a23c6ba63f4ef6895cbf41fd42f21aa2
Author: Jiri Slaby <jslaby@suse.cz>
Date: Fri Feb 28 11:54:06 2020 +0000

  vt: selection, push sel_lock up

  
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
possible deadlock in tty_unthrottle serial 3 1705d 1729d
Discussions (1)
Title Replies (including bot) Last reply
INFO: task hung in tty_ldisc_hangup 0 (2) 2020/03/21 14:12
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: task hung in tty_ldisc_hangup (2) C error 1 1149d 1299d 0/1 upstream: reported C repro on 2021/05/02 05:40
upstream INFO: task hung in tty_ldisc_hangup (2) serial 1 1086d 1086d 0/28 closed as invalid on 2022/02/07 19:09
linux-4.14 INFO: task hung in tty_ldisc_hangup (2) 1 1348d 1348d 0/1 auto-closed as invalid on 2021/07/12 09:20
linux-4.19 INFO: task hung in tty_ldisc_hangup C done 10 1742d 1810d 1/1 fixed on 2020/03/16 09:27
upstream INFO: task hung in tty_ldisc_hangup (3) serial 1 122d 122d 0/28 auto-obsoleted due to no activity on 2024/10/20 03:25
linux-4.14 INFO: task hung in tty_ldisc_hangup C done 17 1739d 1810d 1/1 fixed on 2020/03/18 22:57
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2020/03/21 10:52 3h18m bisect fix upstream OK (1) job log
2020/01/26 21:41 23m bisect fix upstream OK (0) job log log

Sample crash report:
INFO: task login:9482 blocked for more than 143 seconds.
      Not tainted 5.5.0-rc2-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
login           D27648  9482      1 0x80000002
Call Trace:
 context_switch kernel/sched/core.c:3385 [inline]
 __schedule+0x934/0x1f90 kernel/sched/core.c:4081
 schedule+0xdc/0x2b0 kernel/sched/core.c:4155
 schedule_timeout+0x717/0xc50 kernel/time/timer.c:1871
 down_write_failed drivers/tty/tty_ldsem.c:262 [inline]
 __ldsem_down_write_nested+0x3b2/0x8f0 drivers/tty/tty_ldsem.c:324
 ldsem_down_write+0x33/0x40 drivers/tty/tty_ldsem.c:366
 __tty_ldisc_lock drivers/tty/tty_ldisc.c:315 [inline]
 tty_ldisc_lock+0x66/0xb0 drivers/tty/tty_ldisc.c:339
 tty_ldisc_hangup+0x1c6/0x640 drivers/tty/tty_ldisc.c:745
 __tty_hangup.part.0+0x2fb/0x750 drivers/tty/tty_io.c:625
 __tty_hangup drivers/tty/tty_io.c:575 [inline]
 tty_vhangup_session+0x25/0x30 drivers/tty/tty_io.c:735
 disassociate_ctty.part.0+0xb4/0x740 drivers/tty/tty_jobctrl.c:267
 disassociate_ctty+0x81/0xa0 drivers/tty/tty_jobctrl.c:261
 do_exit+0x1b42/0x2ef0 kernel/exit.c:795
 do_group_exit+0x135/0x360 kernel/exit.c:895
 __do_sys_exit_group kernel/exit.c:906 [inline]
 __se_sys_exit_group kernel/exit.c:904 [inline]
 __x64_sys_exit_group+0x44/0x50 kernel/exit.c:904
 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f535b3cd1e8
Code: Bad RIP value.
RSP: 002b:00007ffc776e75a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f535b3cd1e8
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00007f535b6a2840 R08: 00000000000000e7 R09: ffffffffffffffa8
R10: 00007f535b6a8740 R11: 0000000000000246 R12: 00007f535b6a2840
R13: 0000000000000001 R14: 0000000000000001 R15: 000000000060b798

Showing all locks held in the system:
1 lock held by khungtaskd/914:
 #0: ffffffff899a5680 (rcu_read_lock){....}, at: debug_show_all_locks+0x5f/0x279 kernel/locking/lockdep.c:5334
1 lock held by rsyslogd/9051:
 #0: ffff8880a937c860 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xee/0x110 fs/file.c:801
2 locks held by getty/9142:
 #0: ffff8880963e4090 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:340
 #1: ffffc9000178b2e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x220/0x1bf0 drivers/tty/n_tty.c:2156
2 locks held by getty/9143:
 #0: ffff8880a0b3c090 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:340
 #1: ffffc9000177b2e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x220/0x1bf0 drivers/tty/n_tty.c:2156
2 locks held by getty/9144:
 #0: ffff88809539e090 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:340
 #1: ffffc9000176b2e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x220/0x1bf0 drivers/tty/n_tty.c:2156
2 locks held by getty/9145:
 #0: ffff8880a2914090 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:340
 #1: ffffc9000170b2e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x220/0x1bf0 drivers/tty/n_tty.c:2156
2 locks held by getty/9146:
 #0: ffff8880a781e090 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:340
 #1: ffffc9000179b2e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x220/0x1bf0 drivers/tty/n_tty.c:2156
2 locks held by getty/9147:
 #0: ffff88821481a090 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:340
 #1: ffffc900011402e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x220/0x1bf0 drivers/tty/n_tty.c:2156
2 locks held by login/9482:
 #0: ffff8880a3846198 (&tty->legacy_mutex){+.+.}, at: tty_lock+0xc7/0x130 drivers/tty/tty_mutex.c:19
 #1: ffff8880a3846090 (&tty->ldisc_sem){++++}, at: ldsem_down_write+0x33/0x40 drivers/tty/tty_ldsem.c:366
2 locks held by syz-executor605/9574:

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

NMI backtrace for cpu 1
CPU: 1 PID: 914 Comm: khungtaskd Not tainted 5.5.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x197/0x210 lib/dump_stack.c:118
 nmi_cpu_backtrace.cold+0x70/0xb2 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x23b/0x28b lib/nmi_backtrace.c:62
 arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:205 [inline]
 watchdog+0xb11/0x10c0 kernel/hung_task.c:289
 kthread+0x361/0x430 kernel/kthread.c:255
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 9574 Comm: syz-executor605 Not tainted 5.5.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:rcu_lockdep_current_cpu_online+0x2b/0x130 kernel/rcu/tree.c:962
Code: 8b 15 d1 0f a0 7e 81 e2 00 00 10 00 b8 01 00 00 00 75 0a 8b 15 1a 8b 17 09 85 d2 75 01 c3 55 bf 01 00 00 00 48 89 e5 41 54 53 <48> 83 ec 08 e8 ec c1 ee ff e8 07 2d 31 02 48 c7 c3 00 81 03 00 48
RSP: 0018:ffffc90002c17688 EFLAGS: 00000002
RAX: 0000000000000001 RBX: ffffc90002c176e0 RCX: ffffffff8162ae44
RDX: 0000000000000001 RSI: 0000000000000004 RDI: 0000000000000001
RBP: ffffc90002c17698 R08: 1ffff11015d0703c R09: ffffed1015d0703d
R10: ffffed1015d0703c R11: ffff8880ae8381e3 R12: ffff8880ae838115
R13: ffff8880a8bd8040 R14: ffff8880a8bd8040 R15: ffff8880ae837358
FS:  00000000022b1880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000006d3080 CR3: 00000000a2c68000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 rcu_read_lock_held_common kernel/rcu/update.c:109 [inline]
 rcu_read_lock_held_common+0xbd/0x130 kernel/rcu/update.c:99
 rcu_read_lock_sched_held+0x5b/0xd0 kernel/rcu/update.c:120
 trace_rcu_utilization include/trace/events/rcu.h:27 [inline]
 trace_rcu_utilization include/trace/events/rcu.h:27 [inline]
 rcu_note_context_switch+0x108a/0x1910 kernel/rcu/tree_plugin.h:332
 __schedule+0x22a/0x1f90 kernel/sched/core.c:4019
 schedule+0xdc/0x2b0 kernel/sched/core.c:4155
 paste_selection+0x2f5/0x460 drivers/tty/vt/selection.c:367
 tioclinux+0x133/0x480 drivers/tty/vt/vt.c:3044
 vt_ioctl+0x1a41/0x26d0 drivers/tty/vt/vt_ioctl.c:364
 tty_ioctl+0xa37/0x14f0 drivers/tty/tty_io.c:2660
 vfs_ioctl fs/ioctl.c:47 [inline]
 file_ioctl fs/ioctl.c:545 [inline]
 do_vfs_ioctl+0x977/0x14e0 fs/ioctl.c:732
 ksys_ioctl+0xab/0xd0 fs/ioctl.c:749
 __do_sys_ioctl fs/ioctl.c:756 [inline]
 __se_sys_ioctl fs/ioctl.c:754 [inline]
 __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:754
 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x441a79
Code: e8 ec 03 03 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 0f 83 1b 0a fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffd3e475758 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441a79
RDX: 0000000020000040 RSI: 000000000000541c RDI: 0000000000000003
RBP: 00007ffd3e475780 R08: 000000000000000d R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000a874f
R13: 0000000000000004 R14: 00007ffd3e4757b0 R15: 0000000000000000

Crashes (15):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/12/23 10:28 upstream c60174717544 8b967267 .config console log report syz C ci-upstream-kasan-gce-root
2019/12/22 17:24 upstream b8e382a185eb 8b967267 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2019/12/16 03:13 upstream 07c4b9e9f71a eef6e580 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2019/12/15 16:15 upstream 07c4b9e9f71a eef6e580 .config console log report syz C ci-upstream-kasan-gce-root
2019/12/15 14:34 upstream 07c4b9e9f71a eef6e580 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2019/12/15 14:00 upstream 07c4b9e9f71a eef6e580 .config console log report syz C ci-upstream-kasan-gce-root
2019/12/11 01:46 upstream 6794862a16ef 5a5826a1 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2019/12/10 12:20 upstream 6794862a16ef 4b83c8fb .config console log report syz C ci-upstream-kasan-gce-selinux-root
2019/12/10 06:14 upstream 6794862a16ef 4b83c8fb .config console log report syz C ci-upstream-kasan-gce-root
2019/12/09 10:41 upstream e42617b825f8 1508f453 .config console log report syz C ci-upstream-kasan-gce-root
2019/12/07 02:08 upstream 7ada90eb9c7a 85f26751 .config console log report syz C ci-upstream-kasan-gce-root
2019/12/07 01:59 upstream 7ada90eb9c7a 85f26751 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/02/20 09:42 upstream ca7e1fd1026c 81230308 .config console log report ci-upstream-kasan-gce-root
2020/01/29 16:25 upstream b3a608222336 5ed23f9a .config console log report ci-upstream-kasan-gce-root
2019/12/17 17:55 upstream ea200dec5128 a6bc9c88 .config console log report ci-upstream-kasan-gce-root
* Struck through repros no longer work on HEAD.