BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=0 stuck for 163s!
Showing busy workqueues and worker pools:
workqueue events: flags=0x0
pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=4/256
in-flight: 14:rtc_timer_do_work
pending: vmstat_shepherd, cache_reap, check_corruption
======================================================
WARNING: possible circular locking dependency detected
4.19.36 #4 Not tainted
------------------------------------------------------
syz-executor552/5042 is trying to acquire lock:
000000005fe6f918 (console_owner){-.-.}, at: log_next kernel/printk/printk.c:497 [inline]
000000005fe6f918 (console_owner){-.-.}, at: console_unlock+0x41f/0x10c0 kernel/printk/printk.c:2397
but task is already holding lock:
00000000940f00d9 (&(&pool->lock)->rlock){-.-.}, at: show_workqueue_state.cold+0x879/0x11dc kernel/workqueue.c:4557
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #4 (&(&pool->lock)->rlock){-.-.}:
__raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144
spin_lock include/linux/spinlock.h:329 [inline]
__queue_work+0x23d/0x10e0 kernel/workqueue.c:1417
queue_work_on+0x192/0x200 kernel/workqueue.c:1486
queue_work include/linux/workqueue.h:512 [inline]
schedule_work include/linux/workqueue.h:570 [inline]
put_pwq kernel/workqueue.c:1090 [inline]
put_pwq+0x178/0x1d0 kernel/workqueue.c:1075
put_pwq_unlocked.part.0+0x34/0x70 kernel/workqueue.c:1107
put_pwq_unlocked kernel/workqueue.c:1101 [inline]
destroy_workqueue+0x617/0x6f0 kernel/workqueue.c:4217
do_floppy_init drivers/block/floppy.c:4704 [inline]
floppy_async_init+0x202c/0x216b drivers/block/floppy.c:4721
async_run_entry_fn+0x126/0x570 kernel/async.c:127
process_one_work+0x98e/0x1760 kernel/workqueue.c:2153
worker_thread+0x98/0xe40 kernel/workqueue.c:2296
kthread+0x357/0x430 kernel/kthread.c:246
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:413
-> #3 (&pool->lock/1){..-.}:
__raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144
spin_lock include/linux/spinlock.h:329 [inline]
__queue_work+0x23d/0x10e0 kernel/workqueue.c:1417
queue_work_on+0x192/0x200 kernel/workqueue.c:1486
queue_work include/linux/workqueue.h:512 [inline]
tty_schedule_flip drivers/tty/tty_buffer.c:408 [inline]
tty_flip_buffer_push+0xc5/0x100 drivers/tty/tty_buffer.c:551
pty_write+0x1a6/0x200 drivers/tty/pty.c:124
n_tty_write+0xb06/0x1100 drivers/tty/n_tty.c:2354
do_tty_write drivers/tty/tty_io.c:960 [inline]
tty_write+0x45b/0x7a0 drivers/tty/tty_io.c:1044
__vfs_write+0x116/0x820 fs/read_write.c:485
vfs_write+0x20c/0x560 fs/read_write.c:549
ksys_write+0xea/0x1f0 fs/read_write.c:598
__do_sys_write fs/read_write.c:610 [inline]
__se_sys_write fs/read_write.c:607 [inline]
__x64_sys_write+0x73/0xb0 fs/read_write.c:607
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
-> #2 (&(&port->lock)->rlock){-.-.}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:152
tty_port_tty_get+0x22/0x80 drivers/tty/tty_port.c:288
tty_port_default_wakeup+0x16/0x40 drivers/tty/tty_port.c:47
tty_port_tty_wakeup+0x5d/0x70 drivers/tty/tty_port.c:390
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+0x1e2/0x270 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+0x102/0x1e0 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:791
generic_handle_irq_desc include/linux/irqdesc.h:155 [inline]
handle_irq+0x252/0x3d8 arch/x86/kernel/irq_64.c:78
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:552
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+0xc8/0xe0 kernel/sched/idle.c:368
start_secondary+0x404/0x5c0 arch/x86/kernel/smpboot.c:271
secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243
-> #1 (&port_lock_key){-.-.}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:152
serial8250_console_write+0x7ed/0xa10 drivers/tty/serial/8250/8250_port.c:3247
univ8250_console_write+0x5f/0x70 drivers/tty/serial/8250/8250_core.c:590
call_console_drivers kernel/printk/printk.c:1729 [inline]
console_unlock+0xbe4/0x10c0 kernel/printk/printk.c:2410
vprintk_emit+0x238/0x690 kernel/printk/printk.c:1927
vprintk_default+0x28/0x30 kernel/printk/printk.c:1968
vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398
printk+0xba/0xed kernel/printk/printk.c:2001
register_console+0x787/0xb90 kernel/printk/printk.c:2725
univ8250_console_init+0x3e/0x4b drivers/tty/serial/8250/8250_core.c:685
console_init+0x4f7/0x761 kernel/printk/printk.c:2811
start_kernel+0x59f/0x8c8 init/main.c:661
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){-.-.}:
lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3903
console_lock_spinning_enable kernel/printk/printk.c:1592 [inline]
console_unlock+0x489/0x10c0 kernel/printk/printk.c:2407
vprintk_emit+0x238/0x690 kernel/printk/printk.c:1927
vprintk_default+0x28/0x30 kernel/printk/printk.c:1968
vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398
printk+0xba/0xed kernel/printk/printk.c:2001
show_pwq kernel/workqueue.c:4464 [inline]
show_workqueue_state.cold+0x9e4/0x11dc kernel/workqueue.c:4559
wq_watchdog_timer_fn+0x516/0x5a0 kernel/workqueue.c:5571
call_timer_fn+0x190/0x720 kernel/time/timer.c:1326
expire_timers kernel/time/timer.c:1363 [inline]
__run_timers kernel/time/timer.c:1682 [inline]
__run_timers kernel/time/timer.c:1650 [inline]
run_timer_softirq+0xd03/0x1700 kernel/time/timer.c:1697
__do_softirq+0x266/0x92f kernel/softirq.c:292
invoke_softirq kernel/softirq.c:372 [inline]
irq_exit+0x180/0x1d0 kernel/softirq.c:412
exiting_irq arch/x86/include/asm/apic.h:536 [inline]
smp_apic_timer_interrupt+0x14a/0x570 arch/x86/kernel/apic/apic.c:1056
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:867
bytes_is_nonzero mm/kasan/kasan.c:166 [inline]
memory_is_nonzero mm/kasan/kasan.c:184 [inline]
memory_is_poisoned_n mm/kasan/kasan.c:210 [inline]
memory_is_poisoned mm/kasan/kasan.c:241 [inline]
check_memory_region_inline mm/kasan/kasan.c:257 [inline]
check_memory_region+0x104/0x190 mm/kasan/kasan.c:267
kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272
atomic_read include/asm-generic/atomic-instrumented.h:21 [inline]
rcu_dynticks_curr_cpu_in_eqs+0x51/0xb0 kernel/rcu/tree.c:350
rcu_is_watching+0x10/0x30 kernel/rcu/tree.c:1025
rcu_read_lock+0x43/0x70 include/linux/rcupdate.h:630
lock_page_memcg+0x19/0x1d0 mm/memcontrol.c:1887
page_add_file_rmap+0x39/0xe70 mm/rmap.c:1184
alloc_set_pte+0x86c/0x1760 mm/memory.c:3489
filemap_map_pages+0xcf8/0x1130 mm/filemap.c:2677
do_fault_around mm/memory.c:3636 [inline]
do_read_fault mm/memory.c:3670 [inline]
do_fault mm/memory.c:3804 [inline]
handle_pte_fault mm/memory.c:4035 [inline]
__handle_mm_fault+0x3268/0x3f80 mm/memory.c:4159
handle_mm_fault+0x43f/0xb30 mm/memory.c:4196
__do_page_fault+0x62a/0xe90 arch/x86/mm/fault.c:1395
do_page_fault+0x71/0x581 arch/x86/mm/fault.c:1470
page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1165
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 ***
8 locks held by syz-executor552/5042:
#0: 000000006b30c537 (&mm->mmap_sem){++++}, at: __do_page_fault+0x3c9/0xe90 arch/x86/mm/fault.c:1324
#1: 000000006f357a81 (rcu_read_lock){....}, at: filemap_map_pages+0x10c/0x1130 mm/filemap.c:2619
#2: 00000000d8be03e5 (&(ptlock_ptr(page))->rlock#2){+.+.}, at: spin_lock include/linux/spinlock.h:329 [inline]
#2: 00000000d8be03e5 (&(ptlock_ptr(page))->rlock#2){+.+.}, at: pte_alloc_one_map mm/memory.c:3339 [inline]
#2: 00000000d8be03e5 (&(ptlock_ptr(page))->rlock#2){+.+.}, at: alloc_set_pte+0xeda/0x1760 mm/memory.c:3468
#3: 000000006f357a81 (rcu_read_lock){....}, at: rcu_read_lock+0x0/0x70 include/linux/compiler.h:193
#4: 00000000fefda1b5 ((&wq_watchdog_timer)){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:168 [inline]
#4: 00000000fefda1b5 ((&wq_watchdog_timer)){+.-.}, at: call_timer_fn+0xda/0x720 kernel/time/timer.c:1316
#5: 00000000ef1e4de1 (rcu_read_lock_sched){....}, at: show_workqueue_state+0x0/0x120 kernel/workqueue.c:4429
#6: 00000000940f00d9 (&(&pool->lock)->rlock){-.-.}, at: show_workqueue_state.cold+0x879/0x11dc kernel/workqueue.c:4557
#7: 0000000017d81d56 (console_lock){+.+.}, at: console_trylock_spinning kernel/printk/printk.c:1654 [inline]
#7: 0000000017d81d56 (console_lock){+.+.}, at: vprintk_emit+0x21d/0x690 kernel/printk/printk.c:1926
stack backtrace:
CPU: 0 PID: 5042 Comm: syz-executor552 Not tainted 4.19.36 #4
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:1221
check_prev_add kernel/locking/lockdep.c:1861 [inline]
check_prevs_add kernel/locking/lockdep.c:1974 [inline]
validate_chain kernel/locking/lockdep.c:2415 [inline]
__lock_acquire+0x2e6d/0x48f0 kernel/locking/lockdep.c:3411
lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3903
console_lock_spinning_enable kernel/printk/printk.c:1592 [inline]
console_unlock+0x489/0x10c0 kernel/printk/printk.c:2407
vprintk_emit+0x238/0x690 kernel/printk/printk.c:1927
vprintk_default+0x28/0x30 kernel/printk/printk.c:1968
vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398
printk+0xba/0xed kernel/printk/printk.c:2001
show_pwq kernel/workqueue.c:4464 [inline]
show_workqueue_state.cold+0x9e4/0x11dc kernel/workqueue.c:4559
wq_watchdog_timer_fn+0x516/0x5a0 kernel/workqueue.c:5571
call_timer_fn+0x190/0x720 kernel/time/timer.c:1326
expire_timers kernel/time/timer.c:1363 [inline]
__run_timers kernel/time/timer.c:1682 [inline]
__run_timers kernel/time/timer.c:1650 [inline]
run_timer_softirq+0xd03/0x1700 kernel/time/timer.c:1697
__do_softirq+0x266/0x92f kernel/softirq.c:292
invoke_softirq kernel/softirq.c:372 [inline]
irq_exit+0x180/0x1d0 kernel/softirq.c:412
exiting_irq arch/x86/include/asm/apic.h:536 [inline]
smp_apic_timer_interrupt+0x14a/0x570 arch/x86/kernel/apic/apic.c:1056
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:867
RIP: 0010:bytes_is_nonzero mm/kasan/kasan.c:166 [inline]
RIP: 0010:memory_is_nonzero mm/kasan/kasan.c:184 [inline]
RIP: 0010:memory_is_poisoned_n mm/kasan/kasan.c:210 [inline]
RIP: 0010:memory_is_poisoned mm/kasan/kasan.c:241 [inline]
RIP: 0010:check_memory_region_inline mm/kasan/kasan.c:257 [inline]
RIP: 0010:check_memory_region+0x104/0x190 mm/kasan/kasan.c:267
Code: 89 c8 4d 39 c8 74 10 41 80 38 00 74 ee 4b 8d 44 25 00 4d 85 c0 75 25 49 89 d9 49 29 c1 e9 70 ff ff ff 4d 85 c9 74 ba 4d 01 e1 09 48 83 c0 01 4c 39 c8 74 ac 80 38 00 74 f2 eb a0 4c 89 c0 49
RSP: 0000:ffff8880969cf990 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13
RAX: ffffed1015d04732 RBX: ffffed1015d04733 RCX: ffffffff8159a151
RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff8880ae823990
RBP: ffff8880969cf9a8 R08: 1ffff11015d04732 R09: ffffed1015d04733
R10: ffffed1015d04732 R11: ffff8880ae823993 R12: ffffed1015d04732
R13: 0000000089b5a025 R14: ffff8880a11808c0 R15: 0000000000000000
kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272
atomic_read include/asm-generic/atomic-instrumented.h:21 [inline]
rcu_dynticks_curr_cpu_in_eqs+0x51/0xb0 kernel/rcu/tree.c:350
rcu_is_watching+0x10/0x30 kernel/rcu/tree.c:1025
rcu_read_lock+0x43/0x70 include/linux/rcupdate.h:630
lock_page_memcg+0x19/0x1d0 mm/memcontrol.c:1887
page_add_file_rmap+0x39/0xe70 mm/rmap.c:1184
alloc_set_pte+0x86c/0x1760 mm/memory.c:3489
filemap_map_pages+0xcf8/0x1130 mm/filemap.c:2677
do_fault_around mm/memory.c:3636 [inline]
do_read_fault mm/memory.c:3670 [inline]
do_fault mm/memory.c:3804 [inline]
handle_pte_fault mm/memory.c:4035 [inline]
__handle_mm_fault+0x3268/0x3f80 mm/memory.c:4159
handle_mm_fault+0x43f/0xb30 mm/memory.c:4196
__do_page_fault+0x62a/0xe90 arch/x86/mm/fault.c:1395
? trace_ha
Lost 13 message(s)!
workqueue events_power_efficient: flags=0x80
pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=1/256
in-flight: 2648:gc_worker
pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/256
pending: do_cache_clean
workqueue mm_percpu_wq: flags=0x8
workqueue dm_bufio_cache: flags=0x8
pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/256
pending: work_fn
pool 0: cpus=0 node=0 flags=0x0 nice=0 hung=164s workers=2 idle: 5