interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / evidence / amd-speed-20261114 / raw / amd-launch-gap / HANG-20261114.md

40 lines · 4160 bytes Raw Blame History Rendered
1# FourBit's launcher hangs (card run 2026-11-14 01:46–01:59Z, launch-x86 08a50491, `run` mode)
2
3## What the logs show
4Evidence: `four-bit/evidence/card-20261114/` (`hang-2.txt`, `q4card.tar.gz` → `out/out_proj-layers-0.q4.r1.0.stdout`).
5- Hang 1 (q4gemv_d8, out_proj, repeat 1):
6 - The stdout ends with `OMEGA diag wait_timeout_ns 0`, `OMEGA step dispatch ok … phase=after detail=1`, `OMEGA step signal_wait ok … phase=before detail=1` and `OMEGA alarm slow_dispatch_ns=10000000086`.
7 - There is no `signal_wait … phase=after`. The completion signal never reached 0 within the 7 minutes before SIGTERM.
8- Hang 2 (fp8gemv_b128f, gate_proj, repeat 1):
9 - The process was at 100 % CPU in state R, with `/dev/kfd`, the render node and the code object open, and 1.3 GB of VA.
10 - The same shape and kernel passed on three later attempts.
11 - The fp8gemv_b128f kernel also completes in every plan run: 47 model runs × 285 steps × 64 layers' dispatches.
12
13## Cause: not established from these logs (said plainly)
14The launcher's wait is `while signal != 0: deadline(); cpurelax` (`dispatch.om` dispatch). With no caller deadline (`wait_timeout_ns 0`) it spins forever, by contract: a positive deadline exits 75 and prints diagnostics. That accounts for the **100 % CPU and the hang**. It does not account for why the completion never arrived. The logs cannot separate two cases:
15- (a) the packet processor never consumed the packet, i.e. a lost doorbell or a queue not scheduled on a shared VF;
16- (b) the packet was consumed and the kernel did not finish, or its completion write was lost.
17
18The diagnostics that would separate them are printed only at a caller deadline, and FourBit passed none.
19
20## Fix (branch amd-launch-gap d957526e, Spark gate 308 PASS, launch-x86 a6aee5ef)
21- At the 10 s slow-wait alarm the launcher now prints `OMEGA diag alarm_read_pointer`, `alarm_write_pointer` and `alarm_signal_value`, once per alarmed wait, in both the `run` and the plan paths. The next occurrence will show case (a) or (b).
22- Gate: the plan slow-step case asserts three sets of these rows.
23- For callers: pass a positive deadline (the last CLI argument, or the manifest timeout) so a stuck wait exits 75 with full diagnostics instead of spinning.
24
25## Effect on timed runs
26- A stuck wait does not distort the numbers. `OMEGA_STEP` is printed only after the completion signal, so a hung step never yields a timing; the run stalls and is visibly incomplete (no `OMEGA_PLAN complete`, 285-step check fails).
27- No plan run (runs 1–2, 47 processes) has hung.
28
29## CORRECTION (2026-11-14, after AmdReport checked the raw logs; the text above is kept as first written)
30
31Three statements above are wrong:
321. **Hang 2 was not repeat 1.** It was the third launch at 50 repeats (`out/gate_proj-layers-0.f8.r50.2.stdout`). Its stdout ends with `OMEGA step dispatch ok … phase=before detail=50`, `OMEGA diag wait_timeout_ns 0` and the alarm. There is **no `dispatch … phase=after`**, unlike hang 1.
332. **"Passed on three later attempts" is wrong.** Five launches of that kernel and shape completed before the hang, and none ran after it.
343. **Plan processes: 35, not 47** (20 in run 1, 15 in run 2).
35
36**Where hang 2 was stuck.** Hang 2 never left the dispatch loop (`dispatch.om`, `fn dispatch`): `for i < repeats: while i - read_dispatch_id >= 16: deadline; cpurelax; packet i`. The generic ring has 16 slots and 50 packets need wrap-around. So it was in the **ring-space wait**: the packet processor's read dispatch id (queue byte 128) stopped advancing, and with no caller deadline that wait spins forever.
37
38Hang 1 (repeat 1) was in the completion wait. Both hangs therefore show one symptom from two waits: **the packet processor stopped consuming or completing packets on that queue.** In hang 2 it had consumed at most i−16 packets. Whether it stopped part-way or never started is not recorded in the logs.
39
40The new alarm rows (`alarm_read_pointer`, `alarm_write_pointer`, `alarm_signal_value`) fire in this ring-space wait as well, because the loop calls `deadline` → `slowdiag`. The next occurrence will record exactly how far the packet processor got.