Where and what granularity should we instrument the Nim training thread with chunk-start/end logs + heartbeat to distinguish hang vs crash vs slow for corpse stall diagnosis?
#68
Where and what granularity should we instrument the Nim training thread with chunk-start/end logs + heartbeat to distinguish hang vs crash vs slow for corpse stall diagnosis?
## Question
Where and what granularity should we instrument the Nim training thread with chunk-start/end logs + heartbeat to distinguish hang vs crash vs slow for corpse stall diagnosis?
This is a child issue of wayfinder map #67.
Based on code examination, the corpse stall (training counter stalls while game rounds complete) likely occurs due to:
Long-running trainPass (up to 10 min) with saves only checked inside the step loop.
I/O thread blocking on gSaveChan.recv() if save takes long.
Channel backpressure causing dropped transitions.
Proposed instrumentation:
In integration.nim trainPass: log each step that takes >2000ms and log total trainPass time.
In ioThreadEntry: log save operations that take >5000ms.
This will help distinguish hang (consistently long steps/saves) from crash (no logs) from slow but acceptable.
Based on code examination, the corpse stall (training counter stalls while game rounds complete) likely occurs due to:
1. Long-running trainPass (up to 10 min) with saves only checked inside the step loop.
2. I/O thread blocking on gSaveChan.recv() if save takes long.
3. Channel backpressure causing dropped transitions.
Proposed instrumentation:
- In integration.nim trainPass: log each step that takes >2000ms and log total trainPass time.
- In ioThreadEntry: log save operations that take >5000ms.
This will help distinguish hang (consistently long steps/saves) from crash (no logs) from slow but acceptable.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Question
Where and what granularity should we instrument the Nim training thread with chunk-start/end logs + heartbeat to distinguish hang vs crash vs slow for corpse stall diagnosis?
This is a child issue of wayfinder map #67.
Based on code examination, the corpse stall (training counter stalls while game rounds complete) likely occurs due to:
Proposed instrumentation:
This will help distinguish hang (consistently long steps/saves) from crash (no logs) from slow but acceptable.