Archived
Main's stall watchdog samples only the queues' read indices, and the DMA lane trusts the SDMA queue's written-back read pointer for its room check. Both stall wrongly: a drive-paced prefill parks every queue for seconds (one rank spins at the all-reduce while the other reads its layer off the drive -- spurious dumps), and the SDMA engine's written-back read pointer can stop moving while the engine runs on -- a full ring then waits forever, wedging the startup pool fill above ~32 GiB/rank. pread_exact counts the bytes it returns (rad::dio_progress); every O_DIRECT read funnels through it, and read_progress adds that to the queues' read indices: a wait that moves nothing anywhere is a hang however slow the drives are, so the threshold is a flat 5 s and every stall report is genuine. The main DMA lane names its lists the way the xp queue already does -- each list ends by writing its number to a word the engine keeps advancing (fin/ends) -- and dma_read takes the further of that fence and the read pointer, so the room check can no longer mistake a stalled writeback for a stalled engine. dump_dma_lanes reports the finished-list count. Verified on the wedge reproducer: GLM startup with a 36000 MiB pool fill, decode with promotions, and a 13300-word drive-paced prefill -- zero spurious dumps, the ring live throughout. Assisted-by: GLM-5.3-Flash