Public bug reported:

== Summary ==
System hangs indefinitely during suspend-to-RAM. The kernel soft lockup
watchdog reports CPU stuck in smp_call_function_many_cond for thousands
of seconds, making the system unrecoverable without a hard reset.

== Environment ==
- Ubuntu 25.10 (Questing Quokka) / Kubuntu 25.10
- Kernel: 6.17.0-8-generic and 6.17.0-14-generic (both affected)
- Hardware: HP Z2 Tower G9 Workstation (Intel, PREEMPT(voluntary))

== Reproduction ==
1. Have a process using AF_PACKET raw socket (e.g. any network monitoring tool)
2. Suspend the system (systemctl suspend)
3. System hangs — never reaches actual suspend state, unrecoverable without 
hard reset

== Call Trace ==
watchdog: BUG: soft lockup - CPU#21 stuck for 23s! [kworker/21:1:422]
Workqueue: events netstamp_clear
RIP: 0010:smp_call_function_many_cond+0x123/0x580

Call Trace:
 <TASK>
 ? __pfx_do_sync_core+0x10/0x10
 ? tpacket_rcv+0x48e/0xde0
 on_each_cpu_cond_mask+0x24/0x60
 smp_text_poke_batch_finish+0x120/0x5b0
 arch_jump_label_transform_apply+0x1a/0x30
 __jump_label_update+0x100/0x120
 jump_label_update+0xe1/0x110
 static_key_enable_cpuslocked+0x86/0xb0
 static_key_enable+0x1f/0x30
 netstamp_clear+0x2d/0x50
 process_one_work+0x18b/0x370
 worker_thread+0x317/0x450
 kthread+0x108/0x220
 ret_from_fork+0x131/0x150
 ret_from_fork_asm+0x1a/0x30
 </TASK>

== Root Cause Analysis ==
When a process opens an AF_PACKET raw socket, the kernel schedules
netstamp_clear work via the workqueue. netstamp_clear calls
static_key_enable() which triggers jump_label modification via
smp_text_poke_batch_finish(). This requires all CPUs to synchronize
via smp_call_function_many_cond().

If suspend's freeze_processes() has already frozen other CPUs before
this IPI completes, the calling CPU waits forever for responses that
will never come, resulting in a permanent soft lockup.

The race condition:
  CPU 21: netstamp_clear -> smp_text_poke_batch_finish -> waiting for all CPUs
  Other CPUs: already frozen by freeze_processes() -> cannot respond to IPI

== Impact ==
System is completely unrecoverable from suspend without hard reset.
Affects any workload that uses AF_PACKET sockets (network monitoring,
packet capture tools, etc.). Confirmed on both 6.17.0-8 and 6.17.0-14.

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2143913

Title:
  kernel: soft lockup in smp_call_function_many_cond during suspend -
  netstamp_clear races with freeze_processes

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2143913/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to