engine: a stall watch across the step loop -- a frozen step reports the blocked thread, its syscall and its stack instead of hanging silently

This commit is contained in:
Dustin Ewan authored and StillDeadcode committed 2026-10-25 10:31:06 +01:00
1 parent cc0a862afa
commit 32bb5592d0
1 file changed
+4
+4
View File
@@ -413,6 +413,10 @@ int Engine::step_loop() {
/* The next step's forward pass when already issued behind the previous step, before its
* readback (Scheduler::step_next). */
const RadBatch* ahead = nullptr;
/* Names where the step loop waits when nothing has been logged for a while: a freeze reports
* the blocked thread, its syscall and its stack; long quiet generations report sparsely (the
* silence doubles) and the reports read as the ordinary GPU wait. */
rad::StallWatch step_watch("step", 20000);
while (!stopping_.load(std::memory_order_acquire)) {
lora_epoch_.fetch_add(1, std::memory_order_acq_rel);
phase_t_ = std::chrono::steady_clock::now();