Crash Site and Observed State
The watchdog soft lockup triggers on CPU#1 (syz.4.3583, PID 19805) on a 2-CPU ARMv7 Versatile Express system (CONFIG_PREEMPT=y, CONFIG_SMP=y, CONFIG_FUTEX=y, CONFIG_FUTEX_PI=y, CONFIG_FUTEX_PRIVATE_HASH=y, with CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_ATOMIC_SLEEP, and CONFIG_PROVE_LOCKING disabled):
- Stall location:
futex_wake() (kernel/futex/waitwake.c:205) calling spin_lock(&hb->lock) -> _raw_spin_lock() (kernel/locking/spinlock.c:173) -> arch_spin_lock() (arch/arm/include/asm/spinlock.h:74).
- Syscall context:
sys_futex_time32(uaddr=0x003562f4, op=0x81 /* FUTEX_WAKE | FUTEX_PRIVATE_FLAG */, val=0xf4240) on a private futex address in syz-executor's own BSS.
- Ticket lock state:
r9 = 0x8797d900 (struct futex_hash_bucket *hb)
r4 = 0x8797d904 (&hb->lock)
r3 = 0x000000a1 (tickets.owner)
r2 = 0x000000a2 (tickets.next)
- CPU#1 holds ticket
0xa2 and has been spinning for 430s waiting for the single current owner (CPU#0, holding ticket 0xa1) to release &hb->lock.
- Unresponsive holder (CPU#0): CPU#1 triggers
IPI_CPU_BACKTRACE (arch/arm/kernel/smp.c:835) to CPU#0, which fails to respond after 10 seconds. Because IPI_CPU_BACKTRACE on ARM32 Versatile Express is a standard IRQ rather than a true NMI (arch/arm/kernel/smp.c:661-665), CPU#0 must have hard IRQs disabled (PSR.I = 1) while still holding &hb->lock.
Because CPU#0 never responded to IPI_CPU_BACKTRACE, its call stack is absent from the report.
Verified Findings and Checked Invariants
-
No 2-CPU spinlock ABBA with CPU#1:
CPU#1 entered futex_wake() directly from userspace holding no spinlocks and waits solely on &hb->lock with IRQs enabled. Thus CPU#0 cannot be deadlocked waiting on a lock held by CPU#1; CPU#0 must be either self-deadlocked, stuck in a non-terminating IRQ-disabled loop while holding hb->lock, or wedged inside a hardirq handler that interrupted CPU#0 while it held hb->lock.
-
Verified CONFIG_FUTEX_PRIVATE_HASH atomic-context locking defects:
In kernel/futex/core.c, futex_private_hash() (kernel/futex/core.c:239-264) and futex_hash() (kernel/futex/core.c:266-280) call futex_pivot_hash() (kernel/futex/core.c:226-237) whenever futex_private_hash_get(fph) returns false (meaning a private hash replacement is pending and the old fph is in FR_ATOMIC with mm->futex.phash.atomic == 0). futex_pivot_hash() acquires mutex_lock(&mm->futex.phash.lock) (a sleeping mutex) and calls __futex_pivot_hash() -> futex_rehash_private(), which takes spin_lock(&hb_old->lock) across all buckets of fph.
Three futex paths invoke these functions from atomic/spinlock/IRQ-disabled contexts:
__futex_unlock_pi() (kernel/futex/pi.c:1276-1277) calls futex_private_hash(key.private.mm) while holding spin_lock(&hb->lock) and raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock) (IRQs disabled).
requeue_pi_wake_futex() (kernel/futex/requeue.c:252-253), called from futex_proxy_trylock_atomic() and futex_requeue() (kernel/futex/requeue.c:669), calls futex_private_hash(key->private.mm) while holding both hb1->lock and hb2->lock.
exit_pi_state_list() (kernel/futex/core.c:1381) invokes CLASS(hbr, hbr)(&key) -> futex_hash(&key) inside raw_spin_lock_irq(&curr->pi_lock) (IRQs disabled), despite guard(private_hash)(current->mm) on line 1369 (which returns NULL if no private hash existed yet when exit_pi_state_list() started).
-
Hypotheses checked and ruled out for a direct CPU#0 hb->lock self-deadlock / loop:
- Self-deadlock via
futex_private_hash() -> futex_rehash_private(): In __futex_unlock_pi() and futex_requeue(), CLASS(hbr, hbr) already pins the current fph unless hbr.fph == NULL (global hash was in use before any private hash allocation). In that hbr.fph == NULL case, hb is a global hash bucket (&futex_queues[...]), whereas futex_rehash_private() only locks buckets in fph (old->queues[]), so hb->lock itself is not recursively acquired. Furthermore, blocking on &mm->futex.phash.lock in schedule() would context-switch rather than spin CPU#0 indefinitely with IRQs disabled.
- PI futex / rt_mutex paths under
hb->lock + raw_spin_lock_irq: Inspected attach_to_pi_state(), attach_to_pi_owner(), __attach_to_pi_owner(), pi_state_update_owner(), wake_futex_pi(), __fixup_pi_state_owner(), fixup_pi_owner(), futex_lock_pi(), __futex_unlock_pi() (kernel/futex/pi.c), futex_requeue() (kernel/futex/requeue.c), futex_wake() / futex_wait_multiple_setup() (kernel/futex/waitwake.c), futex_parse_waitv() / do_futex() (kernel/futex/syscalls.c), io_uring/futex.c, rt_mutex_start_proxy_lock() / __rt_mutex_start_proxy_lock() / rt_mutex_proxy_unlock() (kernel/locking/rtmutex_api.c), task_blocks_on_rt_mutex() / rt_mutex_adjust_prio_chain() (kernel/locking/rtmutex.c), and arch/arm/include/asm/futex.h. Checked futex_q::wake callbacks (futex_wake_mark, io_futex_wake_fn, io_futex_wakev_fn). None of these paths contain an unconditional self-deadlock on hb->lock or an unbounded IRQ-disabled loop while holding hb->lock.
What Remains Inconclusive
Without CPU#0's stack trace (lost because CPU#0 had IRQs disabled and could not service IPI_CPU_BACKTRACE), it cannot be definitively determined from this report alone what wedged CPU#0 with IRQs disabled after it acquired &hb->lockβwhether it was interrupted by a misbehaving hardirq while holding hb->lock, hit a race/corruption outside hb->lock, or encountered an indirect consequence of the atomic-context mutex_lock(&mm->futex.phash.lock) violations in __futex_unlock_pi() / requeue_pi_wake_futex() / exit_pi_state_list().