Skip to content

[Bug]: Test_CheckpointChaos2 snapshots files before GCKP rollback completes #29885

Closed

Description

@iamlinjunhong

Failure

Test_CheckpointChaos2 compares the file-service snapshot before an admitted runner-owned global checkpoint has finished rolling back. Under slower race-test execution, its two-second caller deadline returns first and the assertion observes temporary checkpoint files.

Observed while validating PR #29835 at exact head 27b07330f3d7092aa8be7e84d0ba1e20cdae4182:

Normalized signature:

Test_CheckpointChaos2
pkg/vm/engine/tae/db/test/db_test.go:9371
failed GCKP publication must roll back its data and table-ID objects
file snapshot expected 12 entries, actual 14 entries
Force-GCKP-End: context deadline exceeded

The complete failed-job logs show this sequence (UTC):

07:15:06.717646  GCKP-Execute-Start
07:15:08.716287  caller returns context deadline exceeded
                snapshot assertion observes two additional files
07:15:09.944972  GCKP-Execute-Error phase=save
                error=Test_CheckpointChaos2-checkpoint-chaos
                cost=3.227401854s rollback-object-count=3
07:15:09.945150  GCKP-Execute-End

The snapshot was taken before rollback completed. This is not evidence of a permanent checkpoint-file leak.

Attribution evidence: non-PR flaky candidate

All four comparison conditions were checked:

  1. Read both complete failed-job logs. The only failed test is Test_CheckpointChaos2; there is no compilation/type/static gate failure, race-detector report or panic. CI Required reports matrixone-ci: failure.
  2. On the exact PR head, the precise failing test passed three consecutive uncached executions with the same race/tags/CGO mode. Test durations: 1.33s, 1.32s, 1.33s.
  3. Reviewed the complete 19-file PR and the invoked dependency path. The PR changes IVF membership/schema/CDC and their regression cases. This TAE test creates databases and forces checkpoints directly; it does not execute the modified reader, vector-index, ISCP or SQL paths. The added membership helper in shared types is unused by this path. No checkpoint mechanism, failing test or CI harness is changed.
  4. A clean worktree of current official main a6eba2d7b56a5bc72c6d9842361b40f24e15c1ff passed the identical command three consecutive times (1.33s each). Relevant TAE checkpoint, file-service, object/fault and test-helper sources are identical between the comparator revisions.

Command on each revision, executed three times sequentially:

.agents/skills/mo-dev/scripts/mo-cgo-test   -overlay=<temporary-path-only-overlay.json>   -race -tags matrixone_test -short -vet=off -v -json   -count=1 -p 2 -timeout=40m -run '^Test_CheckpointChaos2$'   ./pkg/vm/engine/tae/db/test

Local environment: Go 1.27.1, CGO enabled, Darwin/arm64. This differs from CI Linux/amd64; these are passing comparisons, not a claimed local reproduction of the CI failure. The identical overlay on both revisions only changes the test helper's default /tmp root to os.TempDir() so each run uses an isolated temporary directory. It does not alter synchronization, fault injection, deadlines or assertions. Native inputs match and the baseline wrapper verifies read-only reuse of the same platform-matched native artifacts. All six executions and baseline cleanup finished with status 0.

Additional exact-head evidence: SCA, UT coverage and both selected Linux BVT lanes passed. The PR's focused/owning reader and ISCP tests, plus two normal SQL comparison rounds (246/246 each), remain valid at this unchanged head.

Expected behavior and reproduction

Run the Ubuntu/x86 full race UT workflow, or the precise test above under a slow file-service/race workload. An admitted GCKP can outlive the caller's two-second deadline. The test should wait for executor-owned completion while the injected save failure is still installed, then compare the exact file snapshot.

The current test already calls WaitRunningCKPDoneForTest later, after the premature assertion and fault removal. The completion barrier needs to precede the snapshot assertion with a fresh bounded context; simply enlarging the caller timeout would leave the ordering defect.

Searched open and recently closed issues for the exact test name and normalized GCKP rollback assertion. No existing issue documents this snapshot-before-completion category; historical closed test-name matches are not used as comparison evidence.

No unrelated source change is included in PR #29835. After recording this issue, failed jobs of run 38116560726 will be rerun once; the rerun result remains pending.

Activity

  1. self-assigned this
    on Oct 11, 2026
  2. added a commit that references this issue on Oct 11, 2026
    e6606fc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions