INFO: task hung in tty_set_termios (2)

5 views
Skip to first unread message

syzbot

unread,
Feb 17, 2022, 4:04:23 PM2/17/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1281226c700000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=755bda9c740805ece0dc
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)

Unfortunately, I don't have any reproducer for this issue yet.

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

ieee802154 phy1 wpan1: encryption failed: -22
Bluetooth: hci3: command 0x0406 tx timeout
Bluetooth: hci1: command 0x0406 tx timeout
ieee802154 phy0 wpan0: encryption failed: -22
ieee802154 phy1 wpan1: encryption failed: -22
INFO: task syz-executor.3:5157 blocked for more than 140 seconds.
Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.3 D27568 5157 4602 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
__rwsem_down_write_failed_common kernel/locking/rwsem-xadd.c:589 [inline]
rwsem_down_write_failed+0x3aa/0x760 kernel/locking/rwsem-xadd.c:618
call_rwsem_down_write_failed+0x13/0x20 arch/x86/lib/rwsem.S:117
__down_write arch/x86/include/asm/rwsem.h:142 [inline]
down_write+0x4f/0x90 kernel/locking/rwsem.c:72
tty_set_termios+0xec/0x830 drivers/tty/tty_ioctl.c:328
set_termios.part.0+0x2b1/0x4c0 drivers/tty/tty_ioctl.c:414
set_termios drivers/tty/tty_ioctl.c:368 [inline]
tty_mode_ioctl+0xa05/0xb60 drivers/tty/tty_ioctl.c:781
n_tty_ioctl_helper+0x55/0x3a0 drivers/tty/tty_ioctl.c:940
n_tty_ioctl+0x56/0x360 drivers/tty/n_tty.c:2464
tty_ioctl+0x65d/0x1630 drivers/tty/tty_io.c:2678
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f54fe908059
Code: Bad RIP value.
RSP: 002b:00007f54fd27d168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f54fea1af60 RCX: 00007f54fe908059
RDX: 0000000020000000 RSI: 0000000000005406 RDI: 0000000000000004
RBP: 00007f54fe96208d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe9b44126f R14: 00007f54fd27d300 R15: 0000000000022000
INFO: task syz-executor.3:5162 blocked for more than 140 seconds.
Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.3 D29496 5162 4602 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
__rwsem_down_read_failed_common kernel/locking/rwsem-xadd.c:292 [inline]
rwsem_down_read_failed+0x20a/0x390 kernel/locking/rwsem-xadd.c:309
call_rwsem_down_read_failed+0x14/0x30 arch/x86/lib/rwsem.S:94
__down_read arch/x86/include/asm/rwsem.h:83 [inline]
down_read+0x44/0x80 kernel/locking/rwsem.c:26
set_termios.part.0+0x8a/0x4c0 drivers/tty/tty_ioctl.c:371
set_termios drivers/tty/tty_ioctl.c:368 [inline]
tty_mode_ioctl+0x34c/0xb60 drivers/tty/tty_ioctl.c:772
n_tty_ioctl_helper+0x55/0x3a0 drivers/tty/tty_ioctl.c:940
n_tty_ioctl+0x56/0x360 drivers/tty/n_tty.c:2464
tty_ioctl+0x65d/0x1630 drivers/tty/tty_io.c:2678
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f54fe908059
Code: Bad RIP value.
RSP: 002b:00007f54fd25c168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f54fea1b030 RCX: 00007f54fe908059
RDX: 00000000200003c0 RSI: 00000000402c542b RDI: 0000000000000004
RBP: 00007f54fe96208d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe9b44126f R14: 00007f54fd25c300 R15: 0000000000022000
INFO: task syz-executor.3:5163 blocked for more than 140 seconds.
Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.3 D28720 5163 4602 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_preempt_disabled+0xf/0x20 kernel/sched/core.c:3619
__mutex_lock_common kernel/locking/mutex.c:1016 [inline]
__mutex_lock+0x5f0/0x1190 kernel/locking/mutex.c:1078
paste_selection+0x125/0x470 drivers/tty/vt/selection.c:372
tioclinux+0x122/0x510 drivers/tty/vt/vt.c:3072
vt_ioctl+0x163e/0x2380 drivers/tty/vt/vt_ioctl.c:372
tty_ioctl+0x5b0/0x1630 drivers/tty/tty_io.c:2669
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f54fe908059
Code: Bad RIP value.
RSP: 002b:00007f54fd23b168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f54fea1b100 RCX: 00007f54fe908059
RDX: 0000000020000100 RSI: 000000000000541c RDI: 0000000000000004
RBP: 00007f54fe96208d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe9b44126f R14: 00007f54fd23b300 R15: 0000000000022000

