hrtimer: interrupt took 39722 ns BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=0 stuck for 175s! BUG: workqueue lockup - pool cpus=1 node=0 flags=0x0 nice=0 stuck for 175s! BUG: workqueue lockup - pool cpus=0-1 flags=0x4 nice=0 stuck for 171s! Showing busy workqueues and worker pools: workqueue events: flags=0x0 pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=1/256 pending: cache_reap ====================================================== WARNING: possible circular locking dependency detected 5.0.0-rc2+ #33 Not tainted ------------------------------------------------------ syz-executor921/7969 is trying to acquire lock: 00000000cdc6d589 (console_owner){-.-.}, at: log_next kernel/printk/printk.c:492 [inline] 00000000cdc6d589 (console_owner){-.-.}, at: console_unlock+0x4d3/0x11e0 kernel/printk/printk.c:2395 but task is already holding lock: 000000006690aa45 (&(&pool->lock)->rlock){-.-.}, at: show_workqueue_state.cold+0xac5/0x15a8 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+0x2d9/0x1450 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+0x854/0x9b0 kernel/workqueue.c:4217 do_floppy_init drivers/block/floppy.c:4702 [inline] floppy_async_init+0x1fcb/0x2122 drivers/block/floppy.c:4720 async_run_entry_fn+0x1ab/0x7f0 kernel/async.c:127 process_one_work+0xd0c/0x1ce0 kernel/workqueue.c:2153 worker_thread+0x143/0x14a0 kernel/workqueue.c:2296 kthread+0x357/0x430 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 -> #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+0x2d9/0x1450 kernel/workqueue.c:1417 queue_work_on+0x192/0x200 kernel/workqueue.c:1486 queue_work include/linux/workqueue.h:512 [inline] tty_schedule_flip+0x149/0x1e0 drivers/tty/tty_buffer.c:413 tty_flip_buffer_push+0x16/0x20 drivers/tty/tty_buffer.c:556 pty_write+0x1a6/0x200 drivers/tty/pty.c:125 n_tty_write+0xb9e/0x1220 drivers/tty/n_tty.c:2354 do_tty_write drivers/tty/tty_io.c:959 [inline] tty_write+0x45b/0x7a0 drivers/tty/tty_io.c:1043 __vfs_write+0x116/0xb40 fs/read_write.c:485 vfs_write+0x20c/0x580 fs/read_write.c:549 ksys_write+0x105/0x260 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+0x1a3/0x800 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: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+0x1c6/0xb10 kernel/irq/handle.c:149 handle_irq_event_percpu+0xa0/0x1d0 kernel/irq/handle.c:189 handle_irq_event+0xa7/0x134 kernel/irq/handle.c:206 handle_edge_irq+0x232/0x8a0 kernel/irq/chip.c:791 generic_handle_irq_desc include/linux/irqdesc.h:154 [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:555 default_idle_call+0x36/0x90 kernel/sched/idle.c:93 cpuidle_idle_call kernel/sched/idle.c:153 [inline] do_idle+0x386/0x5d0 kernel/sched/idle.c:262 cpu_startup_entry+0x1b/0x20 kernel/sched/idle.c:353 start_secondary+0x435/0x620 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+0x253/0xab0 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:1737 [inline] console_unlock+0xcff/0x11e0 kernel/printk/printk.c:2408 vprintk_emit+0x370/0x960 kernel/printk/printk.c:1931 vprintk_default+0x28/0x30 kernel/printk/printk.c:1958 vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398 printk+0xba/0xed kernel/printk/printk.c:1991 register_console+0x74d/0xb50 kernel/printk/printk.c:2723 univ8250_console_init+0x3e/0x4b drivers/tty/serial/8250/8250_core.c:681 console_init+0x6af/0x9f3 kernel/printk/printk.c:2809 start_kernel+0x5dc/0x8b7 init/main.c:667 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+0x1db/0x570 kernel/locking/lockdep.c:3841 console_lock_spinning_enable kernel/printk/printk.c:1600 [inline] console_unlock+0x53d/0x11e0 kernel/printk/printk.c:2405 vprintk_emit+0x370/0x960 kernel/printk/printk.c:1931 vprintk_default+0x28/0x30 kernel/printk/printk.c:1958 vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398 printk+0xba/0xed kernel/printk/printk.c:1991 show_pwq kernel/workqueue.c:4464 [inline] show_workqueue_state.cold+0xc5f/0x15a8 kernel/workqueue.c:4559 wq_watchdog_timer_fn+0x6bd/0x7e0 kernel/workqueue.c:5571 call_timer_fn+0x254/0x900 kernel/time/timer.c:1325 expire_timers kernel/time/timer.c:1362 [inline] __run_timers+0x6fc/0xd50 kernel/time/timer.c:1681 run_timer_softirq+0x88/0xb0 kernel/time/timer.c:1696 __do_softirq+0x30b/0xb11 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1b7/0x760 arch/x86/kernel/apic/apic.c:1062 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807 arch_local_irq_restore arch/x86/include/asm/paravirt.h:766 [inline] slab_alloc mm/slab.c:3374 [inline] __do_kmalloc mm/slab.c:3709 [inline] __kmalloc+0x2b4/0x740 mm/slab.c:3720 kmalloc_array include/linux/slab.h:668 [inline] kcalloc include/linux/slab.h:679 [inline] iter_file_splice_write+0x267/0xfc0 fs/splice.c:693 do_splice_from fs/splice.c:851 [inline] direct_splice_actor+0x126/0x1a0 fs/splice.c:1023 splice_direct_to_actor+0x3be/0x9d0 fs/splice.c:978 do_splice_direct+0x2c7/0x420 fs/splice.c:1066 do_sendfile+0x61a/0xe60 fs/read_write.c:1436 __do_sys_sendfile64 fs/read_write.c:1491 [inline] __se_sys_sendfile64 fs/read_write.c:1483 [inline] __x64_sys_sendfile64+0x15a/0x240 fs/read_write.c:1483 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe 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 *** 5 locks held by syz-executor921/7969: #0: 000000000c2ff4aa (sb_writers#3){.+.+}, at: file_start_write include/linux/fs.h:2815 [inline] #0: 000000000c2ff4aa (sb_writers#3){.+.+}, at: do_sendfile+0xad7/0xe60 fs/read_write.c:1435 #1: 00000000b7319400 ((&wq_watchdog_timer)){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:171 [inline] #1: 00000000b7319400 ((&wq_watchdog_timer)){+.-.}, at: call_timer_fn+0x1b4/0x900 kernel/time/timer.c:1315 #2: 00000000927f62fa (rcu_read_lock_sched){....}, at: show_workqueue_state+0x0/0x180 kernel/workqueue.c:4423 #3: 000000006690aa45 (&(&pool->lock)->rlock){-.-.}, at: show_workqueue_state.cold+0xac5/0x15a8 kernel/workqueue.c:4557 #4: 00000000a12e56e9 (console_lock){+.+.}, at: console_trylock_spinning kernel/printk/printk.c:1662 [inline] #4: 00000000a12e56e9 (console_lock){+.+.}, at: vprintk_emit+0x351/0x960 kernel/printk/printk.c:1930 stack backtrace: CPU: 0 PID: 7969 Comm: syz-executor921 Not tainted 5.0.0-rc2+ #33 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+0x1db/0x2d0 lib/dump_stack.c:113 print_circular_bug.isra.0.cold+0x1cc/0x28f kernel/locking/lockdep.c:1224 check_prev_add kernel/locking/lockdep.c:1866 [inline] check_prevs_add kernel/locking/lockdep.c:1979 [inline] validate_chain kernel/locking/lockdep.c:2350 [inline] __lock_acquire+0x3014/0x4a30 kernel/locking/lockdep.c:3338 lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841 console_lock_spinning_enable kernel/printk/printk.c:1600 [inline] console_unlock+0x53d/0x11e0 kernel/printk/printk.c:2405 vprintk_emit+0x370/0x960 kernel/printk/printk.c:1931 vprintk_default+0x28/0x30 kernel/printk/printk.c:1958 vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398 printk+0xba/0xed kernel/printk/printk.c:1991 show_pwq kernel/workqueue.c:4464 [inline] show_workqueue_state.cold+0xc5f/0x15a8 kernel/workqueue.c:4559 wq_watchdog_timer_fn+0x6bd/0x7e0 kernel/workqueue.c:5571 call_timer_fn+0x254/0x900 kernel/time/timer.c:1325 expire_timers kernel/time/timer.c:1362 [inline] __run_timers+0x6fc/0xd50 kernel/time/timer.c:1681 run_timer_softirq+0x88/0xb0 kernel/time/timer.c:1696 __do_softirq+0x30b/0xb11 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1b7/0x760 arch/x86/kernel/apic/apic.c:1062 Lost 59 message(s)! pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=5/256 pending: defense_work_handler, vmstat_shepherd, cache_reap, psi_update_work, check_corruption workqueue events_power_efficient: flags=0x80 pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=2/256 pending: gc_worker, neigh_periodic_work pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=3/256 pending: neigh_periodic_work, do_cache_clean, check_lifetime workqueue mm_percpu_wq: flags=0x8 pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=1/256 pending: vmstat_update pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/256 pending: vmstat_update workqueue writeback: flags=0x4e pwq 4: cpus=0-1 flags=0x4 nice=0 active=1/256 pending: wb_workfn workqueue dm_bufio_cache: flags=0x8 pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/256 pending: work_fn workqueue ipv6_addrconf: flags=0x40008 pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/1 pending: addrconf_verify_work