BUG: workqueue lockup - pool cpus=1 node=0 flags=0x0 nice=0 stuck for 165s!
Showing busy workqueues and worker pools:
workqueue events: flags=0x0
pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=56/256
in-flight: 7932:rtc_timer_do_work
pending: kernfs_notify_workfn, cache_reap, defense_work_handler, defense_work_handler, defense_work_handler, psi_avgs_work, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, check_corruption, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, destroy_super_work, psi_avgs_work, psi_avgs_work, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, kvmclock_sync_fn, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, key_garbage_collector, rt6_probe_deferred
, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred, rt6_probe_deferred
======================================================
WARNING: possible circular locking dependency detected
5.1.0-rc5-next-20190418 #28 Not tainted
------------------------------------------------------
swapper/0/0 is trying to acquire lock:
00000000c02b2f96 (console_owner){-.-.}, at: log_next kernel/printk/printk.c:505 [inline]
00000000c02b2f96 (console_owner){-.-.}, at: console_unlock+0x3fc/0xed0 kernel/printk/printk.c:2449
but task is already holding lock:
000000005f3aee75 (&(&pool->lock)->rlock){-.-.}, at: show_workqueue_state.cold+0x859/0x11c5 kernel/workqueue.c:4726
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #4 (&(&pool->lock)->rlock){-.-.}:
lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4200
__raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:151
spin_lock include/linux/spinlock.h:338 [inline]
__queue_work+0x285/0x1200 kernel/workqueue.c:1448
queue_work_on+0x192/0x200 kernel/workqueue.c:1517
queue_work include/linux/workqueue.h:494 [inline]
schedule_work include/linux/workqueue.h:552 [inline]
put_pwq kernel/workqueue.c:1117 [inline]
put_pwq+0x178/0x1d0 kernel/workqueue.c:1102
put_pwq_unlocked.part.0+0x34/0x70 kernel/workqueue.c:1134
put_pwq_unlocked kernel/workqueue.c:1128 [inline]
destroy_workqueue+0x623/0x700 kernel/workqueue.c:4384
do_floppy_init drivers/block/floppy.c:4700 [inline]
floppy_async_init+0x2058/0x21aa drivers/block/floppy.c:4718
async_run_entry_fn+0x126/0x570 kernel/async.c:127
process_one_work+0x98e/0x1790 kernel/workqueue.c:2268
worker_thread+0x98/0xe40 kernel/workqueue.c:2414
kthread+0x357/0x430 kernel/kthread.c:254
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352
-> #3 (&pool->lock/1){..-.}:
lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4200
__raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:151
spin_lock include/linux/spinlock.h:338 [inline]
__queue_work+0x285/0x1200 kernel/workqueue.c:1448
queue_work_on+0x192/0x200 kernel/workqueue.c:1517
queue_work include/linux/workqueue.h:494 [inline]
tty_schedule_flip drivers/tty/tty_buffer.c:413 [inline]
tty_flip_buffer_push+0xc5/0x100 drivers/tty/tty_buffer.c:556
pty_write+0x1a6/0x200 drivers/tty/pty.c:125
n_tty_write+0xb06/0x1150 drivers/tty/n_tty.c:2356
do_tty_write drivers/tty/tty_io.c:961 [inline]
tty_write+0x45b/0x7a0 drivers/tty/tty_io.c:1045
__vfs_write+0x8d/0x110 fs/read_write.c:485
vfs_write+0x20c/0x580 fs/read_write.c:549
ksys_write+0x14f/0x2d0 fs/read_write.c:599
__do_sys_write fs/read_write.c:611 [inline]
__se_sys_write fs/read_write.c:608 [inline]
__x64_sys_write+0x73/0xb0 fs/read_write.c:608
do_syscall_64+0x103/0x670 arch/x86/entry/common.c:298
entry_SYSCALL_64_after_hwframe+0x49/0xbe
-> #2 (&(&port->lock)->rlock){-.-.}:
lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4200
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:159
tty_port_tty_get+0x22/0x80 drivers/tty/tty_port.c:287
tty_port_default_wakeup+0x16/0x40 drivers/tty/tty_port.c:47
tty_port_tty_wakeup+0x5d/0x70 drivers/tty/tty_port.c:387
uart_write_wakeup+0x46/0x70 drivers/tty/serial/serial_core.c:103
serial8250_tx_chars+0x4a4/0xb20 drivers/tty/serial/8250/8250_port.c:1806
serial8250_handle_irq.part.0+0x1be/0x2e0 drivers/tty/serial/8250/8250_port.c:1879
serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1865 [inline]
serial8250_default_handle_irq+0xc5/0x150 drivers/tty/serial/8250/8250_port.c:1895
serial8250_interrupt+0xfb/0x1a0 drivers/tty/serial/8250/8250_core.c:125
__handle_irq_event_percpu+0x146/0x900 kernel/irq/handle.c:149
handle_irq_event_percpu+0x74/0x160 kernel/irq/handle.c:189
handle_irq_event+0xa7/0x134 kernel/irq/handle.c:206
handle_edge_irq+0x264/0x8e0 kernel/irq/chip.c:822
generic_handle_irq_desc include/linux/irqdesc.h:156 [inline]
handle_irq+0x41/0x60 arch/x86/kernel/irq_64.c:34
do_IRQ+0x99/0x1d0 arch/x86/kernel/irq.c:246
ret_from_intr+0x0/0x1e
native_safe_halt+0x2/0x10 arch/x86/include/asm/irqflags.h:57
arch_cpu_idle+0x10/0x20 arch/x86/kernel/process.c:571
default_idle_call+0x36/0x90 kernel/sched/idle.c:93
cpuidle_idle_call kernel/sched/idle.c:153 [inline]
do_idle+0x377/0x560 kernel/sched/idle.c:262
cpu_startup_entry+0x1b/0x20 kernel/sched/idle.c:353
start_secondary+0x360/0x4d0 arch/x86/kernel/smpboot.c:267
secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243
-> #1 (&port_lock_key){-.-.}:
lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4200
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:159
serial8250_console_write+0x253/0x9c0 drivers/tty/serial/8250/8250_port.c:3245
univ8250_console_write+0x5f/0x70 drivers/tty/serial/8250/8250_core.c:586
call_console_drivers kernel/printk/printk.c:1780 [inline]
console_unlock+0xb44/0xed0 kernel/printk/printk.c:2462
vprintk_emit+0x2a0/0x700 kernel/printk/printk.c:1985
vprintk_default+0x28/0x30 kernel/printk/printk.c:2012
vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398
printk+0xba/0xed kernel/printk/printk.c:2045
register_console+0x74d/0xb50 kernel/printk/printk.c:2777
univ8250_console_init+0x3e/0x4b drivers/tty/serial/8250/8250_core.c:681
console_init+0x4f7/0x761 kernel/printk/printk.c:2863
start_kernel+0x574/0x84f init/main.c:675
x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:470
x86_64_start_kernel+0x77/0x7b arch/x86/kernel/head64.c:451
secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243
-> #0 (console_owner){-.-.}:
check_prevs_add kernel/locking/lockdep.c:2322 [inline]
validate_chain kernel/locking/lockdep.c:2703 [inline]
__lock_acquire+0x239c/0x3fb0 kernel/locking/lockdep.c:3690
lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4200
console_lock_spinning_enable kernel/printk/printk.c:1643 [inline]
console_unlock+0x466/0xed0 kernel/printk/printk.c:2459
vprintk_emit+0x2a0/0x700 kernel/printk/printk.c:1985
vprintk_default+0x28/0x30 kernel/printk/printk.c:2012
vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398
printk+0xba/0xed kernel/printk/printk.c:2045
show_pwq kernel/workqueue.c:4633 [inline]
show_workqueue_state.cold+0x9c4/0x11c5 kernel/workqueue.c:4728
wq_watchdog_timer_fn+0x516/0x5a0 kernel/workqueue.c:5742
call_timer_fn+0x196/0x720 kernel/time/timer.c:1322
expire_timers kernel/time/timer.c:1366 [inline]
__run_timers kernel/time/timer.c:1685 [inline]
__run_timers kernel/time/timer.c:1653 [inline]
run_timer_softirq+0xd3d/0x1740 kernel/time/timer.c:1700
__do_softirq+0x266/0x95a kernel/softirq.c:293
invoke_softirq kernel/softirq.c:374 [inline]
irq_exit+0x180/0x1d0 kernel/softirq.c:414
exiting_irq arch/x86/include/asm/apic.h:536 [inline]
smp_apic_timer_interrupt+0x14a/0x570 arch/x86/kernel/apic/apic.c:1062
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:806
native_safe_halt+0x2/0x10 arch/x86/include/asm/irqflags.h:57
arch_cpu_idle+0x10/0x20 arch/x86/kernel/process.c:571
default_idle_call+0x36/0x90 kernel/sched/idle.c:93
cpuidle_idle_call kernel/sched/idle.c:153 [inline]
do_idle+0x377/0x560 kernel/sched/idle.c:262
cpu_startup_entry+0x1b/0x20 kernel/sched/idle.c:353
rest_init+0x245/0x37b init/main.c:450
arch_call_rest_init+0xe/0x1b
start_kernel+0x816/0x84f init/main.c:747
x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:470
x86_64_start_kernel+0x77/0x7b arch/x86/kernel/head64.c:451
secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243
other info that might help us debug this:
Chain exists of:
console_owner --> &pool->lock/1 --> &(&pool->lock)->rlock
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&(&pool->lock)->rlock);
lock(&pool->lock/1);
lock(&(&pool->lock)->rlock);
lock(console_owner);
*** DEADLOCK ***
4 locks held by swapper/0/0:
#0: 00000000e41464c3 ((&wq_watchdog_timer)){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:170 [inline]
#0: 00000000e41464c3 ((&wq_watchdog_timer)){+.-.}, at: call_timer_fn+0xe0/0x720 kernel/time/timer.c:1312
#1: 00000000bae5b48e (rcu_read_lock){....}, at: show_workqueue_state+0x0/0x120 kernel/workqueue.c:4598
#2: 000000005f3aee75 (&(&pool->lock)->rlock){-.-.}, at: show_workqueue_state.cold+0x859/0x11c5 kernel/workqueue.c:4726
#3: 00000000ba57132a (console_lock){+.+.}, at: console_trylock_spinning kernel/printk/printk.c:1705 [inline]
#3: 00000000ba57132a (console_lock){+.+.}, at: vprintk_emit+0x283/0x700 kernel/printk/printk.c:1984
stack backtrace:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.1.0-rc5-next-20190418 #28
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+0x172/0x1f0 lib/dump_stack.c:113
print_circular_bug.isra.0.cold+0x1cc/0x28f kernel/locking/lockdep.c:1560
check_prev_add.constprop.0+0xf11/0x23c0 kernel/locking/lockdep.c:2209
check_prevs_add kernel/locking/lockdep.c:2322 [inline]
validate_chain kernel/locking/lockdep.c:2703 [inline]
__lock_acquire+0x239c/0x3fb0 kernel/locking/lockdep.c:3690
lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4200
console_lock_spinning_enable kernel/printk/printk.c:1643 [inline]
console_unlock+0x466/0xed0 kernel/printk/printk.c:2459
vprintk_emit+0x2a0/0x700 kernel/printk/printk.c:1985
vprintk_default+0x28/0x30 kernel/printk/printk.c:2012
vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398
printk+0xba/0xed kernel/printk/printk.c:2045
show_pwq kernel/workqueue.c:4633 [inline]
show_workqueue_state.cold+0x9c4/0x11c5 kernel/workqueue.c:4728
wq_watchdog_timer_fn+0x516/0x5a0 kernel/workqueue.c:5742
call_timer_fn+0x196/0x720 kernel/time/timer.c:1322
expire_timers kernel/time/timer.c:1366 [inline]
__run_timers kernel/time/timer.c:1685 [inline]
__run_timers kernel/time/timer.c:1653 [inline]
run_timer_softirq+0xd3d/0x1740 kernel/time/timer.c:1700
__do_softirq+0x266/0x95a kernel/softirq.c:293
invoke_softirq kernel/softirq.c:374 [inline]
irq_exit+0x180/0x1d0 kernel/softirq.c:414
exiting_irq arch/x86/include/asm/apic.h:536 [inline]
smp_apic_timer_interrupt+0x14a/0x570 arch/x86/kernel/apic/apic.c:1062
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:806
RIP: 0010:native_safe_halt+0x2/0x10 arch/x86/include/asm/irqflags.h:58
Code: ff ff ff 48 89 c7 48 89 45 d8 e8 19 9c 8c fa 48 8b 45 d8 e9 ce fe ff ff 48 89 df e8 08 9c 8c fa eb 82 90 90 90 90 90 90 fb f4 0f 1f 00 66 2e 0f 1f 84 00 00 00 00 00 f4 c3 90 90 90 90 90 90
RSP: 0018:ffffffff88807d08 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13
RAX: 1ffffffff1124d79 RBX: ffffffff8887a100 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000006 RDI: ffffffff8887a97c
RBP: ffffffff88807d38 R08: ffffffff8887a100 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: ffffffff88926bb8 R14: 0000000000000000 R15: 0000000000000000
arch_cpu_idle+0x10/0x20 arch/x86/kernel/process.c:571
default_idle_call+0x36/0x90 kernel/sched/idle.c:93
cpuidle_idle_call kernel/sched/idle.c:153 [inline]
do_idle+0x377/0x560 kernel/sched/idle.c:262
cpu_startup_entry+0x1b/0x20 kernel/sched/idle.c:353
rest_init+0x245/0x37b init/main.c:450
arch_call_rest_init+0xe/0x1b
start_kernel+0x816/0x84f init/main.c:747
x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:470
x86_64_start_kernel+0x77/0x7b arch/x86/kernel/head64.c:451
secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243
workqueue events_long: flags=0x0
pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=1/256
pending: br_fdb_cleanup
workqueue events_unbound: flags=0x2
pwq 4: cpus=0-1 flags=0x4 nice=0 active=4/512
in-flight: 10537:fsnotify_mark_destroy_workfn fsnotify_mark_destroy_workfn, 10554:fsnotify_connector_destroy_workfn fsnotify_connector_destroy_workfn
workqueue events_power_efficient: flags=0x80
pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=1/256
pending: gc_worker
workqueue rcu_gp: flags=0x8
pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=2/256
pending: process_srcu, process_srcu
workqueue mm_percpu_wq: flags=0x8
pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=1/256
pending: vmstat_update
workqueue dm_bufio_cache: flags=0x8
pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=1/256
pending: work_fn
workqueue krxrpcd: flags=0x0
pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=1/1
pending: rxrpc_peer_keepalive_worker
delayed: rxrpc_peer_keepalive_worker
pool 2: cpus=1 node=0 flags=0x0 nice=0 hung=166s workers=4 idle: 7919 3257 24703
pool 4: cpus=0-1 flags=0x4 nice=0 hung=1s workers=7 idle: 10539 2527 10566 26 8101