INFO: task hung in n_tty_poll

5 views
Skip to first unread message

syzbot

unread,
May 13, 2021, 3:45:21 AM5/13/21
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3c8c2309 Linux 4.19.190
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1023431bd00000
kernel config: https://syzkaller.appspot.com/x/.config?x=d3c2572d41264a3d
dashboard link: https://syzkaller.appspot.com/bug?extid=1d86cfc6e8375fd32c59
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=176517b3d00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14e70807d00000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+1d86cf...@syzkaller.appspotmail.com

Scheduler tracepoints stat_sleep, stat_iowait, stat_blocked and stat_runtime require the kernel parameter schedstats=enable or kernel.sched_schedstats=1
INFO: task syz-executor731:8105 blocked for more than 140 seconds.
Not tainted 4.19.190-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor731 D27216 8105 8104 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2828 [inline]
__schedule+0x887/0x2040 kernel/sched/core.c:3517
schedule+0x8d/0x1b0 kernel/sched/core.c:3561
schedule_timeout+0x92d/0xfe0 kernel/time/timer.c:1794
do_wait_for_common kernel/sched/completion.c:83 [inline]
__wait_for_common kernel/sched/completion.c:104 [inline]
wait_for_common+0x29c/0x470 kernel/sched/completion.c:115
__flush_work+0x4bb/0x8b0 kernel/workqueue.c:2925
n_tty_poll+0x54d/0x8f0 drivers/tty/n_tty.c:2410
tty_poll+0x139/0x1b0 drivers/tty/tty_io.c:2110
vfs_poll include/linux/poll.h:90 [inline]
do_select+0x8e1/0x1610 fs/select.c:507
core_sys_select+0x3ac/0x7e0 fs/select.c:650
do_pselect fs/select.c:731 [inline]
__do_sys_pselect6 fs/select.c:772 [inline]
__se_sys_pselect6+0x419/0x480 fs/select.c:757
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440309
Code: Bad RIP value.
RSP: 002b:00007ffdd0eaa0a8 EFLAGS: 00000246 ORIG_RAX: 000000000000010e
RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 0000000000440309
RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000040
RBP: 00007ffdd0eaa0e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000020000140 R11: 0000000000000246 R12: 00000000004038d0
R13: 431bde82d7b634db R14: 00000000004ae018 R15: 0000000000400488

Showing all locks held in the system:
6 locks held by kworker/u4:1/23:
1 lock held by khungtaskd/1569:
#0: 0000000006d274ec (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
1 lock held by in:imklog/7803:
#0: 00000000da72a794 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
1 lock held by syz-executor731/8105:
#0: 00000000d6999eda (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
no locks held by kworker/u4:4/8108.

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

NMI backtrace for cpu 0
CPU: 0 PID: 1569 Comm: khungtaskd Not tainted 4.19.190-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+0x1fc/0x2ef lib/dump_stack.c:118
nmi_cpu_backtrace.cold+0x63/0xa2 lib/nmi_backtrace.c:101
nmi_trigger_cpumask_backtrace+0x1a6/0x1f0 lib/nmi_backtrace.c:62
trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline]
watchdog+0x991/0xe60 kernel/hung_task.c:287
kthread+0x33f/0x460 kernel/kthread.c:259
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 23 Comm: kworker/u4:1 Not tainted 4.19.190-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events_unbound flush_to_ldisc
RIP: 0010:rcu_read_unlock_sched_notrace include/linux/rcupdate.h:771 [inline]
RIP: 0010:trace_lock_acquire include/trace/events/lock.h:13 [inline]
RIP: 0010:lock_acquire+0x2fb/0x3c0 kernel/locking/lockdep.c:3907
Code: fe ff ff 65 ff 05 35 aa b6 7e 48 8b 05 46 ae c3 09 e8 49 48 05 00 85 c0 74 09 80 3d e1 5d c3 09 00 74 3f 65 ff 0d 15 aa b6 7e <0f> 85 3e fe ff ff e8 2c 08 b5 ff e9 34 fe ff ff 0f 0b 0f 0b 0f 0b
RSP: 0018:ffff8880b504f808 EFLAGS: 00000082
RAX: 0000000000000000 RBX: ffff8880b5042600 RCX: 0000000000000001
RDX: 0000000000000001 RSI: 0000000000000002 RDI: ffff8880b5042e84
RBP: ffffffff8d434d60 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001
FS: 0000000000000000(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f11bb008000 CR3: 000000009f37d000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x8c/0xc0 kernel/locking/spinlock.c:152
debug_object_activate+0x12f/0x450 lib/debugobjects.c:472
debug_work_activate kernel/workqueue.c:491 [inline]
__queue_work+0x5bc/0x1100 kernel/workqueue.c:1462
queue_work_on+0x17e/0x1f0 kernel/workqueue.c:1488
pty_write+0x195/0x1f0 drivers/tty/pty.c:126
tty_put_char+0x122/0x150 drivers/tty/tty_io.c:2893
__process_echoes+0x583/0x9f0 drivers/tty/n_tty.c:727
flush_echoes drivers/tty/n_tty.c:827 [inline]
__receive_buf drivers/tty/n_tty.c:1646 [inline]
n_tty_receive_buf_common+0xc0c/0x2a90 drivers/tty/n_tty.c:1740
tty_ldisc_receive_buf+0xa9/0x190 drivers/tty/tty_buffer.c:456
tty_port_default_receive_buf+0x78/0xa0 drivers/tty/tty_port.c:38
receive_buf drivers/tty/tty_buffer.c:476 [inline]
flush_to_ldisc+0x21f/0x390 drivers/tty/tty_buffer.c:528
process_one_work+0x864/0x1570 kernel/workqueue.c:2152
worker_thread+0x64c/0x1130 kernel/workqueue.c:2295
kthread+0x33f/0x460 kernel/kthread.c:259
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages