bisecting fixing commit since 3c8c23092588a23bf1856a64f58c37f477a413be building syzkaller on ed7d41c582d6f194ff35353d8bfdf7681dc0718e testing commit 3c8c23092588a23bf1856a64f58c37f477a413be compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 2468406169ec4cc4c8cbb9869d13df63e04e000b669327fa50d4da614dc4f1bd all runs: crashed: INFO: task hung in n_tty_poll testing current HEAD b172b44fcb1771e083aad806fa96f3f60e2ddfac testing commit b172b44fcb1771e083aad806fa96f3f60e2ddfac compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 64a1a744c7de1a4679835ee1ab873886bb283d66687b8506df0d3e071cdccde8 all runs: crashed: INFO: task hung in n_tty_poll revisions tested: 2, total time: 32m15.910497345s (build: 20m21.757283718s, test: 11m29.788928491s) the crash still happens on HEAD commit msg: Linux 4.19.206 crash: INFO: task hung in n_tty_poll Bluetooth: hci3: command 0x0406 tx timeout Bluetooth: hci0: command 0x0406 tx timeout Bluetooth: hci4: command 0x0406 tx timeout Bluetooth: hci5: command 0x0406 tx timeout Bluetooth: hci2: command 0x0406 tx timeout INFO: task syz-executor.3:9894 blocked for more than 140 seconds. Not tainted 4.19.206-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.3 D26984 9894 8481 0x00000004 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x80c/0x1f70 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 schedule_timeout+0x6f6/0xd20 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+0x3fb/0x5d0 kernel/sched/completion.c:115 wait_for_completion+0x18/0x20 kernel/sched/completion.c:136 __flush_work+0x401/0x820 kernel/workqueue.c:2926 flush_work+0xb/0x10 kernel/workqueue.c:2947 tty_buffer_flush_work+0xd/0x10 drivers/tty/tty_buffer.c:613 n_tty_poll+0x450/0x820 drivers/tty/n_tty.c:2410 tty_poll+0x104/0x160 drivers/tty/tty_io.c:2110 vfs_poll include/linux/poll.h:90 [inline] do_select+0x8de/0x1190 fs/select.c:507 core_sys_select+0x414/0x6b0 fs/select.c:650 do_pselect fs/select.c:731 [inline] __do_sys_pselect6 fs/select.c:772 [inline] __se_sys_pselect6+0x3a1/0x420 fs/select.c:757 __x64_sys_pselect6+0xdc/0x1a0 fs/select.c:757 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4665d9 Code: 6e 6f 6e 65 75 b4 31 c0 e9 5e ff ff ff 0f 1f 40 00 48 83 f8 05 75 1f 48 8b 4c 24 30 81 39 63 72 61 73 75 96 80 79 04 68 75 90 0b 00 00 00 66 90 e9 35 ff ff ff 48 83 f8 06 75 3d 48 8b 4c 24 RSP: 002b:00007f6fdfab6188 EFLAGS: 00000246 ORIG_RAX: 000000000000010e RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 00000000004665d9 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000040 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020000140 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffedc07f2cf R14: 00007f6fdfab6300 R15: 0000000000022000 INFO: task syz-executor.4:9936 blocked for more than 140 seconds. Not tainted 4.19.206-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.4 D27272 9936 8480 0x00000004 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x80c/0x1f70 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 schedule_timeout+0x6f6/0xd20 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+0x3fb/0x5d0 kernel/sched/completion.c:115 wait_for_completion+0x18/0x20 kernel/sched/completion.c:136 __flush_work+0x401/0x820 kernel/workqueue.c:2926 flush_work+0xb/0x10 kernel/workqueue.c:2947 tty_buffer_flush_work+0xd/0x10 drivers/tty/tty_buffer.c:613 n_tty_poll+0x450/0x820 drivers/tty/n_tty.c:2410 tty_poll+0x104/0x160 drivers/tty/tty_io.c:2110 vfs_poll include/linux/poll.h:90 [inline] do_select+0x8de/0x1190 fs/select.c:507 core_sys_select+0x414/0x6b0 fs/select.c:650 do_pselect fs/select.c:731 [inline] __do_sys_pselect6 fs/select.c:772 [inline] __se_sys_pselect6+0x3a1/0x420 fs/select.c:757 __x64_sys_pselect6+0xdc/0x1a0 fs/select.c:757 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4665d9 Code: Bad RIP value. RSP: 002b:00007f0635465188 EFLAGS: 00000246 ORIG_RAX: 000000000000010e RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 00000000004665d9 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000040 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020000140 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffd5794841f R14: 00007f0635465300 R15: 0000000000022000 INFO: task syz-executor.0:9943 blocked for more than 140 seconds. ieee802154 phy0 wpan0: encryption failed: -22 ieee802154 phy1 wpan1: encryption failed: -22 Not tainted 4.19.206-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.0 D27656 9943 8475 0x00000004 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x80c/0x1f70 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 schedule_timeout+0x6f6/0xd20 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+0x3fb/0x5d0 kernel/sched/completion.c:115 wait_for_completion+0x18/0x20 kernel/sched/completion.c:136 __flush_work+0x401/0x820 kernel/workqueue.c:2926 flush_work+0xb/0x10 kernel/workqueue.c:2947 tty_buffer_flush_work+0xd/0x10 drivers/tty/tty_buffer.c:613 n_tty_poll+0x450/0x820 drivers/tty/n_tty.c:2410 tty_poll+0x104/0x160 drivers/tty/tty_io.c:2110 vfs_poll include/linux/poll.h:90 [inline] do_select+0x8de/0x1190 fs/select.c:507 core_sys_select+0x414/0x6b0 fs/select.c:650 do_pselect fs/select.c:731 [inline] __do_sys_pselect6 fs/select.c:772 [inline] __se_sys_pselect6+0x3a1/0x420 fs/select.c:757 __x64_sys_pselect6+0xdc/0x1a0 fs/select.c:757 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4665d9 Code: Bad RIP value. RSP: 002b:00007fb247f97188 EFLAGS: 00000246 ORIG_RAX: 000000000000010e RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 00000000004665d9 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000040 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020000140 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffc695fbaff R14: 00007fb247f97300 R15: 0000000000022000 Showing all locks held in the system: 7 locks held by kworker/u4:0/7: 5 locks held by kworker/u4:1/23: 1 lock held by khungtaskd/1570: #0: 0000000065708e47 (rcu_read_lock){....}, at: debug_show_all_locks+0x5b/0x27a kernel/locking/lockdep.c:4443 1 lock held by in:imklog/7805: #0: 0000000091f8c30d (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xa7/0xd0 fs/file.c:767 6 locks held by kworker/u4:5/9740: 6 locks held by kworker/u4:7/9791: 1 lock held by syz-executor.5/9916: #0: 000000004d1086b2 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:362 1 lock held by syz-executor.3/9894: #0: 00000000fc34368c (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:362 6 locks held by kworker/u4:8/9917: 6 locks held by kworker/u4:9/9920: 1 lock held by syz-executor.4/9936: #0: 00000000c77b8d9b (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:362 1 lock held by syz-executor.0/9943: #0: 00000000c2806d3a (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:362 1 lock held by syz-executor.2/9960: #0: 00000000cba589c9 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:362 6 locks held by kworker/u4:10/9979: 1 lock held by syz-executor.1/9988: #0: 0000000091695728 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:362 1 lock held by syz-executor.1/9999: #0: 000000000b37cec0 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:362 ============================================= NMI backtrace for cpu 0 CPU: 0 PID: 1570 Comm: khungtaskd Not tainted 4.19.206-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+0x17c/0x226 lib/dump_stack.c:118 nmi_cpu_backtrace.cold.0+0x3c/0x78 lib/nmi_backtrace.c:101 nmi_trigger_cpumask_backtrace+0xf6/0x120 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:203 [inline] watchdog+0x5c3/0xb40 kernel/hung_task.c:287 kthread+0x347/0x410 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: 4695 Comm: systemd-journal Not tainted 4.19.206-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:do_syscall_64+0x2c1/0x4e0 arch/x86/entry/common.c:297 Code: fc ff df 48 89 fa 48 c1 ea 03 0f b6 04 02 84 c0 74 08 3c 03 0f 8e 67 01 00 00 83 63 08 f9 0f 1f 44 00 00 0f 00 2d df e0 ff 06 <48> 83 c4 08 5b 41 5c 41 5d 41 5e 5d c3 65 4c 8b 2c 25 c0 df 01 00 RSP: 0018:ffff8880a0eaff20 EFLAGS: 00000046 RAX: 0000000000000000 RBX: ffff8880a0ea0500 RCX: 0000000000000000 RDX: 1ffff110141d40a1 RSI: 0000000000000000 RDI: ffff8880a0ea0508 RBP: ffff8880a0eaff48 R08: ffffed10141d419a R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880a0eaff58 R13: ffff8880a0ea0500 R14: ffff8880a0ea0500 R15: 0000000000000000 FS: 00007fb807f058c0(0000) GS:ffff8880ba300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f64d7ca4740 CR3: 00000000a15ea000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fb807494840 Code: 73 01 c3 48 8b 0d 68 77 20 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 bb 20 00 00 75 10 b8 02 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 1e f6 ff ff 48 89 04 24 RSP: 002b:00007fffa08f8438 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: fffffffffffffffe RBX: 00007fffa08f8740 RCX: 00007fb807494840 RDX: 00000000000001a0 RSI: 0000000000080042 RDI: 0000558cb5ac42e0 RBP: 000000000000000d R08: 000000000000ffc0 R09: 00000000ffffffff R10: 0000000000000069 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000558cb5ac0040 R14: 00007fffa08f8700 R15: 0000558cb5accc20 ---------------- Code disassembly (best guess), 2 bytes skipped: 0: df 48 89 fisttps -0x77(%rax) 3: fa cli 4: 48 c1 ea 03 shr $0x3,%rdx 8: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax c: 84 c0 test %al,%al e: 74 08 je 0x18 10: 3c 03 cmp $0x3,%al 12: 0f 8e 67 01 00 00 jle 0x17f 18: 83 63 08 f9 andl $0xfffffff9,0x8(%rbx) 1c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 21: 0f 00 2d df e0 ff 06 verw 0x6ffe0df(%rip) # 0x6ffe107 * 28: 48 83 c4 08 add $0x8,%rsp <-- trapping instruction 2c: 5b pop %rbx 2d: 41 5c pop %r12 2f: 41 5d pop %r13 31: 41 5e pop %r14 33: 5d pop %rbp 34: c3 retq 35: 65 4c 8b 2c 25 c0 df mov %gs:0x1dfc0,%r13 3c: 01 00