Versions: TestTwinNewFileRace lost a content once in CI (posix-copy, local serializer) #1131

Open
opened 2026-11-04 21:57:40 +00:00 by Cordy · 0 comments
Owner

CI run 3991 (PR #1130, 2026-11-04, cairn-x86) failed in internal/storage/versions, a package that branch did not touch:

--- FAIL: TestTwinNewFileRace/posix-copy/local (0.00s)
    twin922_test.go:174: lost 1 of 2 contents, e.g. [A6]

The test (#922, R2) has two instances create the same new file at once and expects both contents kept (one current, one as a version). It passed 200 of 200 runs in the sandbox (-count=200 -run TestTwinNewFileRace), so it is rare and timing-dependent, but the assertion is about data loss, not a timeout: with two instances, the local (per-process) serializer and posix copy-mode records, one of two simultaneous creates can apparently lose its content.

To do: reproduce under load (-race, GOMAXPROCS high, -count large, CPU stress), find the window (new-file path: record before content when there is no previous file to record?), fix or, if the local serializer is documented as one-instance only, make the test variant say so and state the residual on #742. Multi-instance hardening, so v1.x unless it reproduces with one instance.

CI run 3991 (PR #1130, 2026-11-04, cairn-x86) failed in `internal/storage/versions`, a package that branch did not touch: ``` --- FAIL: TestTwinNewFileRace/posix-copy/local (0.00s) twin922_test.go:174: lost 1 of 2 contents, e.g. [A6] ``` The test (#922, R2) has two instances create the same new file at once and expects both contents kept (one current, one as a version). It passed 200 of 200 runs in the sandbox (`-count=200 -run TestTwinNewFileRace`), so it is rare and timing-dependent, but the assertion is about data loss, not a timeout: with two instances, the local (per-process) serializer and posix copy-mode records, one of two simultaneous creates can apparently lose its content. To do: reproduce under load (`-race`, `GOMAXPROCS` high, `-count` large, CPU stress), find the window (new-file path: record before content when there is no previous file to record?), fix or, if the local serializer is documented as one-instance only, make the test variant say so and state the residual on #742. Multi-instance hardening, so v1.x unless it reproduces with one instance.
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#1131
No description provided.