INFO: task hung in n_tty_flush_buffer

7 views
Skip to first unread message

syzbot

unread,
Apr 17, 2018, 2:02:03 PM4/17/18
to syzkaller-upst...@googlegroups.com
Hello,

syzbot hit the following crash on upstream commit
a27fc14219f2e3c4a46ba9177b04d9b52c875532 (Mon Apr 16 21:07:39 2018 +0000)
Merge branch 'parisc-4.17-3' of
git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
syzbot dashboard link:
https://syzkaller.appspot.com/bug?extid=613b21bf2b213c5f7c3c

Unfortunately, I don't have any reproducer for this crash yet.
Raw console output:
https://syzkaller.appspot.com/x/log.txt?id=6284610820374528
Kernel config:
https://syzkaller.appspot.com/x/.config?id=-5914490758943236750
compiler: gcc (GCC) 8.0.1 20180413 (experimental)
CC: [gre...@linuxfoundation.org jsl...@suse.com
linux-...@vger.kernel.org]

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+613b21...@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for
details.
If you forward the report, please keep this part and the footer.

hfsplus: unable to find HFS+ superblock
ntfs: (device loop6): ntfs_fill_super(): Unable to determine device size.
ntfs: (device loop6): ntfs_fill_super(): Unable to determine device size.
INFO: task syz-executor1:11670 blocked for more than 120 seconds.
Not tainted 4.17.0-rc1+ #6
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor1 D21736 11670 4533 0x80000002
Call Trace:
context_switch kernel/sched/core.c:2848 [inline]
__schedule+0x801/0x1e30 kernel/sched/core.c:3490
schedule+0xef/0x430 kernel/sched/core.c:3549
__rwsem_down_write_failed_common+0x919/0x15d0
kernel/locking/rwsem-xadd.c:566
rwsem_down_write_failed+0xe/0x10 kernel/locking/rwsem-xadd.c:595
call_rwsem_down_write_failed+0x17/0x30 arch/x86/lib/rwsem.S:117
__down_write arch/x86/include/asm/rwsem.h:142 [inline]
down_write+0xa2/0x120 kernel/locking/rwsem.c:72
n_tty_flush_buffer+0x21/0x320 drivers/tty/n_tty.c:357
tty_ldisc_hangup+0x89/0x640 drivers/tty/tty_ldisc.c:728
__tty_hangup.part.21+0x2da/0x6e0 drivers/tty/tty_io.c:621
__tty_hangup drivers/tty/tty_io.c:571 [inline]
tty_vhangup+0x21/0x30 drivers/tty/tty_io.c:694
pty_close+0x3bd/0x510 drivers/tty/pty.c:78
tty_release+0x494/0x12e0 drivers/tty/tty_io.c:1656
__fput+0x34d/0x890 fs/file_table.c:209
____fput+0x15/0x20 fs/file_table.c:243
task_work_run+0x1e4/0x290 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x1aee/0x2730 kernel/exit.c:865
do_group_exit+0x16f/0x430 kernel/exit.c:968
get_signal+0x886/0x1960 kernel/signal.c:2469
do_signal+0x98/0x2040 arch/x86/kernel/signal.c:810
exit_to_usermode_loop+0x28a/0x310 arch/x86/entry/common.c:162
prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
syscall_return_slowpath arch/x86/entry/common.c:265 [inline]
do_syscall_64+0x6ac/0x800 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x455329
RSP: 002b:00007f9b96f05ce8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: 0000000000000000 RBX: 000000000072c260 RCX: 0000000000455329
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000072c260
RBP: 000000000072c260 R08: 0000000000000000 R09: 000000000072c238
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe76ef2d7f R14: 00007f9b96f069c0 R15: 0000000000000005

Showing all locks held in the system:
2 locks held by khungtaskd/890:
#0: 0000000019a33013 (rcu_read_lock){....}, at:
check_hung_uninterruptible_tasks kernel/hung_task.c:175 [inline]
#0: 0000000019a33013 (rcu_read_lock){....}, at: watchdog+0x1ff/0xf60
kernel/hung_task.c:249
#1: 0000000049608a43 (tasklist_lock){.+.+}, at:
debug_show_all_locks+0xde/0x34a kernel/locking/lockdep.c:4470
2 locks held by getty/4456:
#0: 000000003d4bd4ab (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
#1: 000000003fade098 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131
2 locks held by getty/4457:
#0: 00000000eeda7a6c (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
#1: 00000000cdc83e74 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131
2 locks held by getty/4458:
#0: 000000002ba0ffdb (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
#1: 000000000e10a1c0 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131
2 locks held by getty/4459:
#0: 00000000138eaeb2 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
#1: 000000006e8d44fb (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131
2 locks held by getty/4460:
#0: 000000004e1a034f (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
#1: 00000000da3c9343 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131
2 locks held by getty/4461:
#0: 000000009a431c91 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
#1: 000000005dc318fb (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131
2 locks held by getty/4462:
#0: 00000000cdfe49bd (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
#1: 00000000bf04b9e0 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131
4 locks held by syz-executor1/11670:
#0: 00000000ee693eec (&tty->legacy_mutex){+.+.}, at: tty_lock+0x70/0xa0
drivers/tty/tty_mutex.c:19
#1: 00000000bce71c64 (&tty->legacy_mutex/1){+.+.}, at: tty_lock+0x70/0xa0
drivers/tty/tty_mutex.c:19
#2: 00000000c902a37f (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x22/0x90
drivers/tty/tty_ldisc.c:298
#3: 0000000033c6820c (&o_tty->termios_rwsem/1){++++}, at:
n_tty_flush_buffer+0x21/0x320 drivers/tty/n_tty.c:357

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

