BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=0 stuck for 154s! BUG: workqueue lockup - pool cpus=0-1 flags=0x4 nice=0 stuck for 154s! Showing busy workqueues and worker pools: workqueue events: flags=0x0 pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=1/256 refcnt=2 in-flight: 7244:linkwatch_event ====================================================== WARNING: possible circular locking dependency detected 4.19.128-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.5/2969 is trying to acquire lock: 00000000ddc9cf74 (console_owner){-.-.}, at: log_next kernel/printk/printk.c:499 [inline] 00000000ddc9cf74 (console_owner){-.-.}, at: console_unlock+0x380/0xff0 kernel/printk/printk.c:2416 but task is already holding lock: 00000000e94ba0bd (&(&pool->lock)->rlock){-.-.}, at: show_workqueue_state kernel/workqueue.c:4584 [inline] 00000000e94ba0bd (&(&pool->lock)->rlock){-.-.}, at: show_workqueue_state.cold+0x294/0x1038 kernel/workqueue.c:4557 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&(&pool->lock)->rlock){-.-.}: spin_lock include/linux/spinlock.h:329 [inline] __queue_work+0x1f1/0x1100 kernel/workqueue.c:1419 queue_work_on+0x17e/0x1f0 kernel/workqueue.c:1488 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+0x15a/0x1b0 kernel/workqueue.c:1075 put_pwq_unlocked.part.0+0x30/0x70 kernel/workqueue.c:1107 put_pwq_unlocked kernel/workqueue.c:1101 [inline] destroy_workqueue+0x5f4/0x6f0 kernel/workqueue.c:4243 do_floppy_init drivers/block/floppy.c:4737 [inline] floppy_async_init+0x1fff/0x2138 drivers/block/floppy.c:4754 async_run_entry_fn+0x121/0x530 kernel/async.c:127 process_one_work+0x892/0x1580 kernel/workqueue.c:2155 worker_thread+0x96/0xe20 kernel/workqueue.c:2298 kthread+0x30b/0x410 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 -> #3 (&pool->lock/1){..-.}: spin_lock include/linux/spinlock.h:329 [inline] __queue_work+0x1f1/0x1100 kernel/workqueue.c:1419 queue_work_on+0x17e/0x1f0 kernel/workqueue.c:1488 pty_write+0x198/0x1f0 drivers/tty/pty.c:125 process_output_block drivers/tty/n_tty.c:593 [inline] n_tty_write+0x3ee/0x1080 drivers/tty/n_tty.c:2331 do_tty_write drivers/tty/tty_io.c:960 [inline] tty_write+0x455/0x790 drivers/tty/tty_io.c:1044 __vfs_write+0xf7/0x760 fs/read_write.c:485 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #2 (&(&port->lock)->rlock){-.-.}: tty_port_tty_get+0x1d/0x80 drivers/tty/tty_port.c:289 tty_port_default_wakeup+0x11/0x40 drivers/tty/tty_port.c:47 serial8250_tx_chars+0x48f/0xaf0 drivers/tty/serial/8250/8250_port.c:1806 serial8250_handle_irq.part.0+0x24b/0x290 drivers/tty/serial/8250/8250_port.c:1879 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1865 [inline] serial8250_default_handle_irq+0xb5/0x140 drivers/tty/serial/8250/8250_port.c:1895 serial8250_interrupt+0xf2/0x1d0 drivers/tty/serial/8250/8250_core.c:125 __handle_irq_event_percpu+0xef/0x8e0 kernel/irq/handle.c:149 handle_irq_event_percpu+0x76/0x160 kernel/irq/handle.c:189 handle_irq_event+0xa2/0x12d kernel/irq/handle.c:206 handle_edge_irq+0x24b/0x8c0 kernel/irq/chip.c:797 generic_handle_irq_desc include/linux/irqdesc.h:155 [inline] handle_irq+0x35/0x50 arch/x86/kernel/irq_64.c:87 do_IRQ+0x93/0x1c0 arch/x86/kernel/irq.c:246 ret_from_intr+0x0/0x1e native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:60 arch_safe_halt arch/x86/include/asm/paravirt.h:94 [inline] default_idle+0x49/0x320 arch/x86/kernel/process.c:565 cpuidle_idle_call kernel/sched/idle.c:153 [inline] do_idle+0x2ee/0x4b0 kernel/sched/idle.c:263 cpu_startup_entry+0xc6/0xd0 kernel/sched/idle.c:369 start_secondary+0x421/0x590 arch/x86/kernel/smpboot.c:271 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 -> #1 (&port_lock_key){-.-.}: serial8250_console_write+0x7c8/0x9c0 drivers/tty/serial/8250/8250_port.c:3251 call_console_drivers kernel/printk/printk.c:1736 [inline] console_unlock+0xaea/0xff0 kernel/printk/printk.c:2429 vprintk_emit+0x484/0x6e0 kernel/printk/printk.c:1937 vprintk_func+0x79/0x17e kernel/printk/printk_safe.c:398 printk+0xba/0xed kernel/printk/printk.c:2012 register_console+0x875/0xc70 kernel/printk/printk.c:2745 univ8250_console_init+0x3a/0x46 drivers/tty/serial/8250/8250_core.c:684 console_init+0x4cb/0x718 kernel/printk/printk.c:2831 start_kernel+0x68c/0x917 init/main.c:660 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 -> #0 (console_owner){-.-.}: console_lock_spinning_enable kernel/printk/printk.c:1599 [inline] console_unlock+0x3e8/0xff0 kernel/printk/printk.c:2426 vprintk_emit+0x484/0x6e0 kernel/printk/printk.c:1937 vprintk_func+0x79/0x17e kernel/printk/printk_safe.c:398 printk+0xba/0xed kernel/printk/printk.c:2012 show_pwq kernel/workqueue.c:4490 [inline] show_workqueue_state kernel/workqueue.c:4586 [inline] show_workqueue_state.cold+0x3e5/0x1038 kernel/workqueue.c:4557 wq_watchdog_timer_fn+0x4d8/0x550 kernel/workqueue.c:5598 call_timer_fn+0x177/0x700 kernel/time/timer.c:1326 expire_timers+0x24f/0x4f0 kernel/time/timer.c:1363 __run_timers kernel/time/timer.c:1684 [inline] run_timer_softirq+0x45d/0x660 kernel/time/timer.c:1699 __do_softirq+0x26c/0x93d kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x17b/0x1c0 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:544 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 arch_local_irq_enable arch/x86/include/asm/paravirt.h:799 [inline] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] _raw_spin_unlock_irq+0x50/0x90 kernel/locking/spinlock.c:192 spin_unlock_irq include/linux/spinlock.h:379 [inline] get_signal+0x1964/0x1f30 kernel/signal.c:2591 do_signal+0x8f/0x1620 arch/x86/kernel/signal.c:821 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163 prepare_exit_to_usermode+0x27b/0x2e0 arch/x86/entry/common.c:198 retint_user+0x8/0x18 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 syz-executor.5/2969: #0: 00000000b2c26407 ((&wq_watchdog_timer)){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:168 [inline] #0: 00000000b2c26407 ((&wq_watchdog_timer)){+.-.}, at: call_timer_fn+0xc9/0x700 kernel/time/timer.c:1316 #1: 00000000fd413b51 (rcu_read_lock_sched){....}, at: show_workqueue_state+0x0/0x120 kernel/workqueue.c:4455 #2: 00000000e94ba0bd (&(&pool->lock)->rlock){-.-.}, at: show_workqueue_state kernel/workqueue.c:4584 [inline] #2: 00000000e94ba0bd (&(&pool->lock)->rlock){-.-.}, at: show_workqueue_state.cold+0x294/0x1038 kernel/workqueue.c:4557 #3: 00000000235fcedc (console_lock){+.+.}, at: console_trylock_spinning kernel/printk/printk.c:1661 [inline] #3: 00000000235fcedc (console_lock){+.+.}, at: vprintk_emit+0x266/0x6e0 kernel/printk/printk.c:1936 stack backtrace: CPU: 0 PID: 2969 Comm: syz-executor.5 Not tainted 4.19.128-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+0x1fc/0x2fe lib/dump_stack.c:118 print_circular_bug.isra.0.cold+0x2dc/0x425 kernel/locking/lockdep.c:1221 check_prev_add kernel/locking/lockdep.c:1865 [inline] check_prevs_add kernel/locking/lockdep.c:1978 [inline] validate_chain kernel/locking/lockdep.c:2419 [inline] __lock_acquire+0x3145/0x4380 kernel/locking/lockdep.c:3415 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3907 console_lock_spinning_enable kernel/printk/printk.c:1599 [inline] console_unlock+0x3e8/0xff0 kernel/printk/printk.c:2426 vprintk_emit+0x484/0x6e0 kernel/printk/printk.c:1937 vprintk_func+0x79/0x17e kernel/printk/printk_safe.c:398 printk+0xba/0xed kernel/printk/printk.c:2012 show_pwq kernel/workqueue.c:4490 [inline] show_workqueue_state kernel/workqueue.c:4586 [inline] show_workqueue_state.cold+0x3e5/0x1038 kernel/workqueue.c:4557 wq_watchdog_timer_fn+0x4d8/0x550 kernel/workqueue.c:5598 call_timer_fn+0x177/0x700 kernel/time/timer.c:1326 expire_timers+0x24f/0x4f0 kernel/time/timer.c:1363 __run_timers kernel/time/timer.c:1684 [inline] run_timer_softirq+0x45d/0x660 kernel/time/timer.c:1699 __do_softirq+0x26c/0x93d kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x17b/0x1c0 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:544 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline] RIP: 0010:_raw_spin_unlock_irq+0x50/0x90 kernel/locking/spinlock.c:192 Code: c0 d8 57 b2 88 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 39 48 83 3d 21 40 94 01 00 74 25 fb 66 0f 1f 44 00 00 01 00 00 00 e8 66 1e 28 fa 65 8b 05 ff d5 e3 78 85 c0 74 02 5d RSP: 0000:ffff88802bdcfc50 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff1164afb RBX: 0000000000000000 RCX: 0000000000000000 RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffff88804373e9c4 RBP: ffff88808b235d08 R08: ffff88804373e140 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000402601 R13: ffff88804373e868 R14: 000000000000000b R15: ffff88808b235640 spin_unlock_irq include/linux/spinlock.h:379 [inline] get_signal+0x1964/0x1f30 kernel/signal.c:2591 do_signal+0x8f/0x1620 arch/x86/kernel/signal.c:821 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163 prepare_exit_to_usermode+0x27b/0x2e0 arch/x86/entry/common.c:198 retint_user+0x8/0x18 RIP: 0033:0x405dc9 Code: d0 ff ff ff 01 48 8b 7c 24 28 c7 44 24 34 00 00 00 00 e8 0a ef 01 00 85 c0 75 23 48 6b 44 24 20 18 8b 7c 24 1c 48 03 44 24 38 <48> 8b 48 10 48 8b 50 08 48 8b 30 e8 a7 0a 01 00 89 44 24 34 64 f0 RSP: 002b:00007f4f738a1a70 EFLAGS: 00010206 RAX: 000000002e0991f0 RBX: 0000000000509920 RCX: 00000000004168b7 RDX: 5e83b4bc18eae3ea RSI: 0000000000000000 RDI: 0000000000000008 RBP: 000000000078c0e0 R08: 00007f4f738a1a70 R09: 000000000078c0e0 R10: 0000000000000000 R11: 0000000000000000 R12: 00000000ffffffff R13: 0000000000000c1b R14: 00000000004ce694 R15: 00007f4f738a26d4 pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=8/256 refcnt=9 pending: vmstat_shepherd, defense_work_handler, defense_work_handler, defense_work_handler, defense_work_handler, cache_reap, check_corruption, switchdev_deferred_process_work workqueue events_highpri: flags=0x10 pwq 1: cpus=0 node=0 flags=0x0 nice=-20 active=1/256 refcnt=3 pending: flush_backlog BAR(2909) workqueue events_long: flags=0x0 pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=5/256 refcnt=6 pending: br_fdb_cleanup, br_fdb_cleanup, br_fdb_cleanup, br_fdb_cleanup, br_fdb_cleanup workqueue events_unbound: flags=0x2 pwq 4: cpus=0-1 flags=0x4 nice=0 active=4/512 refcnt=7 pending: call_usermodehelper_exec_work, fsnotify_connector_destroy_workfn, fsnotify_mark_destroy_workfn, call_usermodehelper_exec_work workqueue events_power_efficient: flags=0x80 pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=4/256 refcnt=5 pending: gc_worker, fb_flashcursor, neigh_periodic_work, neigh_periodic_work workqueue mm_percpu_wq: flags=0x8 pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/256 refcnt=2 pending: vmstat_update workqueue writeback: flags=0x4e pwq 4: cpus=0-1 flags=0x4 nice=0 active=1/256 refcnt=4 pending: wb_workfn workqueue kblockd: flags=0x18 pwq 1: cpus=0 node=0 flags=0x0 nice=-20 active=1/256 refcnt=2 pending: blk_mq_timeout_work workqueue dm_bufio_cache: flags=0x8 pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/256 refcnt=2 pending: work_fn workqueue ipv6_addrconf: flags=0x40008 pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/1 refcnt=2 pending: addrconf_verify_work workqueue krxrpcd: flags=0x0 pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/1 refcnt=5 pending: rxrpc_peer_keepalive_worker delayed: rxrpc_peer_keepalive_worker, rxrpc_peer_keepalive_worker, rxrpc_peer_keepalive_worker workqueue bat_events: flags=0xe000a pwq 4: cpus=0-1 flags=0x4 nice=0 active=1/1 refcnt=57 pending: batadv_nc_worker delayed: batadv_nc_worker, batadv_nc_worker, batadv_nc_worker, batadv_nc_worker, batadv_nc_worker, batadv_purge_orig, batadv_mcast_mla_update, batadv_mcast_mla_update, batadv_mcast_mla_update, batadv_mcast_mla_update, batadv_mcast_mla_update, batadv_mcast_mla_update, batadv_iv_send_outstanding_bat_ogm_packet, batadv_iv_send_outstanding_bat_ogm_packet, batadv_purge_orig, batadv_purge_orig, batadv_iv_send_outstanding_bat_ogm_packet, batadv_iv_send_outstanding_bat_ogm_packet, batadv_iv_send_outstanding_bat_ogm_packet, batadv_iv_send_outstanding_bat_ogm_packet, batadv_purge_orig, batadv_tt_purge, batadv_tt_purge, batadv_iv_send_outstanding_bat_ogm_packet, batadv_iv_send_outstanding_bat_ogm_packet, batadv_iv_send_outstanding_bat_ogm_packet, batadv_iv_send_outstanding_bat_ogm_packet, batadv_iv_send_outstanding_bat_ogm_packet , batadv_iv_send_outstanding_bat_ogm_packet, batadv_purge_orig, batadv_purge_orig, batadv_iv_send_outstanding_bat_ogm_packet, batadv_iv_send_outstanding_bat_ogm_packet, batadv_iv_send_outstanding_bat_ogm_packet, batadv_iv_send_outstanding_bat_ogm_packet, batadv_iv_send_outstanding_bat_ogm_packet, batadv_iv_send_outstanding_bat_ogm_packet, batadv_tt_purge, batadv_tt_purge, batadv_tt_purge, batadv_tt_purge, batadv_dat_purge, batadv_bla_periodic_work, batadv_dat_purge, batadv_bla_periodic_work, batadv_dat_purge, batadv_bla_periodic_work, batadv_dat_purge, batadv_bla_periodic_work, batadv_bla_periodic_work, batadv_dat_purge, batadv_dat_purge, batadv_bla_periodic_work workqueue bond14: flags=0xa000a pwq 4: cpus=0-1 flags=0x4 nice=0 active=1/1 refcnt=5 pending: bond_mii_monitor delayed: bond_alb_monitor pool 2: cpus=1 node=0 flags=0x0 nice=0 hung=0s workers=4 idle: 19 1277 1276