Skip to content

[Bug]: TestGlobalCheckpoint2 intermittently observes a pending LSN after checkpoint completion #25931

Closed

Description

@ck89119

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main / PR #25089 branch issue-24951-main

Commit ID

ae752dc

Other Environment Information

- Hardware parameters: GitHub-hosted runner
- OS type: Ubuntu / x86
- Others: Matrixone CI unit-test job

Actual Behavior

The Ubuntu/x86 unit-test job failed in TestGlobalCheckpoint2.

After ForceCheckpoint and ForceGlobalCheckpoint, the test waits for
AllCheckpointsFinished() and then immediately asserts that the scheduler
pending LSN count is zero. In this run, both assertions observed one pending
LSN:

pkg/vm/engine/tae/db/test/db_test.go:8248
expected: 0x0
actual  : 0x1

pkg/vm/engine/tae/db/test/db_test.go:8254
expected: 0x0
actual  : 0x1
Test: TestGlobalCheckpoint2

CI run:
https://github.com/matrixorigin/matrixone/actions/runs/29799310841/job/88537842971

This is unrelated to PR #25089: that PR does not modify
pkg/vm/engine/tae, checkpoint, WAL, or scheduler code. The same test has
also failed historically in #20008 and #21721.

Expected Behavior

TestGlobalCheckpoint2 should deterministically wait until all
checkpoint-related asynchronous work, including pending LSN processing, has
completed before asserting the pending count.

Steps to Reproduce

.agents/skills/mo-dev/scripts/mo-cgo-test -v -count=10 \
  -run '^TestGlobalCheckpoint2$' -timeout=180s \
  ./pkg/vm/engine/tae/db/test

The local stress run passed 10/10 at the same PR head, indicating a
low-probability timing-dependent failure.

Additional information

The test currently waits for AllCheckpointsFinished(), but that condition
did not guarantee Runtime.Scheduler.GetPenddingLSNCnt() == 0 in the failing
CI run. Consider waiting explicitly for the pending LSN count or tightening
the completion contract so the assertion cannot race asynchronous scheduler
cleanup.

Activity

  1. added
    kind/bug
    on Jul 21, 2026
  2. added
    severity/s0
    and removed on Jul 21, 2026
  3. jiangxinmeng1 commented on Jul 22, 2026

    @jiangxinmeng1
    Contributor

    fixed by #25953

  4. matrix-meow commented on Jul 23, 2026

    @matrix-meow
    Contributor

    Recurrence: PR #25899 (fix temporal part 2, main). 11.01s.

  5. Repository owner unassigned on Jul 28, 2026
  6. jiangxinmeng1 commented on Jul 30, 2026

    @jiangxinmeng1
    Contributor

    fixed by #26283

  7. ghost closed this as completedon Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugseverity/s0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions