Repository navigation
Description
Failure
The race-test CI job for PR #2239 timed out after 10 minutes in internal/app, with TestMicroVMChildRetainsParentSourceAfterRetirement running for 9m26s.
- Failing CI job
- Tested commit:
2b6bed609ee043912f44bb3814eb0e239f64d0c3 - The
cmd/mecatui/uipackage passed in this run. The failing test and its supporting production code are untouched by feat(mecatui): correlate root tool hooks in typed scrollback #2239.
Suspected synchronization race
In internal/app/microvm_harness_context_test.go:374–378, the mock provider observer sends to arrived before incrementing the atomic call counter and deciding whether to wait on resume:
arrived <- req
if calls.Add(1) == 1 {
<-resume
}After receiving that arrival, the test retires the parent and starts a second run. It drains that run before closing resume (:395–415).
A possible interleaving is:
- The first callback sends its arrival, then is descheduled before incrementing the counter.
- The test receives the arrival and starts the second run.
- The second callback increments first, gets counter value 1, and waits on
resume. - The test waits for the second run to finish before closing
resume.
This creates a circular wait. The CI dump is consistent with this: the provider callback is blocked at line 377, while the test is blocked draining the second run at line 404. This interleaving is a diagnosis from the source and stack dump, not a locally reproduced trace.
Local verification
Fifty focused repetitions with race detection passed:
GOWORK=off go test -mod=readonly -race ./internal/app \
-run '^TestMicroVMChildRetainsParentSourceAfterRetirement$' \
-count=50 -timeout=60sThe intermittent behavior appears scheduling-dependent, rather than a normal slow-test timeout.
Suggested fix and acceptance
- Establish which callback owns the pause before signaling arrival, so the second run cannot become the paused first callback.
- Keep the real parent-retirement and retained-source behavior under test; do not weaken it or merely increase the suite timeout.
- Make handshake failures bounded and diagnostic, with cleanup that releases paused callbacks.
- Add a deterministic regression for the problematic handoff and run repeated race tests plus the package integration boundary.
Activity
asivanadi0 commentedon Oct 15, 2026
I’d like to work on this issue. My proposed scope is to establish pause ownership before signaling arrival, add bounded waits and cleanup, and add deterministic regression coverage while preserving the retained-source assertions. I’ll validate with repeated race tests and the package integration tests.
Could you assign this to me?