Showing all locks held in the system:
1 lock held by khungtaskd/1570:
#0: 00000000f360da15 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
1 lock held by in:imklog/7808:
#0: 00000000edf71975 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
6 locks held by syz-executor.4/5143:
2 locks held by syz-executor.3/5157:
#0: 0000000075e2ab47 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
#1: 0000000027db9c8d (&tty->termios_rwsem){++++}, at: tty_set_termios+0xec/0x830 drivers/tty/tty_ioctl.c:328
2 locks held by syz-executor.3/5162:
#0: 0000000075e2ab47 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
#1: 0000000027db9c8d (&tty->termios_rwsem){++++}, at: set_termios.part.0+0x8a/0x4c0 drivers/tty/tty_ioctl.c:371
2 locks held by syz-executor.3/5163:
#0: 0000000075e2ab47 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
#1: 000000005b7ad02f (&buf->lock){+.+.}, at: paste_selection+0x125/0x470 drivers/tty/vt/selection.c:372

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

NMI backtrace for cpu 0
CPU: 0 PID: 1570 Comm: khungtaskd Not tainted 4.19.211-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: 5143 Comm: syz-executor.4 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:slow_down_io arch/x86/include/asm/paravirt.h:268 [inline]
RIP: 0010:inb_p arch/x86/include/asm/io.h:333 [inline]
RIP: 0010:vga_io_r include/video/vga.h:204 [inline]
RIP: 0010:vga_io_rgfx include/video/vga.h:389 [inline]
RIP: 0010:setcolor drivers/video/fbdev/vga16fb.c:170 [inline]
RIP: 0010:vga_imageblit_expand drivers/video/fbdev/vga16fb.c:1164 [inline]
RIP: 0010:vga16fb_imageblit+0x969/0x2260 drivers/video/fbdev/vga16fb.c:1260
Code: c7 c2 10 82 f1 89 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 74 14 00 00 ff 15 5d 06 53 06 ba cf 03 00 00 ec <48> c7 c2 10 82 f1 89 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80
RSP: 0018:ffff888053d4eff8 EFLAGS: 00000246
RAX: dffffc00000000ff RBX: 0000000000000007 RCX: ffffc90006ce3000
RDX: 00000000000003cf RSI: ffffffff839e79da RDI: ffff888053d4f198
RBP: ffff888053d4f18c R08: 0000000000000013 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffff8880b07abb48
R13: ffff888238ca4a91 R14: ffff888053d4f1a8 R15: 0000000000000001
FS: 00007f6b23002700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c017888c60 CR3: 000000009c00c000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000003 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
bit_putcs_unaligned drivers/video/fbdev/core/bitblit.c:139 [inline]
bit_putcs+0x6e2/0xd10 drivers/video/fbdev/core/bitblit.c:188
fbcon_putcs+0x336/0x4f0 drivers/video/fbdev/core/fbcon.c:1269
fbcon_redraw.constprop.0+0x41a/0x4b0 drivers/video/fbdev/core/fbcon.c:1646
fbcon_scroll+0x3ee/0x3440 drivers/video/fbdev/core/fbcon.c:1757
con_scroll+0x5f8/0x720 drivers/tty/vt/vt.c:637
lf+0x262/0x2b0 drivers/tty/vt/vt.c:1509
do_con_write+0x133e/0x1d90 drivers/tty/vt/vt.c:2786
con_put_char+0x96/0xe0 drivers/tty/vt/vt.c:3173
tty_put_char+0xb7/0x150 drivers/tty/tty_io.c:2892
do_output_char+0x155/0x850 drivers/tty/n_tty.c:486
__process_echoes+0x38e/0x9f0 drivers/tty/n_tty.c:737
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
paste_selection+0x1e5/0x470 drivers/tty/vt/selection.c:390
tioclinux+0x122/0x510 drivers/tty/vt/vt.c:3072
vt_ioctl+0x163e/0x2380 drivers/tty/vt/vt_ioctl.c:372
tty_ioctl+0x5b0/0x1630 drivers/tty/tty_io.c:2669
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f6b2468d059
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f6b23002168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f6b2479ff60 RCX: 00007f6b2468d059
RDX: 0000000020000100 RSI: 000000000000541c RDI: 0000000000000004
RBP: 00007f6b246e708d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffccab514df R14: 00007f6b23002300 R15: 0000000000022000
----------------
Code disassembly (best guess):
0: c7 c2 10 82 f1 89 mov $0x89f18210,%edx
6: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
d: fc ff df
10: 48 c1 ea 03 shr $0x3,%rdx
14: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
18: 0f 85 74 14 00 00 jne 0x1492
1e: ff 15 5d 06 53 06 callq *0x653065d(%rip) # 0x6530681
24: ba cf 03 00 00 mov $0x3cf,%edx
29: ec in (%dx),%al
* 2a: 48 c7 c2 10 82 f1 89 mov $0xffffffff89f18210,%rdx <-- trapping instruction
31: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
38: fc ff df
3b: 48 c1 ea 03 shr $0x3,%rdx
3f: 80 .byte 0x80


---
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

unread,
Oct 5, 2022, 6:41:31 PM10/5/22
to syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages