syzbot


INFO: task hung in tty_ioctl

Status: public: reported C repro on 2019/04/12 00:01
Reported-by: syzbot+5de495773a78619a91c1@syzkaller.appspotmail.com
First crash: 2257d, last: 2196d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in tty_ioctl serial 6 2192d 2259d 0/28 auto-closed as invalid on 2019/05/20 08:04
upstream INFO: task hung in tty_ioctl (2) serial syz inconclusive 3 1035d 1134d 0/28 closed as invalid on 2022/02/08 10:20
android-44 INFO: task hung in tty_ioctl C 4 2145d 2049d 0/2 public: reported C repro on 2019/04/13 00:00
linux-6.1 INFO: task hung in tty_ioctl 1 45d 45d 0/3 upstream: reported on 2024/10/07 00:27
android-49 INFO: task hung in tty_ioctl C 22 1819d 2048d 0/3 public: reported C repro on 2019/04/14 00:00

Sample crash report:
INFO: task syz-executor556:2016 blocked for more than 140 seconds.
      Not tainted 4.14.81+ #6
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor556 D29656  2016      1 0x00000000
Call Trace:
 schedule+0x7f/0x1b0 kernel/sched/core.c:3490
 schedule_timeout+0x710/0xe60 kernel/time/timer.c:1721
 down_read_failed drivers/tty/tty_ldsem.c:242 [inline]
 __ldsem_down_read_nested+0x2ca/0x5b0 drivers/tty/tty_ldsem.c:332
 tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
 tty_ioctl+0x4cb/0x13e0 drivers/tty/tty_io.c:2654
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:500 [inline]
 do_vfs_ioctl+0x1a0/0x1030 fs/ioctl.c:684
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x7e/0xb0 fs/ioctl.c:692
 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x440e79
RSP: 002b:00007ffed6d2fc48 EFLAGS: 00000217 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000440e79
RDX: 0000000020000000 RSI: 0000000000001261 RDI: 0000000000000002
RBP: 0000000000000000 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000ffffffff R11: 0000000000000217 R12: 000000000005cf10
R13: 0000000000401e50 R14: 0000000000000000 R15: 0000000000000000
INFO: task syz-executor556:2041 blocked for more than 140 seconds.
      Not tainted 4.14.81+ #6
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor556 D29656  2041      1 0x00000000
Call Trace:
 schedule+0x7f/0x1b0 kernel/sched/core.c:3490
 schedule_timeout+0x710/0xe60 kernel/time/timer.c:1721
 down_read_failed drivers/tty/tty_ldsem.c:242 [inline]
 __ldsem_down_read_nested+0x2ca/0x5b0 drivers/tty/tty_ldsem.c:332
 tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
 tty_ioctl+0x4cb/0x13e0 drivers/tty/tty_io.c:2654
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:500 [inline]
 do_vfs_ioctl+0x1a0/0x1030 fs/ioctl.c:684
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x7e/0xb0 fs/ioctl.c:692
 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x440e79
RSP: 002b:00007ffed6d2fc48 EFLAGS: 00000217 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000440e79
RDX: 0000000020000000 RSI: 0000000000001261 RDI: 0000000000000004
RBP: 0000000000000000 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000ffffffff R11: 0000000000000217 R12: 000000000005cf1e
R13: 0000000000401e50 R14: 0000000000000000 R15: 0000000000000000
INFO: task syz-executor556:2092 blocked for more than 140 seconds.
      Not tainted 4.14.81+ #6
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor556 D28712  2092      1 0x00000004
Call Trace:
 schedule+0x7f/0x1b0 kernel/sched/core.c:3490
 schedule_timeout+0x710/0xe60 kernel/time/timer.c:1721
 down_read_failed drivers/tty/tty_ldsem.c:242 [inline]
 __ldsem_down_read_nested+0x2ca/0x5b0 drivers/tty/tty_ldsem.c:332
 tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
 tty_ioctl+0x4cb/0x13e0 drivers/tty/tty_io.c:2654
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:500 [inline]
 do_vfs_ioctl+0x1a0/0x1030 fs/ioctl.c:684
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x7e/0xb0 fs/ioctl.c:692
 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x440e79
RSP: 002b:00007ffed6d2fc48 EFLAGS: 00000207 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000440e79
RDX: 0000000020000000 RSI: 0000000000001261 RDI: 0000000000000005
RBP: 0000000000000000 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000207 R12: 000000000005cf6e
R13: 0000000000401e50 R14: 0000000000000000 R15: 0000000000000000
INFO: task syz-executor556:2162 blocked for more than 140 seconds.
      Not tainted 4.14.81+ #6
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor556 D29656  2162      1 0x00000000
Call Trace:
 schedule+0x7f/0x1b0 kernel/sched/core.c:3490
 schedule_timeout+0x710/0xe60 kernel/time/timer.c:1721
 down_read_failed drivers/tty/tty_ldsem.c:242 [inline]
 __ldsem_down_read_nested+0x2ca/0x5b0 drivers/tty/tty_ldsem.c:332
 tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
 tty_ioctl+0x4cb/0x13e0 drivers/tty/tty_io.c:2654
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:500 [inline]
 do_vfs_ioctl+0x1a0/0x1030 fs/ioctl.c:684
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x7e/0xb0 fs/ioctl.c:692
 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x440e79
RSP: 002b:00007ffed6d2fc48 EFLAGS: 00000217 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000440e79
RDX: 0000000020000000 RSI: 0000000000001261 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000b004002c8 R09: 0000000b004002c8
R10: 00000000ffffffff R11: 0000000000000217 R12: 000000000005d0cd
R13: 0000000000401e50 R14: 0000000000000000 R15: 0000000000000000
INFO: task syz-executor556:2368 blocked for more than 140 seconds.
      Not tainted 4.14.81+ #6
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor556 D29752  2368      1 0x00000000
Call Trace:
 schedule+0x7f/0x1b0 kernel/sched/core.c:3490
 schedule_timeout+0x710/0xe60 kernel/time/timer.c:1721
 down_read_failed drivers/tty/tty_ldsem.c:242 [inline]
 __ldsem_down_read_nested+0x2ca/0x5b0 drivers/tty/tty_ldsem.c:332
 tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
 tty_ioctl+0x4cb/0x13e0 drivers/tty/tty_io.c:2654
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:500 [inline]
 do_vfs_ioctl+0x1a0/0x1030 fs/ioctl.c:684
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x7e/0xb0 fs/ioctl.c:692
 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x440e79
RSP: 002b:00007ffed6d2fc48 EFLAGS: 00000203 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000440e79
RDX: 0000000020000000 RSI: 0000000000001261 RDI: 0000000000000002
RBP: 0000000000000000 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000203 R12: 000000000005e1ac
R13: 0000000000401e50 R14: 0000000000000000 R15: 0000000000000000

Showing all locks held in the system:
1 lock held by khungtaskd/23:
 #0:  (tasklist_lock){.+.+}, at: [<ffffffffb74023b7>] debug_show_all_locks+0x74/0x20f kernel/locking/lockdep.c:4541
2 locks held by getty/1762:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffffb7f384af>] n_tty_read+0x1ff/0x15e0 drivers/tty/n_tty.c:2142
2 locks held by syz-executor556/2013:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffffb7f384af>] n_tty_read+0x1ff/0x15e0 drivers/tty/n_tty.c:2142
1 lock held by syz-executor556/2016:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
2 locks held by syz-executor556/2037:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffffb7f384af>] n_tty_read+0x1ff/0x15e0 drivers/tty/n_tty.c:2142
1 lock held by syz-executor556/2041:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
1 lock held by syz-executor556/2092:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
2 locks held by syz-executor556/2098:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffffb7f384af>] n_tty_read+0x1ff/0x15e0 drivers/tty/n_tty.c:2142
2 locks held by syz-executor556/2153:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffffb7f384af>] n_tty_read+0x1ff/0x15e0 drivers/tty/n_tty.c:2142
1 lock held by syz-executor556/2162:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
2 locks held by syz-executor556/2181:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffffb7f384af>] n_tty_read+0x1ff/0x15e0 drivers/tty/n_tty.c:2142
1 lock held by syz-executor556/2368:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
2 locks held by syz-executor556/2369:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffffb7f384af>] n_tty_read+0x1ff/0x15e0 drivers/tty/n_tty.c:2142
1 lock held by syz-executor556/3498:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
1 lock held by syz-executor556/3503:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
2 locks held by syz-executor556/3504:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffffb7f384af>] n_tty_read+0x1ff/0x15e0 drivers/tty/n_tty.c:2142
2 locks held by syz-executor556/3505:
 #0:  (&tty->legacy_mutex){+.+.}, at: [<ffffffffb7f428ed>] tty_lock+0x5d/0x70 drivers/tty/tty_mutex.c:19
 #1:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3d949>] __tty_ldisc_lock drivers/tty/tty_ldisc.c:323 [inline]
 #1:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3d949>] tty_ldisc_lock+0x19/0x40 drivers/tty/tty_ldisc.c:342
