From 32bb5592d0d95252b242073b37dce34e80624fe5 Mon Sep 17 00:00:00 2001 From: Dustin Ewan Date: Fri, 23 Oct 2026 19:54:26 -0500 Subject: [PATCH] engine: a stall watch across the step loop -- a frozen step reports the blocked thread, its syscall and its stack instead of hanging silently --- core/engine.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/engine.cpp b/core/engine.cpp index 317f6ede..2bfaa966 100644 --- a/core/engine.cpp +++ b/core/engine.cpp @@ -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();