NMI backtrace for cpu 1
CPU: 1 PID: 890 Comm: khungtaskd Not tainted 4.17.0-rc1+ #6
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+0x1b9/0x294 lib/dump_stack.c:113
nmi_cpu_backtrace.cold.4+0x19/0xce lib/nmi_backtrace.c:103
nmi_trigger_cpumask_backtrace+0x151/0x192 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:138 [inline]
check_hung_task kernel/hung_task.c:132 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:190 [inline]
watchdog+0xc10/0xf60 kernel/hung_task.c:249
kthread+0x345/0x410 kernel/kthread.c:238
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 318 Comm: kworker/u4:4 Not tainted 4.17.0-rc1+ #6
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Workqueue: events_unbound flush_to_ldisc
RIP: 0010:__read_once_size include/linux/compiler.h:188 [inline]
RIP: 0010:check_kcov_mode kernel/kcov.c:69 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0x26/0x50 kernel/kcov.c:101
RSP: 0018:ffff8801d9257258 EFLAGS: 00000246
RAX: ffff8801d9246280 RBX: 00000002dde0adeb RCX: ffffffff837fd2b9
RDX: 0000000000000000 RSI: ffffffff837fd2c8 RDI: 0000000000000001
RBP: ffff8801d9257258 R08: ffff8801d9246280 R09: 0000000000000006
R10: ffff8801d9246280 R11: 0000000000000000 R12: ffffc90001c27000
R13: 0000000000001cd5 R14: 0000000000000000 R15: 00000000000000ff
FS: 0000000000000000(0000) GS:ffff8801db000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9b96f05db8 CR3: 0000000008a6a000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__process_echoes+0x258/0x8d0 drivers/tty/n_tty.c:736
commit_echoes+0x163/0x1d0 drivers/tty/n_tty.c:764
n_tty_receive_char_fast drivers/tty/n_tty.c:1416 [inline]
n_tty_receive_buf_fast drivers/tty/n_tty.c:1576 [inline]
__receive_buf drivers/tty/n_tty.c:1611 [inline]
n_tty_receive_buf_common+0x2048/0x2c50 drivers/tty/n_tty.c:1709
n_tty_receive_buf2+0x33/0x40 drivers/tty/n_tty.c:1744
tty_ldisc_receive_buf+0xb0/0x190 drivers/tty/tty_buffer.c:456
tty_port_default_receive_buf+0x110/0x170 drivers/tty/tty_port.c:38
receive_buf drivers/tty/tty_buffer.c:475 [inline]
flush_to_ldisc+0x3e9/0x560 drivers/tty/tty_buffer.c:524
process_one_work+0xc1e/0x1b50 kernel/workqueue.c:2145
process_scheduled_works kernel/workqueue.c:2205 [inline]
worker_thread+0xb0d/0x1440 kernel/workqueue.c:2281
kthread+0x345/0x410 kernel/kthread.c:238
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412
Code: 08 5d c3 66 90 55 65 48 8b 04 25 c0 ed 01 00 65 8b 15 af bd 88 7e 48
89 e5 81 e2 00 01 1f 00 48 8b 75 08 75 2b 8b 90 78 12 00 00 <83> fa 02 75
20 48 8b 88 80 12 00 00 8b 80 7c 12 00 00 48 8b 11


---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to syzk...@googlegroups.com.

syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is
merged
into any tree, please reply to this email with:
#syz fix: exact-commit-title
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line in the email body.
To upstream this report, please reply with:
#syz upstream

Dmitry Vyukov

unread,
Apr 19, 2018, 1:11:42 PM4/19/18
to syzbot, 'Dmitry Vyukov' via syzkaller-upstream-moderation
Looks like a dup of "INFO: rcu detected stall in __process_echoes"
> --
> You received this message because you are subscribed to the Google Groups
> "syzkaller-upstream-moderation" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to syzkaller-upstream-m...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/syzkaller-upstream-moderation/94eb2c0bdc72aa96c2056a0f229a%40google.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages