BUG: soft lockup in inet_recvmsg

Status: moderation: reported on 2026/12/02 18:11
Subsystems: kvm arch
Labels: prio:low
[Documentation on labels]
Reported-by: syzbot+73834fe9db64b3f2843c@syzkaller.appspotmail.com
First crash: 2h02m, last: 2h02m
✨ AI cause bisection: inconclusive (AI job)
✨ AI-generated root cause summary:

CPU#1 triggered a 107s soft lockup warning inside sshd-session during tcp_recvmsg_locked() -> tcp_cleanup_rbuf() -> __tcp_send_ack() -> tcp_acceptable_seq() -> tcp_wnd_end(), while CPU#0 was in nsim_dev_trap_report_work() allocating an skb. Inspection of both call stacks shows preemption and interrupts were enabled (CONFIG_PREEMPT=y, irq event stamp shows local_bh_enable() completed right before el1_interrupt) with no infinite loops or cross-CPU deadlocks in the TCP or netdevsim paths. Because arm64 guests use a stub kvm_check_and_clear_guest_paused() returning false and the weak running_clock() returning local_clock() without stolen-time adjustment, a host hypervisor pause or vCPU starvation (combined with a lowered watchdog_thresh < 53s) causes watchdog_timer_fn() to report a false-positive soft lockup at whatever code the vCPU happens to resume in, though an unobserved prior kernel stall cannot be completely ruled out.

▶ ▼ ✨ Full AI root cause analysis
Based on kernel commit 693c2e04e3f1:

Technical Analysis of the Soft Lockup Report

Verified Observations from the Crash State

  1. CPU#1 (sshd-session:3393) Call Trace & Preemption/IRQ State

    • CPU#1 was interrupted (el1_interrupt) in tcp_wnd_end() (include/net/tcp.h:1642) inlined into tcp_acceptable_seq() (net/ipv4/tcp_output.c:117) and __tcp_send_ack() (net/ipv4/tcp_output.c:4567), called from:
    • In tcp_recvmsg_locked(), line 2928 is outside and after the do { ... } while (len > 0); receive loop (which ends at line 2921). None of tcp_cleanup_rbuf(), __tcp_cleanup_rbuf(), tcp_send_ack(), __tcp_send_ack(), tcp_acceptable_seq(), or tcp_wnd_end() contain loops or hold spinlocks/preemption-disabling sections.
    • tcp_recvmsg() (net/ipv4/tcp.c:2956) acquires lock_sock(sk) (a sleeping lock with might_sleep()), and the kernel is built with CONFIG_PREEMPT=y, CONFIG_DEBUG_PREEMPT=y, and CONFIG_DEBUG_ATOMIC_SLEEP=y with no atomic-sleep violation logged.
    • In __tcp_send_ack(), alloc_skb() (net/ipv4/tcp_output.c:4550, saved in lr) calls __alloc_skb() (net/core/skbuff.c:697-700):
      } else if (!in_hardirq() && !irqs_disabled()) {
          local_bh_disable();
          skb = napi_skb_cache_get(false);
          local_bh_enable();
      }
      
      The irq event stamp confirms this exact sequence completed immediately before the interrupt:
    • Thus, hardirqs were already enabled before __alloc_skb(), softirqs were re-enabled cleanly (implying softirq_count() == 0), and pstate: 10000005 confirms interrupts were unmasked at the interrupted PC.
    • Furthermore, under CONFIG_PREEMPT=y, watchdog_timer_fn() (kernel/watchdog.c:821-826) feeds the watchdog by calling stop_one_cpu_nowait(smp_processor_id(), softlockup_fn, ...), which wakes migration/1 (cpu_stopper_thread in kernel/stop_machine.c, running in stop_sched_classβ€”higher priority than sshd-session). If sshd-session had been running with preemption enabled while the hrtimer was firing normally, migration/1 would have preempted it at __local_bh_enable_ip() (preempt_check_resched() at kernel/softirq.c:480) or on any reschedule point.
  2. CPU#0 (kworker/u8:22) NMI Backtrace

    • CPU#0 was executing nsim_dev_trap_report_work() -> nsim_dev_trap_report() -> nsim_dev_trap_skb_build() (drivers/net/netdevsim/dev.c:744, 801, 847), performing a GFP_ATOMIC alloc_skb() through SLUB sheaves (__pcs_replace_empty_main() -> refill_sheaf() -> refill_objects() in mm/slub.c) and get_page_from_freelist() -> prep_new_page() (mm/page_alloc.c).
    • pstate: 20000005 shows interrupts enabled, and this path shares no locks with CPU#1's tcp_acceptable_seq().
  3. Watchdog Mechanism and Arm64 Guest Timing

    • In kernel/watchdog.c:
      • get_timestamp() (kernel/watchdog.c:665-668) computes running_clock() >> 30LL.
      • is_softlockup() (kernel/watchdog.c:744-774) triggers when time_after(now, period_ts + get_softlockup_thresh()), returning now - touch_ts (here 107s).
      • Since period_ts >= touch_ts (both are updated together by update_touch_ts(), while touch_softlockup_watchdog*() only sets watchdog_report_ts = SOFTLOCKUP_DELAY_REPORT), now - period_ts <= 107s. Although CONFIG_CMDLINE specifies watchdog_thresh=165 (get_softlockup_thresh() = 330s), triggering at 107s indicates watchdog_thresh was lowered (e.g., via /proc/sys/kernel/watchdog_thresh or bootloader cmdline override) to < 53s.
    • On arm64 (Hardware name: linux,dummy-virt (DT)):
      • running_clock() (kernel/sched/clock.c:508-511) uses the weak implementation returning local_clock(), which is backed by the architectural timer and continues advancing even when the vCPU is stopped/descheduled by the host hypervisor (CONFIG_PARAVIRT_TIME_ACCOUNTING is also not set).
      • kvm_check_and_clear_guest_paused() (kernel/watchdog.c:841) resolves to the generic stub in include/asm-generic/kvm_para.h:12, which unconditionally returns false on arm64 (unlike x86).

Root Cause Assessment & What Remains Inconclusive

  • Ruled out: An infinite loop, spinlock deadlock, or IRQ/preemption-disabled hang in the observed tcp_recvmsg_locked() -> tcp_cleanup_rbuf() -> __tcp_send_ack() -> tcp_acceptable_seq() path on CPU#1, or cross-CPU contention from nsim_dev_trap_report_work() on CPU#0.
  • Most likely root cause: A hypervisor-induced stall (host pausing or heavily starving the arm64 VM vCPU for >107s). When the vCPU resumed inside sshd-session (tcp_acceptable_seq), local_clock() jumped by 107s, kvm_check_and_clear_guest_paused() failed to suppress the false positive (being a stub on arm64), and the pending hrtimer fired watchdog_timer_fn(), reporting a soft lockup at the arbitrary instruction where execution resumed.
  • Inconclusive aspect: Because post-mortem watchdog output does not record historical timestamps of prior tasks or cpu_stopper wakeups on CPU#1, an unobserved transient stall prior to sshd-session's tcp_recvmsg() (or a scheduler/cpu_stopper delay preventing migration/1 from executing softlockup_fn() for 107s) cannot be strictly ruled out from this trace alone.
▶ ▼ ✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision
2555aa75 bisect-cause IsRelease: ❌ ❓ BUG: soft lockup in inet_recvmsg 2026/12/02 17:48 2026/12/02 17:48 2026/12/02 18:09 35891725
7db28615 assessment-security DenialOfService: ❌ Exploitable: ❌ FilesystemTrigger: ❌ FuzzingArtifact: ❌ MemoryCorruption: ❌ NetworkNeedsSetup: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ ❓ BUG: soft lockup in inet_recvmsg 2026/12/02 17:45 2026/12/02 17:45 2026/12/02 18:09 35891725
▶ ▼ Similar bugs (1)
Kernel Title Rank πŸ›ˆ Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in inet_recvmsg net 1 2 902d 911d 0/30 auto-obsoleted due to no activity on 2024/09/11 04:55