1 lock held by syz-executor556/3508:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
2 locks held by syz-executor556/3509:
 #0:  (&tty->legacy_mutex){+.+.}, at: [<ffffffffb7f428ed>] tty_lock+0x5d/0x70 drivers/tty/tty_mutex.c:19
 #1:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3d949>] __tty_ldisc_lock drivers/tty/tty_ldisc.c:323 [inline]
 #1:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3d949>] tty_ldisc_lock+0x19/0x40 drivers/tty/tty_ldisc.c:342
2 locks held by syz-executor556/3510:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffffb7f384af>] n_tty_read+0x1ff/0x15e0 drivers/tty/n_tty.c:2142
1 lock held by syz-executor556/3513:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
2 locks held by syz-executor556/3514:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffffb7f384af>] n_tty_read+0x1ff/0x15e0 drivers/tty/n_tty.c:2142
2 locks held by syz-executor556/3515:
 #0:  (&tty->legacy_mutex){+.+.}, at: [<ffffffffb7f428ed>] tty_lock+0x5d/0x70 drivers/tty/tty_mutex.c:19
 #1:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3d949>] __tty_ldisc_lock drivers/tty/tty_ldisc.c:323 [inline]
 #1:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3d949>] tty_ldisc_lock+0x19/0x40 drivers/tty/tty_ldisc.c:342
1 lock held by syz-executor556/3518:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
2 locks held by syz-executor556/3519:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3cf30>] tty_ldisc_ref_wait+0x20/0x80 drivers/tty/tty_ldisc.c:275
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffffb7f384af>] n_tty_read+0x1ff/0x15e0 drivers/tty/n_tty.c:2142
2 locks held by syz-executor556/3520:
 #0:  (&tty->legacy_mutex){+.+.}, at: [<ffffffffb7f428ed>] tty_lock+0x5d/0x70 drivers/tty/tty_mutex.c:19
 #1:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3d949>] __tty_ldisc_lock drivers/tty/tty_ldisc.c:323 [inline]
 #1:  (&tty->ldisc_sem){++++}, at: [<ffffffffb7f3d949>] tty_ldisc_lock+0x19/0x40 drivers/tty/tty_ldisc.c:342

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

NMI backtrace for cpu 1
CPU: 1 PID: 23 Comm: khungtaskd Not tainted 4.14.81+ #6
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0xb9/0x11b lib/dump_stack.c:53
 nmi_cpu_backtrace.cold.0+0x47/0x85 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x121/0x146 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:138 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:196 [inline]
 watchdog+0x574/0xa70 kernel/hung_task.c:252
 kthread+0x348/0x420 kernel/kthread.c:232
 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:402
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 2183 Comm: syz-executor556 Not tainted 4.14.81+ #6
task: ffff8801cb1a9780 task.stack: ffff8801cb0f0000
RIP: 0010:entry_SYSCALL_64_after_hwframe+0x4b/0xb7
RSP: 0018:ffff8801cb0f7f58 EFLAGS: 00000097
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 1ffff100396352f1 RSI: 0000000000000000 RDI: ffff8801cb1a9788
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000d38880(0000) GS:ffff8801dba00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fffa72c5e30 CR3: 00000001cb21e005 CR4: 00000000001606b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
RIP: 0033:0x400f7a
RSP: 002b:00007ffed6d2fad8 EFLAGS: 00000246 ORIG_RAX: 000000000000003d
RAX: fffffffffffffff6 RBX: 00000000ffffffff RCX: 0000000000400f7a
RDX: 0000000040000000 RSI: 00007ffed6d2fc54 RDI: ffffffffffffffff
RBP: 0000000000000003 R08: 00000000004002c8 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffed6d2fc54
R13: 00000000ffffffff R14: 0000000000000000 R15: 0000000000000000
Code: ed 41 54 45 31 e4 41 55 45 31 ed 41 56 45 31 f6 41 57 45 31 ff e8 e7 20 60 fe 48 89 e7 e8 5a 4f 60 fe 0f ba a4 24 90 00 00 00 09 <73> 05 e8 b3 20 60 fe 48 8b 4c 24 58 4c 8b 9c 24 80 00 00 00 49 

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/11/17 06:39 android-4.14 4e76528bd48d b08ee62a .config console log report syz C ci-android-414-kasan-gce-root
2018/11/15 20:29 android-4.14 4e76528bd48d 3a41052e .config console log report ci-android-414-kasan-gce-root
2018/09/16 19:02 android-4.14 f8223ece3a67 a343a400 .config console log report ci-android-414-kasan-gce-root
* Struck through repros no longer work on HEAD.