Skip to content

[Bug]: Subscription snapshot metadata UT exhausts shared 90-second scenario deadline #32424

Closed

Description

@ck89119

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Searched open/closed issues for TestViewDescriptionSubscription, snapshot_metadata_namespace, and subscription/90/deadline combinations. #30322 is a different account-cleanup deadline, #29033 is a different upgrade-fence/control-plane failure, and #32259 is the completed S5 correctness follow-up; none is a dedicated report of this exact cumulative-deadline failure.

Branch Name

issue-32407-main (PR #32415, targeting main)

Commit ID

d8b3acf513ca39a5d3a93dc884d06ef82d5e0ba2

Other Environment Information

Actual Behavior

TestViewDescriptionSubscription uses one 90-second context across account/publication setup, historical authorization/source tests, cached alias tests, and the final cross-account snapshot metadata scenarios.

The actual operation timeline (not the later failed-report print timestamps):

  • Root starts at 09:15:11 UTC.
  • Cross-account snapshot fixture and assertions execute near the end of the shared deadline.
  • cross-account_snapshot_metadata_namespace/system_target passes (3.86s).
  • tenant_own_same-name_snapshot fails at snapshot_metadata_namespace_test.go:78 / caller line 87 with context deadline exceeded around 09:16:41 UTC, matching exhaustion of the root's 90s context. The failing subtest itself runs only 1.18s.
  • The following negative authorization query at line 100 immediately receives the same expired context, so its expected snapshot-related error assertion also fails. This does not demonstrate an authorization bypass.
  • Cleanup has independent contexts; the reported root elapsed 144.44s includes cleanup/quarantine and is not the query timeout.

The visible SQL is a prepared information_schema.columns {snapshot='snapshot_metadata_namespace_history'} count/width/caller query. This is not a wrong 8/37-width assertion; execution is cancelled before obtaining the result.

Expected Behavior

Each independent scenario should retain a meaningful bounded execution contract and continue asserting tenant-owned snapshot namespace, historical widths, caller identity, physical-index hiding, prepared reuse, and rejection of sys-owned private snapshots. Investigate elapsed-time attribution and shared-state interactions before changing product logic or budgets. Do not hide failures by retries, skips, weaker assertions, or an arbitrary larger timeout.

Steps to Reproduce

Run the full Ubuntu command above. Focused diagnostic mode:

GOTOOLCHAIN=go1.27.1 .agents/skills/mo-dev/scripts/mo-cgo-test \
  -p=2 -parallel=2 -short -tags matrixone_test -race -v -count=1 -timeout=8m \
  -run '^TestViewDescriptionSubscription$' ./pkg/tests/upgrade

Run the root, not only the final subtest, to retain the cumulative-budget condition. Focused local behavior does not establish Linux full-lane stability.

Additional information

Discovered while investigating PR #32415. Attribution remains bounded: this is a cumulative-deadline/test-budget candidate, not a claim of a proven pre-existing failure or pure infrastructure cause. The PR changes historical clone ownership and can reach historical reads, so a clean-main control is required rather than dismissing the failure based only on its name. The report's metadata namespace code and shared root deadline are unchanged by the PR. No product authorization or snapshot assertion is weakened, and no unrelated timeout edit is included in PR #32415.

Focused controls, Darwin/arm64 Go 1.27.1 with the short/race/tags mode above:

  • Merged PR candidate e628e6c75cf2524be5dcbee2d86deff30f90dbc3: the complete root passes, including both cross-account namespace cells and the negative authorization query (94.16s root / 99.186s package). The root includes 46.29s shared-cluster setup/admission; the 90s SQL execution context is created only after that setup. This is not a timeout overrun.
  • Clean official main 6a2b29954749d5a47820ed429cfa8a6c4793682f, isolated worktree: same command/mode passes (62.87s root / 67.950s package; cluster setup 7.12s).
  • Both controls complete the SQL body within the unchanged 90s budget. Neither reproduces the Linux full-lane failure, so neither establishes that it is pre-existing or caused by the PR. The slow body has a reachable historical-read intersection with the PR, but no functional mismatch or focused regression was observed.
  • An initial local candidate invocation hit an occupied TCP port before SQL readiness; it is excluded from product evidence. The successful invocation used a ready owned fixture; no unrelated process was terminated or product workaround added.

The failed lane's 90s context is demonstrably cumulative; further investigation should split per-scenario elapsed time from admission/setup and inspect actual slow reads before deciding on budget/fixture changes. One failed-job rerun is requested after recording these controls.

Activity

  1. added
    kind/bug
    on Nov 9, 2026
  2. iamlinjunhong commented on Nov 10, 2026

    @iamlinjunhong
    Contributor

    Recurrence on PR #32306, exact head f122c2232c8920cfd8b5060e83ca3ea6e4e4b351 (2026-11-09 Linux/x86 CI).

    Full failed-job logs were downloaded with gh run view 42596667603 --log-failed. The only failed test root is TestViewDescriptionSubscription. It begins at 10:40:42 UTC; the shared 90-second context expires around 10:42:12 UTC in cross-account_snapshot_metadata_namespace/system_target at snapshot_metadata_namespace_test.go:90, caller line 94. The immediately following tenant_own_same-name_snapshot fails at line 61 with the same context deadline exceeded; the negative assertion at line 100 then receives that expired-context error instead of a snapshot error. Root elapsed 142.94s includes later cleanup. No wrong width/value result, authorization bypass, compile failure, panic or race report was found.

    Comparison and attribution for this PR:

    1. This open issue's maintainer analysis covers this exact case and cumulative-deadline class. Its independent Linux/x86 occurrence is PR fix(compile): isolate historical snapshot transactions per scan #32415, head d8b3acf513ca39a5d3a93dc884d06ef82d5e0ba2, run https://github.com/matrixorigin/matrixone/actions/runs/42584847827, failed job https://github.com/matrixorigin/matrixone/actions/runs/42584847827/job/129052235568. The job's failure and Linux runner were rechecked; that run's later attempt 2 succeeded.
    2. PR Fix Parquet LOAD with statistics #32306's complete diff adds the Parquet Thrift backport/module, writer compatibility options/tests and Docker module copies. It does not change snapshot namespace resolution, historical metadata queries, the failing case or the CI/UT harness. The failing scenario executes catalog/snapshot SQL, not Parquet import/export. The only frontend production hunk configures the Parquet export writer; the dependency's only production change is field skipping during Thrift decoding.
    3. pkg/tests/upgrade/snapshot_metadata_namespace_test.go, pkg/tests/upgrade/view_description_test.go and optools/run_ut.sh are byte-identical at PR base 6a2b29954749d5a47820ed429cfa8a6c4793682f, exact PR head, and current official main 2f6fcc772175d0c0e80ad97aac6d44360c513347 (checked with git show and SHA256).
    4. On the exact PR head, freshly executed GOWORK=off go test -mod=readonly -v -count=1 -timeout=120s ./pkg/testutil/parquettest and the same flags for ./encoding/thrift in the nested module passed, including writer boundaries and boolean fields/collections/truncation. Exact-head shared build, Linux SCA, UT coverage, and both active BVT lanes also passed and are reused as consumer evidence from the same run.

    This uses the known-open-defect comparison evidence above; no local Linux clean-main reproduction or three-round flaky protocol is claimed. No unrelated product code, timeout, assertion or harness change is included in PR #32306. After this record, one failed-jobs rerun of run 42596667603 will be requested; a repeat of the same signature needs further investigation rather than automatic repeated reruns.

  3. gouhongshen commented on Nov 11, 2026

    @gouhongshen
    Contributor

    Recurrence on PR #32503, exact head 752e1b8d2521f3d5226361b79250271f7b13231f (2026-11-11 Linux/x86 CI).

    The preserved UT summary identifies pkg/tests/upgrade.TestViewDescriptionSubscription as the failed root, ending at 05:09:35 UTC after 2.42m. Checkpoint records show it started at 05:07:09 UTC and was still active at 05:08:46 UTC; the embedded-cluster stage then finished with status 1. This scenario retains the shared 90-second context described above. The uploaded JSON report was head/tail truncated around this group's records, so the exact failing subtest/assertion text is unavailable and is not inferred here.

    Attribution for PR #32503: its complete diff touches only pkg/sql/plan/apply_indices.go, its test, and the two composite_index_range optimizer BVT files. Both pkg/sql/plan race shards passed. view_description_test.go, snapshot_metadata_namespace_test.go, and optools/run_ut.sh are byte-identical at base 553e16f52b02d59e9ecc5e3c8862f2603e661f48 and the PR head. This is a recurrence in the exact test tracked here on independent PRs. No unrelated product, timeout, assertion, or harness change is included in this PR.

  4. iamlinjunhong commented on Nov 11, 2026

    @iamlinjunhong
    Contributor

    Recurrence of the shared scenario deadline tracked here, on PR #32523.

    Source: PR #32523, exact head c549a60cdb18d5c5ba54e2007e0401f8d749717a (target main).

    Full failed-step logs were read using gh run view 43003052359 --log-failed and the complete UT job log. No compile/type/static/security-gate failure or race-detector report explains these test failures. Runner pressure is visible, but no OOM/eviction is established and this is not classified as proven infrastructure failure.

    TestViewDescriptionSubscription fails in cached_historical_alias_ignores_denied_current_replacement with context deadline exceeded / driver: bad connection; the immediately following cross-account_snapshot_metadata_namespace fails at snapshot_metadata_namespace_test.go:33 while creating its database using the already-expired context. The root lasts 129.24s including cleanup. The SQL callback still creates one shared 90s context at view_description_test.go:701. No wrong metadata value or authorization bypass is reported.

    Known-open-defect comparison:

    1. This issue remains open and covers the exact root and cumulative-deadline class. Independent Linux/x86 run https://github.com/matrixorigin/matrixone/actions/runs/42596667603 (PR Fix Parquet LOAD with statistics #32306, head f122c2232c8920cfd8b5060e83ca3ea6e4e4b351, failed job https://github.com/matrixorigin/matrixone/actions/runs/42596667603/job/129090949301) and maintainer analysis [Bug]: Subscription snapshot metadata UT exhausts shared 90-second scenario deadline #32424 (comment) cover the same mechanism. The independent failed job and Linux runner labels were rechecked this round.
    2. PR Fix Iceberg append memory pressure handling #32523's full 22-file diff changes only Iceberg writer/budget/error paths and Iceberg tests/documentation. These scenarios execute native catalog/snapshot SQL; no Iceberg writer or budget is used. Snapshot metadata resolution, the test, shared fixture, and CI harness are untouched.
    3. view_description_test.go, snapshot_metadata_namespace_test.go, and optools/run_ut.sh are byte-identical at PR base d9190ff6d01d15d60acdfcdc9acd96f807a7ab6a, exact head, and current official main 90e547c64521ff0d887678709fc4e1f22e757105.
    4. Exact-head shared build, SCA, UT coverage, changed-block coverage and both active BVT lanes passed in run 43003052359; these remain valid evidence for the Iceberg change closure. The earlier six owning-package tests and lint passed at this exact head.

    A local Darwin/arm64 short/race/tags attempt stalled before the SQL callback in embedded-cluster startup (cluster.doStartLocked waiting for service starts). Owned-process SIGQUIT stacks were captured and the process exited; that invocation is excluded and is not claimed as a passing subscription control. Attribution here uses the narrow known-open-defect path above, not a claimed Linux reproduction or three-round subscription protocol. No unrelated code, timeout or assertion changes are made. After all failure groups from this run are recorded, request one failed-jobs rerun; repeated failure needs fresh investigation.

  5. gouhongshen commented on Nov 11, 2026

    @gouhongshen
    Contributor

    Reproduction record from an unrelated PR adds a same-head full-lane control to this cumulative-deadline report: PR #32573.

    Run / job

    Observed

    • TestViewDescriptionSubscription root started 18:50:37Z and exhausted the shared 90-second scenario context at ~18:52:07Z: cached_historical_alias_ignores_denied_current_replacement failed with context deadline exceeded at subscription_snapshot_cache_test.go:79 (6.78s), and cross-account_snapshot_metadata_namespace failed instantly (0.00s) at snapshot_metadata_namespace_test.go:31 on the already-expired context. As in this issue's report, assertions were cancelled before evaluation; no wrong results.
    • The suite prelude ran ~2x slower than the green control (subtest 2 began ~79s into the 90s root vs ~39s when passing) on a saturated runner: heartbeat shows cgroup memory at its 16 GiB ceiling (peak=17,179,824,128 vs max=17,179,869,184), cumulative CPU throttling (~820s), a second cluster-based package running in parallel (pkg/tests/sqlintegration/multicn TestViewDescriptionTwoCN, 2.3 GiB RSS), embedded logservice raft propose/heartbeat timeout errors, 3.2s WAL append slow logs, and dragonboat LocalTick batching (34-65 ticks/batch).
    • Earlier in the same job, TestV407LoginRepairsTenantCreatedAfterUpgradeSnapshot failed because its 30-second drop account statistics_late_upgrade_28999 cleanup hit context deadline exceeded (upgrade_v4_0_8_statistics_test.go:234), which sealed the shared-cluster fixture (MO_UT_SETUP ... phase=failed-test-seal) and forced a fixture rebuild before this suite ran, adding to the loaded condition.

    Same-head control

    Why unrelated to that PR

    PR #32573 only changes view GRANT/REVOKE privilege verification in pkg/frontend/authenticate.go; it touches neither the subscription/snapshot scenario code nor any scenario deadline, and both failures are cancellations on fixed in-test contexts under load. This run therefore supports the cumulative-deadline/test-budget attribution already recorded here.

  6. added a commit that references this issue on Nov 12, 2026
    4760bca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugneeds-triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions