BUG: workqueue lockup - pool cpus=1 node=0 flags=0x0 nice=0 stuck for 261s! BUG: workqueue lockup - pool cpus=1 node=0 flags=0x0 nice=-20 stuck for 259s! Showing busy workqueues and worker pools: workqueue events: flags=0x0 pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=2/256 pending: xfrm_state_gc_task, free_obj_work workqueue events_highpri: flags=0x10 pwq 3: cpus=1 node=0 flags=0x0 nice=-20 active=1/256 pending: flush_backlog BAR(5134) workqueue events_long: flags=0x0 pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=1/256 pending: gc_worker workqueue events_power_efficient: flags=0x80 pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=2/256 pending: neigh_periodic_work, check_lifetime workqueue mm_percpu_wq: flags=0x8 pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=2/256 pending: vmstat_update, lru_add_drain_per_cpu BAR(820) workqueue netns: flags=0xe000a pwq 4: cpus=0-1 flags=0x4 nice=0 active=1/1 in-flight: 5134:cleanup_net delayed: cleanup_net ====================================================== WARNING: possible circular locking dependency detected 4.14.71+ #8 Not tainted ------------------------------------------------------ syz-executor2/31811 is trying to acquire lock: (&port_lock_key){-.-.}, at: [] serial8250_console_write+0x6af/0x800 drivers/tty/serial/8250/8250_port.c:3232 but task is already holding lock: (&pool->lock/1){..-.}, at: [] show_workqueue_state.cold.23+0x278/0x1053 kernel/workqueue.c:4495 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&pool->lock/1){..-.}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:152 spin_lock include/linux/spinlock.h:317 [inline] __queue_work+0x184/0xe40 kernel/workqueue.c:1419 queue_work_on+0x8f/0xa0 kernel/workqueue.c:1488 pty_write+0x172/0x1c0 drivers/tty/pty.c:124 n_tty_write+0x969/0xda0 drivers/tty/n_tty.c:2342 do_tty_write drivers/tty/tty_io.c:957 [inline] tty_write+0x397/0x810 drivers/tty/tty_io.c:1041 __vfs_write+0xf4/0x5c0 fs/read_write.c:482 vfs_write+0x17f/0x4d0 fs/read_write.c:546 SYSC_write fs/read_write.c:593 [inline] SyS_write+0xc2/0x1a0 fs/read_write.c:585 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #1 (&(&port->lock)->rlock){-.-.}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x41/0x50 kernel/locking/spinlock.c:160 tty_port_tty_get+0x1b/0x80 drivers/tty/tty_port.c:287 tty_port_default_wakeup+0x11/0x40 drivers/tty/tty_port.c:46 serial8250_tx_chars+0x417/0xa70 drivers/tty/serial/8250/8250_port.c:1810 serial8250_handle_irq.part.15+0x1b1/0x1f0 drivers/tty/serial/8250/8250_port.c:1883 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1869 [inline] serial8250_default_handle_irq+0x9b/0x110 drivers/tty/serial/8250/8250_port.c:1899 serial8250_interrupt+0xea/0x1a0 drivers/tty/serial/8250/8250_core.c:129 __handle_irq_event_percpu+0xf8/0x770 kernel/irq/handle.c:147 handle_irq_event_percpu+0x76/0x150 kernel/irq/handle.c:187 handle_irq_event+0xa1/0x12d kernel/irq/handle.c:204 handle_edge_irq+0x1f0/0x7f0 kernel/irq/chip.c:770 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq+0x242/0x328 arch/x86/kernel/irq_64.c:78 do_IRQ+0x7d/0x1b0 arch/x86/kernel/irq.c:230 ret_from_intr+0x0/0x22 arch_local_irq_restore arch/x86/include/asm/paravirt.h:778 [inline] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] _raw_spin_unlock_irqrestore+0x59/0x70 kernel/locking/spinlock.c:192 spin_unlock_irqrestore include/linux/spinlock.h:372 [inline] uart_write+0x2a7/0x480 drivers/tty/serial/serial_core.c:611 process_output_block drivers/tty/n_tty.c:582 [inline] n_tty_write+0x4f5/0xda0 drivers/tty/n_tty.c:2319 do_tty_write drivers/tty/tty_io.c:957 [inline] tty_write+0x397/0x810 drivers/tty/tty_io.c:1041 redirected_tty_write+0x9a/0xa0 drivers/tty/tty_io.c:1062 __vfs_write+0xf4/0x5c0 fs/read_write.c:482 vfs_write+0x17f/0x4d0 fs/read_write.c:546 SYSC_write fs/read_write.c:593 [inline] SyS_write+0xc2/0x1a0 fs/read_write.c:585 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #0 (&port_lock_key){-.-.}: lock_acquire+0x10f/0x380 kernel/locking/lockdep.c:3991 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x41/0x50 kernel/locking/spinlock.c:160 serial8250_console_write+0x6af/0x800 drivers/tty/serial/8250/8250_port.c:3232 call_console_drivers kernel/printk/printk.c:1574 [inline] console_unlock+0x5b9/0xb50 kernel/printk/printk.c:2242 vprintk_emit+0x112/0x150 kernel/printk/printk.c:1766 vprintk_func+0x58/0x159 kernel/printk/printk_safe.c:401 printk+0xa7/0xcf kernel/printk/printk.c:1838 show_pwq kernel/workqueue.c:4402 [inline] show_workqueue_state.cold.23+0x3d5/0x1053 kernel/workqueue.c:4497 wq_watchdog_timer_fn+0x436/0x4d0 kernel/workqueue.c:5481 call_timer_fn+0x163/0x6a0 kernel/time/timer.c:1279 expire_timers+0x1f3/0x4a0 kernel/time/timer.c:1318 __run_timers kernel/time/timer.c:1634 [inline] run_timer_softirq+0x3a5/0x560 kernel/time/timer.c:1649 __do_softirq+0x215/0x997 kernel/softirq.c:288 invoke_softirq kernel/softirq.c:368 [inline] irq_exit+0x10f/0x150 kernel/softirq.c:409 exiting_irq arch/x86/include/asm/apic.h:648 [inline] smp_apic_timer_interrupt+0x188/0x5f0 arch/x86/kernel/apic/apic.c:1064 apic_timer_interrupt+0x84/0x90 arch/x86/entry/entry_64.S:787 other info that might help us debug this: Chain exists of: &port_lock_key --> &(&port->lock)->rlock --> &pool->lock/1 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&pool->lock/1); lock(&(&port->lock)->rlock); lock(&pool->lock/1); lock(&port_lock_key); *** DEADLOCK *** 4 locks held by syz-executor2/31811: #0: (kernel/workqueue.c:5419){+.-.}, at: [] lockdep_copy_map include/linux/lockdep.h:174 [inline] #0: (kernel/workqueue.c:5419){+.-.}, at: [] call_timer_fn+0xd7/0x6a0 kernel/time/timer.c:1269 #1: (rcu_read_lock_sched){....}, at: [] show_workqueue_state+0x0/0x100 kernel/workqueue.c:4367 #2: (&pool->lock/1){..-.}, at: [] show_workqueue_state.cold.23+0x278/0x1053 kernel/workqueue.c:4495 #3: (console_lock){+.+.}, at: [] vprintk_emit+0x104/0x150 kernel/printk/printk.c:1765 stack backtrace: CPU: 0 PID: 31811 Comm: syz-executor2 Not tainted 4.14.71+ #8 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x11b lib/dump_stack.c:53 print_circular_bug.isra.18.cold.43+0x2d3/0x40c kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1901 [inline] check_prevs_add kernel/locking/lockdep.c:2018 [inline] validate_chain kernel/locking/lockdep.c:2460 [inline] __lock_acquire+0x2ff9/0x4320 kernel/locking/lockdep.c:3487 lock_acquire+0x10f/0x380 kernel/locking/lockdep.c:3991 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x41/0x50 kernel/locking/spinlock.c:160 serial8250_console_write+0x6af/0x800 drivers/tty/serial/8250/8250_port.c:3232 call_console_drivers kernel/printk/printk.c:1574 [inline] console_unlock+0x5b9/0xb50 kernel/printk/printk.c:2242 vprintk_emit+0x112/0x150 kernel/printk/printk.c:1766 vprintk_func+0x58/0x159 kernel/printk/printk_safe.c:401 printk+0xa7/0xcf kernel/printk/printk.c:1838 show_pwq kernel/workqueue.c:4402 [inline] show_workqueue_state.cold.23+0x3d5/0x1053 kernel/workqueue.c:4497 wq_watchdog_timer_fn+0x436/0x4d0 kernel/workqueue.c:5481 call_timer_fn+0x163/0x6a0 kernel/time/timer.c:1279 expire_timers+0x1f3/0x4a0 kernel/time/timer.c:1318 __run_timers kernel/time/timer.c:1634 [inline] run_timer_softirq+0x3a5/0x560 kernel/time/timer.c:1649 __do_softirq+0x215/0x997 kernel/softirq.c:288 invoke_softirq kernel/softirq.c:368 [inline] irq_exit+0x10f/0x150 kernel/softirq.c:409 exiting_irq arch/x86/include/asm/apic.h:648 [inline] smp_apic_timer_interrupt+0x188/0x5f0 arch/x86/kernel/apic/apic.c:1064 apic_timer_interrupt+0x84/0x90 arch/x86/entry/entry_64.S:787 RIP: 0033:0x457679 RSP: 002b:00007f112fd9bcf8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff10 RAX: fffffffffffff001 RBX: 000000000072bf08 RCX: 0000000000457679 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000072bf08 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000072bf0c R13: 00007ffea1bc843f R14: 00007f112fd9c9c0 R15: 0000000000000000 workqueue kblockd: flags=0x18 pwq 3: cpus=1 node=0 flags=0x0 nice=-20 active=1/256 pending: 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 workqueue ipv6_addrconf: flags=0x40008 pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=1/1 pending: addrconf_verify_work pool 4: cpus=0-1 flags=0x4 nice=0 hung=4s workers=4 idle: 2216 2220 5130 INFO: task kworker/u4:10:5134 blocked for more than 140 seconds. Not tainted 4.14.71+ #8 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. kworker/u4:10 D26224 5134 2 0x90000000 Workqueue: netns cleanup_net Call Trace: schedule+0x7f/0x1b0 kernel/sched/core.c:3490 schedule_timeout+0x710/0xe60 kernel/time/timer.c:1721 do_wait_for_common kernel/sched/completion.c:91 [inline] __wait_for_common kernel/sched/completion.c:112 [inline] wait_for_common+0x3bc/0x4e0 kernel/sched/completion.c:123 flush_work+0x3b8/0x6e0 kernel/workqueue.c:2885 flush_all_backlogs net/core/dev.c:4638 [inline] rollback_registered_many+0x505/0xac0 net/core/dev.c:7168 unregister_netdevice_many+0x43/0x210 net/core/dev.c:8231 ip6_tnl_destroy_tunnels net/ipv6/ip6_tunnel.c:2208 [inline] ip6_tnl_exit_net+0x3c8/0x580 net/ipv6/ip6_tunnel.c:2255 ops_exit_list.isra.3+0xa8/0x150 net/core/net_namespace.c:142 cleanup_net+0x3e9/0x880 net/core/net_namespace.c:483 process_one_work+0x86e/0x15c0 kernel/workqueue.c:2114 worker_thread+0xdc/0x1000 kernel/workqueue.c:2248 kthread+0x348/0x420 kernel/kthread.c:232 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:402 INFO: task syz-executor1:820 blocked for more than 140 seconds. Not tainted 4.14.71+ #8 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor1 D28808 820 1850 0x10000004 Call Trace: schedule+0x7f/0x1b0 kernel/sched/core.c:3490 schedule_timeout+0x710/0xe60 kernel/time/timer.c:1721 do_wait_for_common kernel/sched/completion.c:91 [inline] __wait_for_common kernel/sched/completion.c:112 [inline] wait_for_common+0x3bc/0x4e0 kernel/sched/completion.c:123 flush_work+0x3b8/0x6e0 kernel/workqueue.c:2885 lru_add_drain_all_cpuslocked+0x2ef/0x450 mm/swap.c:722 lru_add_drain_all+0xf/0x20 mm/swap.c:730 do_mlock+0x8c/0x5c0 mm/mlock.c:673 SYSC_mlock2 mm/mlock.c:726 [inline] SyS_mlock2+0x46/0x60 mm/mlock.c:716 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x457679 RSP: 002b:00007ff42d489c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000145 RAX: ffffffffffffffda RBX: 00007ff42d48a6d4 RCX: 0000000000457679 RDX: 0000000000000001 RSI: 000000000000f000 RDI: 00000000203f5000 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000004d3a80 R14: 00000000004c2905 R15: 0000000000000000 INFO: task syz-executor1:830 blocked for more than 140 seconds. Not tainted 4.14.71+ #8 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor1 D29688 830 1850 0x10000004 Call Trace: schedule+0x7f/0x1b0 kernel/sched/core.c:3490 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:3548 __mutex_lock_common kernel/locking/mutex.c:833 [inline] __mutex_lock+0x521/0x1480 kernel/locking/mutex.c:893 lru_add_drain_all_cpuslocked+0x7f/0x450 mm/swap.c:704 lru_add_drain_all+0xf/0x20 mm/swap.c:730 do_mlock+0x8c/0x5c0 mm/mlock.c:673 SYSC_mlock2 mm/mlock.c:726 [inline] SyS_mlock2+0x46/0x60 mm/mlock.c:716 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x457679 RSP: 002b:00007ff42d468c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000145 RAX: ffffffffffffffda RBX: 00007ff42d4696d4 RCX: 0000000000457679 RDX: 0000000000000001 RSI: 000000000000f000 RDI: 00000000203f5000 RBP: 000000000072bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000004d3a80 R14: 00000000004c2905 R15: 0000000000000001 INFO: lockdep is turned off. NMI backtrace for cpu 0 CPU: 0 PID: 23 Comm: khungtaskd Not tainted 4.14.71+ #8 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x11b lib/dump_stack.c:53 nmi_cpu_backtrace.cold.0+0x47/0x85 lib/nmi_backtrace.c:101 nmi_trigger_cpumask_backtrace+0x121/0x146 lib/nmi_backtrace.c:62 trigger_all_cpu_backtrace include/linux/nmi.h:138 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:196 [inline] watchdog+0x574/0xa70 kernel/hung_task.c:252 kthread+0x348/0x420 kernel/kthread.c:232 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:402 Sending NMI from CPU 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 PID: 643 Comm: syz-executor3 Not tainted 4.14.71+ #8 task: ffff8801d114af00 task.stack: ffff880170418000 RIP: 0010:get_current arch/x86/include/asm/current.h:15 [inline] RIP: 0010:__seccomp_filter+0x349/0xce0 kernel/seccomp.c:680 RSP: 0018:ffff88017041fc88 EFLAGS: 00000297 RAX: ffff8801d114af00 RBX: 0000000000050000 RCX: 0000000000050000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8801d29746f8 RBP: 1ffff1002e083f92 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 00000000000000ca R13: dffffc0000000000 R14: ffff8801d114af00 R15: 0000000000008fe4 FS: 00007fec16c48700(0000) GS:ffff8801dbb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2ee35000 CR3: 000000017778a002 CR4: 00000000001606a0 DR0: 0000000000000000 DR1: 0000000020000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 Call Trace: __secure_computing+0x9c/0x310 kernel/seccomp.c:798 syscall_trace_enter+0x506/0xc10 arch/x86/entry/common.c:120 do_syscall_64+0x331/0x4b0 arch/x86/entry/common.c:280 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x457679 RSP: 002b:00007fec16c47cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffffda RBX: 000000000072bf08 RCX: 0000000000457679 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000072bf08 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000072bf0c R13: 00007ffdee3f9c9f R14: 00007fec16c489c0 R15: 0000000000000000 Code: 75 11 e8 fb 29 ff ff 89 da 31 f6 4c 89 e7 e8 af 72 fe ff b8 ff ff ff ff e9 91 fd ff ff e8 e0 29 ff ff 65 4c 8b 34 25 c0 de 01 00 <49> 8d 7e 18 48 89 f8 48 c1 e8 03 42 80 3c 28 00 0f 85 aa 08 00