random: sshd: uninitialized urandom read (32 bytes read) random: sshd: uninitialized urandom read (32 bytes read) BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=0 stuck for 32s! BUG: workqueue lockup - pool cpus=1 node=0 flags=0x0 nice=0 stuck for 32s! BUG: workqueue lockup - pool cpus=0-1 flags=0x4 nice=0 stuck for 32s! Showing busy workqueues and worker pools: workqueue events: flags=0x0 pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=2/256 pending: defense_work_handler, cache_reap pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=2/256 pending: vmstat_shepherd, cache_reap workqueue events_unbound: flags=0x2 pwq 4: cpus=0-1 flags=0x4 nice=0 active=29/512 in-flight: 7:flush_to_ldisc flush_to_ldisc, 50:flush_to_ldisc flush_to_ldisc, 122:flush_to_ldisc flush_to_ldisc, 4557:flush_to_ldisc flush_to_ldisc, 4567:flush_to_ldisc flush_to_ldisc, 23:flush_to_ldisc flush_to_ldisc, 4569:flush_to_ldisc flush_to_ldisc, 4565:flush_to_ldisc flush_to_ldisc, 4560:flush_to_ldisc flush_to_ldisc, 4550:flush_to_ldisc flush_to_ldisc, 4551:flush_to_ldisc flush_to_ldisc, 4571:flush_to_ldisc, 4555:flush_to_ldisc flush_to_ldisc, 4561:flush_to_ldisc, 4553:flush_to_ldisc flush_to_ldisc pending: flush_to_ldisc ====================================================== WARNING: possible circular locking dependency detected 4.18.0-rc1+ #115 Not tainted ------------------------------------------------------ kworker/u4:15/4571 is trying to acquire lock: (____ptrval____) (console_owner){-.-.}, at: log_next kernel/printk/printk.c:496 [inline] (____ptrval____) (console_owner){-.-.}, at: console_unlock+0x54e/0x10b0 kernel/printk/printk.c:2376 but task is already holding lock: (____ptrval____) (&pool->lock/1){..-.}, at: show_workqueue_state.cold.48+0xb16/0x15ec kernel/workqueue.c:4542 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&pool->lock/1){..-.}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:310 [inline] __queue_work+0x352/0x1410 kernel/workqueue.c:1417 queue_work_on+0x19a/0x1e0 kernel/workqueue.c:1486 queue_work include/linux/workqueue.h:512 [inline] tty_schedule_flip+0x14c/0x1d0 drivers/tty/tty_buffer.c:408 tty_flip_buffer_push+0x15/0x20 drivers/tty/tty_buffer.c:547 pty_write+0x19d/0x1f0 drivers/tty/pty.c:124 n_tty_write+0xc5b/0x11a0 drivers/tty/n_tty.c:2331 do_tty_write drivers/tty/tty_io.c:963 [inline] tty_write+0x45f/0xae0 drivers/tty/tty_io.c:1051 __vfs_write+0x117/0x9f0 fs/read_write.c:485 vfs_write+0x1f8/0x560 fs/read_write.c:549 ksys_write+0x101/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+0x1b9/0x820 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+0x96/0xc0 kernel/locking/spinlock.c:152 tty_port_tty_get+0x20/0x80 drivers/tty/tty_port.c:288 tty_port_default_wakeup+0x15/0x40 drivers/tty/tty_port.c:47 tty_port_tty_wakeup+0x5d/0x70 drivers/tty/tty_port.c:390 uart_write_wakeup+0x44/0x60 drivers/tty/serial/serial_core.c:103 serial8250_tx_chars+0x4be/0xb60 drivers/tty/serial/8250/8250_port.c:1808 serial8250_handle_irq.part.25+0x1ee/0x280 drivers/tty/serial/8250/8250_port.c:1881 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1867 [inline] serial8250_default_handle_irq+0xc8/0x150 drivers/tty/serial/8250/8250_port.c:1897 serial8250_interrupt+0xfa/0x1d0 drivers/tty/serial/8250/8250_core.c:125 __handle_irq_event_percpu+0x1c8/0xaf0 kernel/irq/handle.c:149 handle_irq_event_percpu+0xa0/0x1d0 kernel/irq/handle.c:189 handle_irq_event+0xa7/0x135 kernel/irq/handle.c:206 handle_edge_irq+0x20f/0x870 kernel/irq/chip.c:791 generic_handle_irq_desc include/linux/irqdesc.h:159 [inline] handle_irq+0x18c/0x2e7 arch/x86/kernel/irq_64.c:77 do_IRQ+0x78/0x190 arch/x86/kernel/irq.c:245 ret_from_intr+0x0/0x1e native_safe_halt+0x6/0x10 arch/x86/include/asm/irqflags.h:54 arch_safe_halt arch/x86/include/asm/paravirt.h:94 [inline] default_idle+0xc7/0x450 arch/x86/kernel/process.c:500 arch_cpu_idle+0x10/0x20 arch/x86/kernel/process.c:491 default_idle_call+0x6d/0x90 kernel/sched/idle.c:93 cpuidle_idle_call kernel/sched/idle.c:153 [inline] do_idle+0x3aa/0x570 kernel/sched/idle.c:262 cpu_startup_entry+0x10c/0x120 kernel/sched/idle.c:368 start_secondary+0x433/0x5d0 arch/x86/kernel/smpboot.c:265 secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:242 -> #1 (&port_lock_key){-.-.}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152 serial8250_console_write+0x8d5/0xb00 drivers/tty/serial/8250/8250_port.c:3230 univ8250_console_write+0x5f/0x70 drivers/tty/serial/8250/8250_core.c:590 call_console_drivers kernel/printk/printk.c:1718 [inline] console_unlock+0xab1/0x10b0 kernel/printk/printk.c:2389 vprintk_emit+0x6c6/0xdf0 kernel/printk/printk.c:1907 vprintk_default+0x28/0x30 kernel/printk/printk.c:1948 vprintk_func+0x7a/0xe7 kernel/printk/printk_safe.c:382 printk+0xa7/0xcf kernel/printk/printk.c:1981 register_console+0x7e7/0xc00 kernel/printk/printk.c:2704 univ8250_console_init+0x3f/0x4b drivers/tty/serial/8250/8250_core.c:685 console_init+0x6e1/0xa54 kernel/printk/printk.c:2788 start_kernel+0x610/0x949 init/main.c:661 x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:452 x86_64_start_kernel+0x76/0x79 arch/x86/kernel/head64.c:433 secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:242 -> #0 (console_owner){-.-.}: lock_acquire+0x1e4/0x540 kernel/locking/lockdep.c:3924 console_lock_spinning_enable kernel/printk/printk.c:1581 [inline] console_unlock+0x5bb/0x10b0 kernel/printk/printk.c:2386 vprintk_emit+0x6c6/0xdf0 kernel/printk/printk.c:1907 vprintk_default+0x28/0x30 kernel/printk/printk.c:1948 vprintk_func+0x7a/0xe7 kernel/printk/printk_safe.c:382 printk+0xa7/0xcf kernel/printk/printk.c:1981 show_pwq kernel/workqueue.c:4449 [inline] show_workqueue_state.cold.48+0xcb8/0x15ec kernel/workqueue.c:4544 wq_watchdog_timer_fn+0x709/0x830 kernel/workqueue.c:5556 call_timer_fn+0x242/0x970 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers+0x7a6/0xc70 kernel/time/timer.c:1666 run_timer_softirq+0x60/0x70 kernel/time/timer.c:1694 __do_softirq+0x2e8/0xb17 kernel/softirq.c:288 invoke_softirq kernel/softirq.c:368 [inline] irq_exit+0x1d1/0x200 kernel/softirq.c:408 exiting_irq arch/x86/include/asm/apic.h:527 [inline] smp_apic_timer_interrupt+0x186/0x730 arch/x86/kernel/apic/apic.c:1052 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:863 __sanitizer_cov_trace_pc+0x14/0x50 kernel/kcov.c:94 echo_buf drivers/tty/n_tty.c:144 [inline] __process_echoes+0x1fd/0x8d0 drivers/tty/n_tty.c:733 commit_echoes+0x163/0x1d0 drivers/tty/n_tty.c:764 n_tty_receive_char_fast drivers/tty/n_tty.c:1416 [inline] n_tty_receive_buf_fast drivers/tty/n_tty.c:1576 [inline] __receive_buf drivers/tty/n_tty.c:1611 [inline] n_tty_receive_buf_common+0x205b/0x2c60 drivers/tty/n_tty.c:1709 n_tty_receive_buf2+0x33/0x40 drivers/tty/n_tty.c:1744 tty_ldisc_receive_buf+0xb0/0x190 drivers/tty/tty_buffer.c:456 tty_port_default_receive_buf+0x115/0x180 drivers/tty/tty_port.c:38 receive_buf drivers/tty/tty_buffer.c:475 [inline] flush_to_ldisc+0x3fd/0x570 drivers/tty/tty_buffer.c:524 process_one_work+0xc73/0x1ba0 kernel/workqueue.c:2153 worker_thread+0x189/0x13c0 kernel/workqueue.c:2296 kthread+0x345/0x410 kernel/kthread.c:240 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412 other info that might help us debug this: Chain exists of: console_owner --> &(&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(console_owner); *** DEADLOCK *** 10 locks held by kworker/u4:15/4571: #0: (____ptrval____) ((wq_completion)"events_unbound"){+.+.}, at: __write_once_size include/linux/compiler.h:215 [inline] #0: (____ptrval____) ((wq_completion)"events_unbound"){+.+.}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: (____ptrval____) ((wq_completion)"events_unbound"){+.+.}, at: atomic64_set include/asm-generic/atomic-instrumented.h:40 [inline] #0: (____ptrval____) ((wq_completion)"events_unbound"){+.+.}, at: atomic_long_set include/asm-generic/atomic-long.h:59 [inline] #0: (____ptrval____) ((wq_completion)"events_unbound"){+.+.}, at: set_work_data kernel/workqueue.c:617 [inline] #0: (____ptrval____) ((wq_completion)"events_unbound"){+.+.}, at: set_work_pool_and_clear_pending kernel/workqueue.c:644 [inline] #0: (____ptrval____) ((wq_completion)"events_unbound"){+.+.}, at: process_one_work+0xb44/0x1ba0 kernel/workqueue.c:2124 #1: (____ptrval____) ((work_completion)(&buf->work)){+.+.}, at: process_one_work+0xb9b/0x1ba0 kernel/workqueue.c:2128 #2: (____ptrval____) (&port->buf.lock/1){+.+.}, at: flush_to_ldisc+0xbf/0x570 drivers/tty/tty_buffer.c:496 #3: (____ptrval____) (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x22/0x90 drivers/tty/tty_ldisc.c:284 #4: (____ptrval____) (&o_tty->termios_rwsem/1){++++}, at: n_tty_receive_buf_common+0xeb/0x2c60 drivers/tty/n_tty.c:1672 #5: (____ptrval____) (&ldata->output_lock){+.+.}, at: commit_echoes+0x13f/0x1d0 drivers/tty/n_tty.c:762 #6: (____ptrval____) ((&wq_watchdog_timer)){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:178 [inline] #6: (____ptrval____) ((&wq_watchdog_timer)){+.-.}, at: call_timer_fn+0x1cd/0x970 kernel/time/timer.c:1316 #7: (____ptrval____) (rcu_read_lock_sched){....}, at: show_workqueue_state+0x0/0x1d0 kernel/workqueue.c:4408 #8: (____ptrval____) (&pool->lock/1){..-.}, at: show_workqueue_state.cold.48+0xb16/0x15ec kernel/workqueue.c:4542 #9: (____ptrval____) (console_lock){+.+.}, at: console_trylock_spinning kernel/printk/printk.c:1643 [inline] #9: (____ptrval____) (console_lock){+.+.}, at: vprintk_emit+0x6ad/0xdf0 kernel/printk/printk.c:1906 stack backtrace: CPU: 0 PID: 4571 Comm: kworker/u4:15 Not tainted 4.18.0-rc1+ #115 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_unbound flush_to_ldisc Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113 print_circular_bug.isra.36.cold.56+0x1bd/0x27d kernel/locking/lockdep.c:1227 check_prev_add kernel/locking/lockdep.c:1867 [inline] check_prevs_add kernel/locking/lockdep.c:1980 [inline] validate_chain kernel/locking/lockdep.c:2421 [inline] __lock_acquire+0x3449/0x5020 kernel/locking/lockdep.c:3435 lock_acquire+0x1e4/0x540 kernel/locking/lockdep.c:3924 console_lock_spinning_enable kernel/printk/printk.c:1581 [inline] console_unlock+0x5bb/0x10b0 kernel/printk/printk.c:2386 vprintk_emit+0x6c6/0xdf0 kernel/printk/printk.c:1907 vprintk_default+0x28/0x30 kernel/printk/printk.c:1948 vprintk_func+0x7a/0xe7 kernel/printk/printk_safe.c:382 printk+0xa7/0xcf kernel/printk/printk.c:1981 show_pwq kernel/workqueue.c:4449 [inline] show_workqueue_state.cold.48+0xcb8/0x15ec kernel/workqueue.c:4544 wq_watchdog_timer_fn+0x709/0x830 kernel/workqueue.c:5556 call_timer_fn+0x242/0x970 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers+0x7a6/0xc70 kernel/time/timer.c:1666 Lost 150 message(s)! workqueue events_power_efficient: flags=0x80 pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=3/256 pending: gc_worker, neigh_periodic_work, do_cache_clean pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/256 pending: neigh_periodic_work 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 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 0: cpus=0 node=0 flags=0x0 nice=0 active=1/256 pending: work_fn pool 4: cpus=0-1 flags=0x4 nice=0 hung=33s workers=17 idle: 4574 4564