Sample crash report:
watchdog: BUG: soft lockup - CPU#1 stuck for 107s! [sshd-session:3393]
Modules linked in:
irq event stamp: 1155286
hardirqs last  enabled at (1155285): [<ffff800080265424>] __local_bh_enable_ip+0x184/0x2e4 kernel/softirq.c:478
hardirqs last disabled at (1155286): [<ffff800085a9b810>] __el1_irq arch/arm64/kernel/entry-common.c:566 [inline]
hardirqs last disabled at (1155286): [<ffff800085a9b810>] el1_interrupt+0x28/0x60 arch/arm64/kernel/entry-common.c:582
softirqs last  enabled at (1155284): [<ffff800084a80578>] __alloc_skb+0x4b0/0x5f8 net/core/skbuff.c:699
softirqs last disabled at (1155282): [<ffff800084a80560>] __alloc_skb+0x498/0x5f8 net/core/skbuff.c:696
CPU: 1 UID: 0 PID: 3393 Comm: sshd-session Not tainted syzkaller #0 PREEMPT 
Hardware name: linux,dummy-virt (DT)
pstate: 10000005 (nzcV daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : tcp_wnd_end include/net/tcp.h:1642 [inline]
pc : tcp_acceptable_seq net/ipv4/tcp_output.c:117 [inline]
pc : __tcp_send_ack.part.0+0xf0/0x840 net/ipv4/tcp_output.c:4567
lr : alloc_skb include/linux/skbuff.h:1391 [inline]
lr : __tcp_send_ack.part.0+0x6c/0x840 net/ipv4/tcp_output.c:4550
sp : ffff8000a25175a0
x29: ffff8000a25175a0 x28: 0000000000000100 x27: 1fffe0000235b823
x26: 0000000000000100 x25: ffff000011adc148 x24: 0000000000000000
x23: 00000000a260bbf3 x22: ffff0000187d1b68 x21: 0000000000000100
x20: ffff0000187d1a80 x19: ffff000021dc6140 x18: 1fffe000030fa474
x17: ffff0000187d1b70 x16: ffff0000187d23a2 x15: ffff000015cc00d0
x14: 0000000000000004 x13: 0000000000000000 x12: ffff6000028bfbed
x11: 1fffe000028bfbec x10: ffff6000028bfbec x9 : dfff800000000000
x8 : ffff0000145fdf63 x7 : 0000000000000001 x6 : ffff6000028bfbec
x5 : ffff0000145fdf60 x4 : 1fffe000030fa496 x3 : dfff800000000000
x2 : 0000000000000003 x1 : 0000000000000000 x0 : ffff0000187d24b0
Call trace:
 tcp_wnd_end include/net/tcp.h:1642 [inline] (P)
 tcp_acceptable_seq net/ipv4/tcp_output.c:117 [inline] (P)
 __tcp_send_ack.part.0+0xf0/0x840 net/ipv4/tcp_output.c:4567 (P)
 __tcp_send_ack net/ipv4/tcp_output.c:4583 [inline]
 tcp_send_ack+0x7c/0xa0 net/ipv4/tcp_output.c:4583
 __tcp_cleanup_rbuf+0x1e8/0x39c net/ipv4/tcp.c:1615
 tcp_cleanup_rbuf+0xb0/0x640 net/ipv4/tcp.c:1627
 tcp_recvmsg_locked+0x450/0x2650 net/ipv4/tcp.c:2928
 tcp_recvmsg+0xfc/0x448 net/ipv4/tcp.c:2957
 inet_recvmsg+0x98/0x328 net/ipv4/af_inet.c:894
 sock_recvmsg_nosec net/socket.c:1154 [inline]
 sock_recvmsg+0xdc/0x1bc net/socket.c:1176
 sock_read_iter+0x228/0x2e0 net/socket.c:1245
 new_sync_read fs/read_write.c:473 [inline]
 vfs_read+0x6c4/0xa14 fs/read_write.c:554
 ksys_read+0x194/0x1e0 fs/read_write.c:696
 __do_sys_read fs/read_write.c:705 [inline]
 __se_sys_read fs/read_write.c:703 [inline]
 __arm64_sys_read+0x70/0xa0 fs/read_write.c:703
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x74/0x240 arch/arm64/kernel/syscall.c:49
 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:121
 do_el0_svc+0x40/0x58 arch/arm64/kernel/syscall.c:140
 el0_svc+0x58/0x21c arch/arm64/kernel/entry-common.c:797
 el0t_64_sync_handler+0xa0/0xe4 arch/arm64/kernel/entry-common.c:816
 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:606
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 5518 Comm: kworker/u8:22 Not tainted syzkaller #0 PREEMPT 
Hardware name: linux,dummy-virt (DT)
Workqueue: events_unbound nsim_dev_trap_report_work
pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : set_page_pfmemalloc include/linux/mm.h:3381 [inline]
pc : prep_new_page mm/page_alloc.c:1893 [inline]
pc : get_page_from_freelist+0x1ed4/0x2c54 mm/page_alloc.c:3963
lr : prep_new_page mm/page_alloc.c:1884 [inline]
lr : get_page_from_freelist+0x1ed4/0x2c54 mm/page_alloc.c:3963
sp : ffff80008f4671b0
x29: ffff80008f467320 x28: fffffdffc0c36c00 x27: 0000000000000003
x26: ffff00007fbec780 x25: ffff00007fbec0c0 x24: ffff80008f4671b0
x23: dfff800000000000 x22: 0000000000000801 x21: 0000000000000030
x20: 1ffff00011e8ce58 x19: 00000000000d2820 x18: 0000000000000000
x17: 1ffff00011d2cece x16: 0000000000001234 x15: 1ffff00011e8ce92
x14: 1ffff00011083532 x13: ffff80008ab4d350 x12: ffff7fbff8186d8c
x11: 1fffffbff8186d8b x10: ffff7fbff8186d8b x9 : dfff800000000000
x8 : fffffdffc0c36c5b x7 : 0000000000000001 x6 : ffff7fbff8186d8b
x5 : fffffdffc0c36c58 x4 : ffff7fbff8186d8c x3 : ffff800080ad5d38
x2 : 1fffffbff8186d93 x1 : 0000000000000000 x0 : fffffdffc0c36c98
Call trace:
 prep_new_page mm/page_alloc.c:1884 [inline] (P)
 get_page_from_freelist+0x1ed4/0x2c54 mm/page_alloc.c:3963 (P)
 __alloc_frozen_pages_noprof+0x2b4/0x2b90 mm/page_alloc.c:5505
 alloc_slab_page+0x30/0x108 mm/slub.c:3384
 allocate_slab mm/slub.c:3499 [inline]
 new_slab+0xb8/0x474 mm/slub.c:3550
 refill_objects+0x278/0x41c mm/slub.c:7554
 refill_sheaf mm/slub.c:2917 [inline]
 __pcs_replace_empty_main+0x2d4/0x6a0 mm/slub.c:4811
 alloc_from_pcs mm/slub.c:4887 [inline]
 slab_alloc_node mm/slub.c:5021 [inline]
 __do_kmalloc_node mm/slub.c:5530 [inline]
 __kmalloc_node_track_caller_noprof+0x5e4/0x760 mm/slub.c:5662
 kmalloc_reserve+0xd0/0x2c0 net/core/skbuff.c:638
 __alloc_skb+0x148/0x5f8 net/core/skbuff.c:716
 alloc_skb include/linux/skbuff.h:1391 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:744 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:801 [inline]
 nsim_dev_trap_report_work+0x1ec/0xaa0 drivers/net/netdevsim/dev.c:847
 process_one_work+0x844/0x1970 kernel/workqueue.c:3497
 process_scheduled_works kernel/workqueue.c:3580 [inline]
 worker_thread+0x42c/0xc90 kernel/workqueue.c:3661
 kthread+0x2ec/0x384 kernel/kthread.c:436
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/12/02 17:45 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux master 693c2e04e3f1 35891725 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-arm64-compat BUG: soft lockup in inet_recvmsg
* Struck through repros no longer work on HEAD.