Skip to content

[CI] Isolate shared race UT clusters and attribute resource stalls #29039

Closed

Description

@XuPeng-SH

Summary

The Ubuntu/x86 race UT suite has repeated embedded-cluster control-plane
timeouts and cascading failures across otherwise unrelated packages. The
current diagnostics expose container-level memory peaks, but do not identify
which process, cache, or wait path owns the cost. At least one shared-test
cleanup path can leave a CN in Draining after a timed-out state transition,
which then makes later tests fail their readiness checks.

This issue tracks the common test-infrastructure and fixture-lifecycle problem;
the individual test signatures remain linked below.

Evidence

PR #29031

  • UT run 35176331513
  • Failed job 105058855532
  • pkg/tests/issues/TestIssue26640CrossAccountRestoreRebindsPrivileges failed
    with Error 1105 ... connection reset by peer while executing an account
    restore.
  • Before the failure, LogService emitted proposal/checker-state timeouts and
    WAL appends of several seconds.

PR #29032

  • UT run 35177731314

  • Failed job 105063157387

  • The job failed in pkg/embed, pkg/tests/arrowload, and pkg/tests/dml
    with several context deadline exceeded errors.

  • TestPreparedAPRuntimeCacheWorkspaceTransition reported:

    waiting for both base-cluster CNs: context deadline exceeded
    admission-ready CNs=[0-cn-13002=Draining 1-cn-13002=Working]
    
  • TestGroupConcatNamedTimeZoneRemoteOwner immediately before it failed while
    changing a CN to Draining. Its cleanup defer that restores Working is
    registered only after that state-change call returns successfully. If the
    request times out after changing server state, the test exits without
    registering the restoration, leaving shared state for the next test.

  • The same run also showed LogService and TN/CN heartbeat timeouts. This issue
    does not yet claim that every timeout has the same root cause.

Problem

The current race UT runner combines shared embedded clusters, multiple service
processes, race instrumentation, package-level parallelism, and a single
container resource budget. A test-level deadline or partially completed control
plane operation can therefore affect later packages. Container peak memory and
the historical memory.max event count are insufficient to distinguish:

  • compiler/linker memory from test-process memory;
  • anonymous memory from file cache and kernel memory;
  • genuine retained state from short-lived race/build peaks;
  • CPU, I/O, or control-plane stalls from a product failure.

Expected behavior

The race UT suite should isolate test-owned cluster state, restore or discard a
fixture after an uncertain control-plane transition, and report the resource
owner and wait condition when a test exceeds its deadline. A failure in one
embedded package should not silently poison the readiness state of the next
package.

Proposed work

  1. Audit every shared-cluster state transition and register cleanup before the
    transition, with a safe invalidation path when the final state is unknown.
  2. Add post-test assertions for CN/TN work state, active sessions, service
    health, and cluster ownership before a shared fixture is reused.
  3. Record low-overhead per-process RSS, cgroup memory.stat, memory.events,
    CPU pressure/throttling, and I/O pressure in the existing UT heartbeat.
  4. Correlate the resource samples with admission waits, LogService/WAL
    latency, and active test names.
  5. Re-evaluate package and cluster scheduling after attribution data is
    available. Preserve test coverage and avoid masking failures with retries,
    sleeps, skipped cases, or blanket timeout increases.
  6. Add exact-head repeated controls for the affected tests and distinguish
    test-fixture contamination, runner resource contention, and product
    liveness defects.

Related issues

Scope

This issue is about test infrastructure, shared embedded-cluster lifecycle, and
resource attribution. It does not infer a product memory leak from the current
container peak alone, and it does not attribute the failures in #29031 or
#29032 to their PR changes without same-head controls.

Activity

  1. self-assigned this
    on Sep 17, 2026
  2. added
    kind/bug
    severity/s0
    on Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s0

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions