BUG: workqueue lockup - pool cpus=1 node=0 flags=0x0 nice=0 stuck for 123s! BUG: workqueue lockup - pool cpus=1 node=0 flags=0x0 nice=-20 stuck for 121s! Showing busy workqueues and worker pools: workqueue events: flags=0x0 pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=9/256 pending: destroy_super_work, defense_work_handler, defense_work_handler, defense_work_handler, defense_work_handler, defense_work_handler, perf_sched_delayed, cache_reap, check_corruption workqueue events_unbound: flags=0x2 pwq 4: cpus=0-1 flags=0x4 nice=0 active=2/512 in-flight: 6:flush_to_ldisc flush_to_ldisc workqueue events_power_efficient: flags=0x80 pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=1/256 pending: do_cache_clean workqueue rcu_gp: flags=0x8 pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/256 in-flight: 6706:wait_rcu_exp_gp workqueue mm_percpu_wq: flags=0x8 pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=1/256 pending: vmstat_update workqueue kblockd: flags=0x18 pwq 3: cpus=1 node=0 flags=0x0 nice=-20 active=2/256 pending: blk_mq_timeout_work, blk_mq_timeout_work workqueue dm_bufio_cache: flags=0x8 pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=1/256 pending: work_fn pool 0: cpus=0 node=0 flags=0x0 nice=0 hung=0s workers=5 idle: 2107 1980 4 25 pool 4: cpus=0-1 flags=0x4 nice=0 hung=63s workers=6 idle: 6832 22 42 66 748 INFO: task syz-executor1:9608 blocked for more than 120 seconds. Not tainted 4.17.0-rc3+ #32 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor1 D20536 9608 4536 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:724 __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:0x455979 RSP: 002b:00007f51d8d23ce8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000072c028 RCX: 0000000000455979 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000072c028 RBP: 000000000072c028 R08: 0000000000000000 R09: 000000000072c000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc33f556df R14: 00007f51d8d249c0 R15: 0000000000000002 Showing all locks held in the system: 2 locks held by khungtaskd/893: #0: 00000000703bb938 (rcu_read_lock){....}, at: check_hung_uninterruptible_tasks kernel/hung_task.c:175 [inline] #0: 00000000703bb938 (rcu_read_lock){....}, at: watchdog+0x1ff/0xf60 kernel/hung_task.c:249 #1: 0000000091d4490c (tasklist_lock){.+.+}, at: debug_show_all_locks+0xde/0x34a kernel/locking/lockdep.c:4470 2 locks held by getty/4458: #0: 000000006b041d31 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 000000007bf5abfe (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131 2 locks held by getty/4459: #0: 00000000461ea14a (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 00000000991b2fab (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131 2 locks held by getty/4460: #0: 00000000fb247faf (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 000000009c7a7883 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131 2 locks held by getty/4461: #0: 000000005d2ecf24 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 000000009b112d03 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131 2 locks held by getty/4462: #0: 000000007b3a41d7 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 000000002e3c4641 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131 2 locks held by getty/4463: #0: 000000009b1d2a47 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 00000000557f2958 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131 2 locks held by getty/4464: #0: 00000000a6d3a438 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 000000007ff5555e (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131 1 lock held by syz-executor1/4536: #0: 00000000483b7cfc (rcu_sched_state.exp_mutex){+.+.}, at: exp_funnel_lock kernel/rcu/tree_exp.h:281 [inline] #0: 00000000483b7cfc (rcu_sched_state.exp_mutex){+.+.}, at: _synchronize_rcu_expedited.constprop.73+0x9dd/0xad0 kernel/rcu/tree_exp.h:616 2 locks held by kworker/0:4/6706: #0: 00000000e0261665 ((wq_completion)"rcu_gp"){+.+.}, at: __write_once_size include/linux/compiler.h:215 [inline] #0: 00000000e0261665 ((wq_completion)"rcu_gp"){+.+.}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: 00000000e0261665 ((wq_completion)"rcu_gp"){+.+.}, at: atomic64_set include/asm-generic/atomic-instrumented.h:40 [inline] #0: 00000000e0261665 ((wq_completion)"rcu_gp"){+.+.}, at: atomic_long_set include/asm-generic/atomic-long.h:57 [inline] #0: 00000000e0261665 ((wq_completion)"rcu_gp"){+.+.}, at: set_work_data kernel/workqueue.c:617 [inline] #0: 00000000e0261665 ((wq_completion)"rcu_gp"){+.+.}, at: set_work_pool_and_clear_pending kernel/workqueue.c:644 [inline] #0: 00000000e0261665 ((wq_completion)"rcu_gp"){+.+.}, at: process_one_work+0xaef/0x1b50 kernel/workqueue.c:2116 #1: 00000000b65f2c9d ((work_completion)(&rew.rew_work)){+.+.}, at: process_one_work+0xb46/0x1b50 kernel/workqueue.c:2120 4 locks held by syz-executor1/9608: #0: 000000001abb88eb (&tty->legacy_mutex){+.+.}, at: tty_lock+0x70/0xa0 drivers/tty/tty_mutex.c:19 #1: 00000000400bc694 (&tty->legacy_mutex/1){+.+.}, at: tty_lock+0x70/0xa0 drivers/tty/tty_mutex.c:19 #2: 0000000094b050ad (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x22/0x90 drivers/tty/tty_ldisc.c:297 #3: 000000004e0f95c7 (&o_tty->termios_rwsem/1){++++}, at: n_tty_flush_buffer+0x21/0x320 drivers/tty/n_tty.c:357 ============================================= NMI backtrace for cpu 0 CPU: 0 PID: 893 Comm: khungtaskd Not tainted 4.17.0-rc3+ #32 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 0 to CPUs 1: INFO: rcu_sched detected stalls on CPUs/tasks: 1-....: (125000 ticks this GP) idle=0ae/1/4611686018427387904 softirq=31845/31845 fqs=30933 (detected by 0, t=125003 jiffies, g=17216, c=17215, q=461) NMI backtrace for cpu 1 CPU: 1 PID: 6 Comm: kworker/u4:0 Not tainted 4.17.0-rc3+ #32 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_unbound flush_to_ldisc RIP: 0010:__write_once_size include/linux/compiler.h:215 [inline] RIP: 0010:write_comp_data+0x6c/0x70 kernel/kcov.c:144 RSP: 0018:ffff8801d9a97248 EFLAGS: 00000293 RAX: 0000000000000000 RBX: 000000029b73b790 RCX: ffffffff8397bdf9 RDX: 0000000000000000 RSI: 0000000000000082 RDI: 0000000000000001 RBP: ffff8801d9a97248 R08: ffff8801d9a88180 R09: 0000000000000006 R10: ffff8801d9a88180 R11: 0000000000000000 R12: ffffc9000edcc000 R13: 0000000000000d00 R14: 0000000000000000 R15: 00000000000000ff FS: 0000000000000000(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f50f3f1f000 CR3: 0000000008c6a000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __sanitizer_cov_trace_const_cmp1+0x1a/0x20 kernel/kcov.c:174 __process_echoes+0x249/0x8d0 drivers/tty/n_tty.c:733 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 worker_thread+0x1cc/0x1440 kernel/workqueue.c:2279 kthread+0x345/0x410 kernel/kthread.c:238 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412 Code: 00 00 00 4e 8d 14 dd 28 00 00 00 4d 39 d0 72 1b 49 83 c1 01 4a 89 7c 10 e0 4a 89 74 10 e8 4a 89 54 10 f0 4a 89 4c d8 20 4c 89 08 <5d> c3 66 90 55 65 48 8b 04 25 c0 ed 01 00 65 8b 15 5f ad 88 7e