Skip to content

[Bug]: Race UT restore case intermittently hits deadline under CI load #28763

Closed as not planned

Description

@XuPeng-SH

Is there an existing issue for the same bug?

  • I have checked existing open and closed issues.

Related, but not confirmed duplicates:

Branch Name

codex/issue-28665-group-concat-warning (PR #28747)

Commit ID

a1f1b528438dd59cd5b95a5a3e59820288a79094

Other Environment Information

  • Runner: Ubuntu/x86 race UT runner amd64-mo-shanghai-8c16g-92mgx-runner-z2m7k.
  • UT inputs: ut_parallel=6, ut_sharded=false.
  • The heartbeat diagnostics showed 17 processes and peak RSS around 17.18 GB while embedded-cluster race tests were active. Treat this as evidence of possible resource pressure, not proof of OOM or root cause.

Actual Behavior

The unchanged test had different outcomes on the same PR head:

  1. Run 34670518213, attempt 1, UT job 103490916610: TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges failed after 128.60 seconds with context deadline exceeded (test caller line 142, shared helper line 423). Logs around the test also contain TN/CN command-poll deadline errors, logservice heartbeat/propose timeouts, connection resets, and slow commits.
  2. Same-head rerun, attempt 2, UT job 103501227797: that test passed, taking 304.84 seconds. The overall UT job still failed later in the separate TestBackupProtectionCheckpointProtection case after 32.61 seconds; its forced checkpoint returned context deadline exceeded after roughly 30 seconds.
  3. As another control, the same restore test passed in run 34670510073 in 85.81 seconds (a different PR head).

The fail-then-pass result on the unchanged head establishes intermittent behavior for the restore test. The separate checkpoint timeout is recorded as a related observation only; it does not establish that the checkpoint test itself is flaky.

Expected Behavior

The CI race suite should complete this restore regression reliably. When it does not, the failure should identify whether the cause is a product lock/liveness defect, a resource-starved cluster, or a test budget/setup assumption. Do not mask it with retries or a blanket timeout increase.

Steps to Reproduce

  1. Run the Ubuntu/x86 race UT workflow with the PR head a1f1b528438dd59cd5b95a5a3e59820288a79094 and the same runner topology.
  2. Compare the exact test outcome, duration, service logs, admission waits, and resource diagnostics across repeated runs without changing the commit.
  3. Correlate any timeout with the restore SQL/helper phase and inspect whether a lock cycle or resource starvation is present.

Additional information

The run’s same-head retry did not pass overall. This issue is scoped to the observed intermittent restore-test timeout and its CI execution conditions; it does not claim that the separate backup checkpoint timeout has the same cause. If both signatures reduce to the open lock-order defect in #28317, consolidate the tracking accordingly.

Activity

  1. self-assigned this
    on Sep 12, 2026
  2. XuPeng-SH commented on Sep 13, 2026

    @XuPeng-SH
    ContributorAuthor

    Related CI evidence from 2026-09-13; this does not establish that every case below has the same root cause as the restore timeout tracked here:

    • PR fix(lockservice): preserve GET_LOCK session liveness #28820, head ae6bbd3, UT job 103709157399: four unrelated DML embedded-cluster tests failed before their business assertions. TestBitSumAvgExactRemote returned context deadline exceeded from debugUpdateCNWorkState; TestDeepExistentialMultiCN, TestForcedMultiCNDeleteAndInsertIgnore, and TestPreparedAPRuntimeCacheWorkspaceTransition timed out waiting for two CNs to be discoverable/ready. This PR changes lockservice and scalar-function code, not these tests or the embedded-cluster harness.
    • PR fix: allow modify of generated column sources #28770, head 37e054d, UT job 103669091653: the same unchanged TestBitSumAvgExactRemote failed with timeout; diagnostics recorded 2.31 minutes waiting for embedded-cluster admission and 15.08 minutes total admission wait.
    • PR [Bug]: preserve DECIMAL division range and rounding #28814, UT job 103693190138: unrelated ArrowLoad, account/task lifecycle, and partition tests emitted repeated HAKeeper/LogService deadline and cluster-address refresh errors.

    The PR diffs do not overlap these tests or the UT harness. This appears related to the existing CI-load/readiness investigation, but please reconcile it with #28538 and the historical #27963/#26522 evidence instead of assuming a single cause. No new issue was opened.

  3. XuPeng-SH commented on Sep 15, 2026

    @XuPeng-SH
    ContributorAuthor

    Additional base-only CI occurrence from PR #28884:

    The complete UT diagnostic artifact contains two independent failures:

    1. pkg/tests/issues/isolated/TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges failed after 154.86s with context deadline exceeded at issue_26640_cluster_restore_test.go:423. This matches the CI-load restore-timeout class already tracked by this issue; [Bug]: Cross-account account snapshot restore leaves table grants bound to source object IDs #26640 itself is closed and its product regression is not being reopened from this one runner failure.
    2. pkg/logservice.TestAddHeartbeat failed after 0.68s because store.addLogStoreHeartbeat returned Dragonboat timeout at store_test.go:705. This is a separate HAKeeper/logservice bootstrap-under-load signature related to the historical [Bug]: logservice HAKeeper bootstrap tests race on ID allocation and initial cluster state #28550 class; one occurrence is insufficient to infer a new production fix.

    The failure is therefore base-owned, not a regression in #28884. No duplicate issue is opened because this issue is already open and assigned to XuPeng-SH. Keep the systematic CI-load/readiness follow-up queued; do not mask it with retries, sleeps, or blanket timeout increases.

  4. XuPeng-SH commented on Sep 15, 2026

    @XuPeng-SH
    ContributorAuthor

    Correction to the previous triage note: the independent pkg/logservice.TestAddHeartbeat Dragonboat-timeout signature is now tracked separately in #28923, assigned to XuPeng-SH. This issue remains scoped to the restore-timeout class; the two base failures should not be treated as one root cause.

  5. XuPeng-SH commented on Sep 15, 2026

    @XuPeng-SH
    ContributorAuthor

    2026-09-15 CI recurrence

    #28925 reproduced the same base-fixture class: TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges failed with invalid state: another complete test cluster is already active in this process, while concurrent HAKeeper/Dragonboat waits timed out and a SQL connection reset. The run also hit the unsharded 70-minute UT deadline.

    This is not a failure in the product PR under test. It reinforces the existing lifecycle/admission diagnosis in this issue. Restoring the four-shard CI path is being handled separately through #27822; any residual failure inside one shard should be diagnosed as an independent fixture issue rather than hidden with retries or a larger timeout.

  6. XuPeng-SH commented on Sep 24, 2026

    @XuPeng-SH
    ContributorAuthor

    Rechecked current main (a61e7710e2) for this restore-race UT failure. The embedded-package runner already executes with -p 1 (#29113), prebuilt reuse is present (#29167), and the relevant fixture cleanup changes (#29048/#29105) predate the later reports. The observed intermittent restore timeout and subsequent process-local another complete test cluster is already active error do not yet establish one initiating cause, nor a shared root with #29124; #28317 lock inversion needs a matching wait graph before attribution. I am not adding retries or blanket timeout increases. Next discriminating evidence: on the current constrained CI runner, capture the first-failure timeline with admission owner/PID/generation, startup/SQL/cleanup phases, service readiness, cgroup pressure, and transaction wait graph; compare the normal serial package sequence against a fresh isolated process. A corrective PR should follow a demonstrated mechanism.

  7. XuPeng-SH commented on Sep 24, 2026

    @XuPeng-SH
    ContributorAuthor

    Closing this historical CI-load report as not currently actionable, not as a verified product fix. Its last recorded restore-timeout/active-cluster recurrences predate the embedded UT package serialization in #29113 (merged 2026-09-20 07:29 UTC) and prebuilt-binary reuse in #29167 (merged 2026-09-20 13:29 UTC). We have no matching first-failure trace or confirmed recurrence under the current runner configuration, so a new corrective PR would be speculative. Reopen if the same restore signature occurs on a current head with package -p 1; capture admission owner/PID/generation, restore SQL phase, service readiness, resource pressure, and transaction wait graph. #28317 remains separately open for its catalog lock-order defect and should not be treated as this issue without a matching wait graph.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug/utkind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions