Skip to content

[Bug]: Embedded-cluster UTs still lose HAKeeper connections under Ubuntu/x86 load #26522

Closed

Description

@gouhongshen

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main

Commit ID

0b8b53d

Other Environment Information

  • Hardware parameters: amd64-mo-shanghai-8c16g GitHub Actions runner
  • OS type: Linux/amd64
  • Others: MatrixOne ALL CI, Ubuntu/x86 UT job 91130900423

Actual Behavior

Four embedded-cluster consumers failed in one current-main-based Ubuntu/x86 UT job after repeated HAKeeper/LogService heartbeat timeouts and TCP connection resets:

  • TestCreateAndDropPitr (pkg/tests/ddl): LogService heartbeat to 127.0.0.1:11020 was reset.
  • TestMultiClusterCanWork (pkg/embed): CN/TN/LogService heartbeats to 127.0.0.1:10740 repeatedly reset; the second cluster timed out in waitAnyShardReadyLocked at cluster_test.go:182.
  • TestIcebergSQLEngineEmbeddedCredentialSecurityAndRedaction (pkg/embed): LogService heartbeats to 127.0.0.1:11140 reset before the assertion at iceberg_sql_harness_test.go:796.
  • TestTableFeatures (pkg/tests/features): HAKeeper allocation on 127.0.0.1:12020 reset while creating the test database, failing at table_features_test.go:47.

The triggering PR #26505 changes only pkg/frontend/data_branch_output.go and its focused tests; the full pkg/frontend package passed in the same job. The failure is therefore outside that PR.

The job ran after #26448 (fb7dc32ee) was merged into the base. That fix stabilized the shared authenticated base cluster, but these failures show that other embedded-cluster consumers remain vulnerable to the same CI-load heartbeat starvation/reset pattern.

Expected Behavior

Embedded clusters used by UT packages should keep HAKeeper/LogService heartbeats alive and start deterministically under the Ubuntu/x86 CI load profile. Tests should not lose their control-plane connection or time out waiting for TN shards.

Steps to Reproduce

  1. Run the MatrixOne Ubuntu/x86 unit-test workflow at 0b8b53dff3869dcd5e3ab52992852c9ea6545026 or a descendant.
  2. Run the normal parallel UT package set on an amd64-mo-shanghai-8c16g runner.
  3. Observe the embedded clusters in pkg/embed, pkg/tests/ddl, and pkg/tests/features for HAKeeper/LogService heartbeat timeouts, connection resets, and waitAnyShardReadyLocked timeouts.

Additional information

Activity

  1. self-assigned this
    on Jul 31, 2026
  2. added
    kind/bug
    on Jul 31, 2026
  3. gouhongshen commented on Jul 31, 2026

    @gouhongshen
    ContributorAuthor

    Another occurrence on PR #26505 head d7a02bfaa1a976c996766a6862a7d236e31826a6 in the Ubuntu/x86 UT job:

    https://github.com/matrixorigin/matrixone/actions/runs/30638598838/job/91182528687

    Three tests failed with the embedded-cluster/HAKeeper signature tracked here:

    • TestCreateAndDropPitr: HAKeeper/LogService heartbeats timed out and the connection to 127.0.0.1:11020 was reset; database creation failed.
    • TestTableFeatures: HAKeeper ID allocation lost 127.0.0.1:12020 with connection reset by peer; database creation failed.
    • Test_UpgradeEntry: repeated HAKeeper proposal/checker-state timeouts and TN heartbeat failures ended in context deadline exceeded / internal error: waitAnyShardReadyLocked at pkg/tests/upgrade/upgrade_v1_2_3_test.go:32.

    Test_UpgradeEntry is a newly observed consumer of the same failure family. The fourth failed test, the independent ISCP TestStaleRead assertion, is documented in #26517. PR #26505 changes only data-branch file-output finalization in pkg/frontend and has no overlap with embedded-cluster, HAKeeper, DDL/features, or upgrade code.

  4. XuPeng-SH commented on Aug 1, 2026

    @XuPeng-SH
    Contributor

    Another two-attempt reproduction confirms that the embedded-cluster/HAKeeper startup failure is still present after the narrower fixes already included in the tested main base.

    Workflow: https://github.com/matrixorigin/matrixone/actions/runs/30639089405
    Tested PR: #26501
    Tested head: 939a675096f0cc9283a28bfd08304d9baecaf462
    Main parent merged into that head: e1a11841ec96c7fba3870dfa67ef86a6fb75533f

    Both Ubuntu/x86 UT attempts failed with the same control-plane signature, but in different embed tests:

    Attempt 2 shows the failure chain clearly:

    • the single-node HAKeeper Raft group repeatedly dropped proposals while it had no leader;
    • after leader election, initial-cluster-info proposals, HAKeeper ticks, checker-state reads, and LogService/TN heartbeats repeatedly timed out;
    • Dragonboat reported batches of 13–17 delayed LocalTick messages;
    • all three CN services remained at shard not ready;
    • cluster startup finally exhausted its deadline.

    PR #26501 changes recursive CTE planning/execution and has no overlap with pkg/embed, LogService, HAKeeper Raft startup, or TN shard readiness.

    Latest-main audit (2026-08-01):

    Conclusion: current main has no demonstrated fix for this startup failure. The two consecutive attempts make this stronger than a single flaky occurrence; keep this issue open until the relevant startup/control-plane path is fixed and repeatedly validated under the Ubuntu/x86 full-UT load profile.

  5. gouhongshen commented on Aug 3, 2026

    @gouhongshen
    ContributorAuthor

    Automated AI triage

    This issue requires human involvement and cannot currently be completed independently by the
    automated fix loop.

    Reason

    Requires a HAKeeper/CN/TN maintainer to define and approve the control-plane progress contract—command-delivery deadline, concurrency model, and stale-response behavior—before implementation. The human next action is to choose the design for #26566 and split #26522 into bounded implementation and CI-validation work.

    Evidence

    The failure recurred after merged mitigations #26507 and #26546. Current main still performs CN/TN heartbeat RPCs synchronously before handling schedule commands, while #26566 documents several competing architectural solutions and requires shutdown/restart-generation semantics across CN, TN, LogService, and embed startup.

    Please use this analysis to provide the missing decision, environment, evidence, or ownership
    needed before the issue is returned to the AI candidate pool.

  6. gouhongshen commented on Aug 3, 2026

    @gouhongshen
    ContributorAuthor

    Current-main root-cause audit

    I re-audited the original failures, the relevant code on current main (820ee12144439c5b63c03b261f4330ec0364fdb3), and CI after the merged mitigations.

    Conclusion

    This was a real load-sensitive embedded-cluster failure, not a bad assertion or a change-specific failure. It was not fixed by #26546 alone. However, the evidence after #26503 indicates that the original failure family is now substantially mitigated, while a separate production control-plane weakness remains tracked by #26566.

    Confirmed failure chain

    1. The Ubuntu/x86 job runs on an 8-core/16-GB runner with UT_PARALLEL=6. Several package processes can each keep a complete LogService/TN/3-CN cluster alive.
    2. fix: harden async lifecycle and CI test contracts #26546 serializes only embedded-cluster bootstrap. It releases the startup lease once services are ready, so already-started clusters still run concurrently. TestMultiClusterCanWork also intentionally keeps two clusters alive in one process.
    3. Under full-UT load, Dragonboat reported batches of 10-24 delayed LocalTick messages. At the configured 100-ms tick interval, that is direct evidence of roughly 1-2.4 seconds of delayed Raft/control-plane processing. HAKeeper proposals, ticks, checker-state reads, and heartbeats then timed out.
    4. CN and TN heartbeat loops are synchronous: SendCNHeartbeat / SendTNHeartbeat must return before the response commands are handled or another heartbeat can be sent. A slow request therefore also delays delivery of commands such as D/Start.
    5. The TN shard remained unavailable until waitAnyShardReadyLocked exhausted its 30-second deadline. Connection resets and broken pipes were largely downstream effects of failed startup/cleanup and, before fix(cnservice): return bootstrap failures #26503, a transient CN bootstrap error terminating the package process.

    The recurrence after #26546 is concrete:

    What the merged changes do and do not fix

    After #26503 merged, I checked 94 completed MatrixOne ALL CI workflows through 2026-08-03: 40 completed successfully, and the four Ubuntu/x86 UT job failures in that set did not reproduce the original waitAnyShardReadyLocked/HAKeeper-loss startup signature. This is good mitigation evidence, but not a deterministic proof of closure.

    A later current-main failure of TestClusterCanStartNewCNServices (run 30784347559, job 91594982538) spent about 39 minutes in cluster.Close -> CN Close -> txn trace Stopper.Stop. Its test body had already completed. That is a distinct shutdown-lifecycle defect and should not be used as evidence that the original startup failure recurred.

    Recommended scope

    1. Keep [Bug]: Embedded-cluster UTs still lose HAKeeper connections under Ubuntu/x86 load #26522 focused on the Ubuntu/x86 full-load test contract: embedded-cluster packages need a bounded runtime resource class, not only serialized bootstrap and not retry-based masking.
    2. Validate removing the shared base clusters explicit 30-second heartbeat RPC deadline and restoring the 3-second service default while retaining the independent 60-second store-liveness window. A 30-second serial RPC deadline delays retry and schedule-command delivery.
    3. Validate with repeated full Ubuntu/x86 UT runs under the real 8C/16G, UT_PARALLEL=6 profile; isolated package runs are insufficient.
    4. Keep the production heartbeat/command-progress redesign in [Bug]: Serial HAKeeper heartbeat RPC can starve schedule-command delivery #26566, with bounded in-flight work, cancellation, and stale-generation semantics.
    5. Track the 40-minute CN/txn-trace shutdown hang separately.

    I would not close #26522 solely from the recent green sample. Closure should require a bounded embedded-cluster runtime-concurrency contract plus repeated full-profile validation; #26566 can remain open independently for the production liveness contract.

  7. aptend commented on Aug 3, 2026

    @aptend
    Contributor

    New reproduction on PR #26531 after merging current main into head 0349df7.\n\nFailed job: https://github.com/matrixorigin/matrixone/actions/runs/30817969769/job/91700405563\n\nThe Ubuntu/x86 UT job failed only TestTableFeatures after 69.90s. The failure signature matches this issue:\n- Dragonboat reported 12-16 delayed LocalTick messages.\n- HAKeeper proposals and checker-state reads timed out.\n- TN/LogService heartbeats timed out.\n- database setup finally failed with connection reset by peer while talking to the local HAKeeper endpoint.\n\nThe job reported no OOM or process-kill signature. The tested PR does not change the TestTableFeatures setup or HAKeeper/LogService control-plane path.

  8. added
    severity/s0
    and removed on Aug 4, 2026
  9. gouhongshen commented on Aug 5, 2026

    @gouhongshen
    ContributorAuthor

    Three-day post-merge observation

    Updated: 2026-08-06. Merge commit: 295fb60070f394a9697a5544fa32f91f5494f7d9 from PR #26667.

    Scope and counts

    I enumerated all MatrixOne ALL CI workflow runs created after the merge, then kept only heads whose commit ancestry contains the merge commit.

    Category Count
    MatrixOne ALL CI workflow runs after merge 231
    Runs containing the merge commit 224
    Runs with the Ubuntu/x86 UT job 223
    Completed Unit Testing executions 169
    Completed Unit Testing successes 145
    Completed Unit Testing failures 24
    Still-running Unit Testing jobs 7

    The remaining jobs were cancelled, skipped, or failed before Unit Testing. Two pre-UT failures were infrastructure failures caused by TLS/network problems.

    #26522 recurrence

    I count a recurrence only when a failed Ubuntu/x86 Unit Testing job contains a runtime failure signature, not when a passing test name merely contains Timeout or waitAnyShardReadyLocked.

    7 recurrences were found among 169 completed Unit Testing executions:

    The other 17 Unit Testing failures did not contain this failure family. The two failures before Unit Testing were TLS/network infrastructure failures and are not counted as recurrences.

    Observation continues through the agreed three-day window; new completed jobs will be added to this same comment.

  10. gouhongshen commented on Aug 6, 2026

    @gouhongshen
    ContributorAuthor

    Root cause found and draft fix

    The post-merge recurrence is not only cross-process package parallelism. In the serial Ubuntu/x86 stage of run 31074714519, pkg/tests/issues ran TestAuthenticatedTestsReuseBaseCluster before TestHashBuildSharedBudgetRecoverySQL.

    The first retained the package's 3-CN shared base. The second started a bespoke 1-CN cluster. Admission was reentrant within one binary, so six services could coexist despite -p 1; the second cluster then hit the no-leader / dropped-proposal / failed-initial-cluster-info signature.

    Draft PR #26752 fixes the test lifecycle contract without rebuilding the shared base:

    • implicit second complete cluster in one binary now fails fast;
    • genuine multi-cluster tests explicitly opt in;
    • the three bespoke-configuration regressions now run in pkg/tests/issues/isolated, a separate test binary explicitly included in run_ut.sh's serial scope;
    • join-spill SQL helpers are shared through an internal test package.

    This avoids the extra 3-CN base-cluster restarts in the earlier draft approach. It does not change production HAKeeper heartbeat/RPC behavior; #26566 remains the separate production command-progress issue. CI duration is being measured on the final design.

  11. 4 remaining items

  12. iamlinjunhong commented on Sep 12, 2026

    @iamlinjunhong
    Contributor

    Follow-up evidence for PR #28636 / run 34666156512

    Source:

    Complete UT log signature:

    • Command: make ut UT_CONFIGURED=1 UT_PARALLEL=6 UT_TIMEOUT=40 UT_SHARD=all; the job is the normal CGO-enabled Ubuntu/x86 UT lane.
    • The only terminal product test failure was pkg/tests/arrowload.TestArrowLoadBVT: pkg/tests/arrowload/cluster_test.go:148 / arrow_load_test.go:45, context deadline exceeded, with HAKeeper heartbeat/propose/checker/address-refresh timeouts and connection-reset noise; the test failed after 52.36s.
    • The aggregate job only propagated matrixone-ci: failure; it has no independent product failure. The complete log contains no compile/type/static/security failure.
    • The PR changes planner/frontend SIGN numeric-domain handling and tests; it does not touch pkg/tests/arrowload, embedded-cluster/HAKeeper/LogService code, or the UT runner/harness.

    Exact-head and clean-main comparison:

    • PR head, repository CGo wrapper, -count=1 -timeout=120s -run '^TestArrowLoadBVT$' ./pkg/tests/arrowload: 3/3 passed (26.665s, 23.135s, 26.160s).
    • Clean official up/main efb2c5084957ac90273a3f625668fc6a784562c4, the identical selection and CGo mode in a detached worktree: 3/3 passed (27.998s, 27.537s, 26.528s).
    • The PR-specific prepared-SIGN planner regression and public issue [Bug]: SIGN loses runtime numeric type across prepared execution paths #28583 regression also pass locally through the same CGo wrapper.

    Attribution: this is a non-PR flaky candidate in the embedded-cluster/HAKeeper timing family tracked by this issue. All four required checks are present: complete failure log with no stable product/compiler/static failure; 3/3 exact selected-test passes on the PR head; no PR diff or dependency-closure overlap with the failed package/mechanism/harness; and 3/3 identical passes on clean official up/main. The failed jobs of run 34666156512 will be rerun once under the approved CI policy after this evidence is recorded.

  13. iamlinjunhong commented on Sep 12, 2026

    @iamlinjunhong
    Contributor

    New CI occurrence: PR #28608 / run 34689614866

    Source:

    Complete failure signature:

    • The only failed UT package was github.com/matrixorigin/matrixone/pkg/tests/issues.
    • TestIssue26118DatabaseCopiesPreserveHashIdentifiers failed after 48.94s.
    • The business assertions were not reported as failing. During deferred fixture cleanup, the test received:
      Received unexpected error:
      context deadline exceeded
      exec failed: drop database if exists \`issue_26118_clone\`
      
    • The failure was reported from pkg/tests/issues/issue_26118_test.go:62, through issue_test.go:182, and the run ended with make: *** [Makefile:513: ut] Error 1.
    • Surrounding service evidence in the same failure window includes repeated LogService heartbeat, checker-state, and proposal timeouts; broken-pipe and connection-reset errors; and WAL/commit latency around 7.2 to 7.5 seconds.
    • The runner diagnostics recorded embedded-cluster admission waits totaling 13.15 minutes with a 4.18 minute maximum, and cgroup memory peak 17183281152 with oom=0 and oom_kill=0.

    Attribution:

    • PR feat: enable cost-based window hash partitioning #28608 changes planner/frontend/window-partition code, tests, design text, and distributed window coverage. It does not change pkg/tests/issues, pkg/embed, LogService/HAKeeper lifecycle code, or the UT runner/harness.
    • The exact-head run completed all eight pkg/sql/plan race shards successfully; the failed-package summary contains only pkg/tests/issues. The failure occurred in teardown of an unrelated issue regression, not in the PR window closure.
    • The direct runner capacity and embedded control-plane timeout evidence is consistent with the Ubuntu/x86 embedded-cluster/HAKeeper timing and teardown failure family tracked by this issue, and is independent of the PR change closure.

    The failed job from run 34689614866 will be rerun once under the approved CI policy after this evidence is recorded.

  14. iamlinjunhong commented on Sep 12, 2026

    @iamlinjunhong
    Contributor

    Follow-up evidence: PR #28608 / run 34689614866 attempt 2

    Source:

    Complete failure signature:

    • pkg/tests/issues.TestWWConflict remained active for the full 40-minute package timeout and ended with panic: test timed out after 40m0s; the stack contains the test goroutine waiting in the issue-test workflow.
    • pkg/tests/partition.TestAffectedRows failed during create database after context deadline exceeded from HAKeeper ID allocation.
    • The same failure window contains repeated HAKeeper/LogService heartbeat, proposal, checker-state, and schedule-command timeouts, MORPC broken-pipe errors, and TCP connection resets. The runner checkpoint showed a 16 GiB cgroup peak with 17 processes while the control plane was degraded.
    • CI Required has no independent product failure; its github-script step only propagated matrixone-ci: failure.

    Attribution:

    • The PR changes planner/frontend/window-partition code and tests. It does not change pkg/tests/issues, pkg/tests/partition, embedded-cluster, HAKeeper/LogService lifecycle, or the UT harness. The changed closure passed the exact-head focused race validation locally; the exact-head CI run also completed the changed pkg/sql/plan race shards and unrelated frontend/window packages successfully.
    • Two independent embedded-cluster consumers failed in the same Ubuntu/x86 run while the service/control-plane errors were active. This is a direct runner/service failure occurrence in the HAKeeper/LogService timing family tracked by this issue, not a deterministic window-partition failure.

    This is the already-authorized one rerun for run 34689614866; attempt 2 was accepted and completed with the same infrastructure signature. No further rerun is requested from this occurrence.

  15. iamlinjunhong commented on Oct 15, 2026

    @iamlinjunhong
    Contributor

    Additional CI occurrence for PR #30262, exact head 1fb117bedeb4ade795cc99cf505c340de40e609f, branch fix/csv-external-integer-whitespace.

    Run 38715428406, attempt 1 is complete. Recording this against the existing embedded-cluster/HAKeeper connection-loss tracker. This tracker is closed; the classification here is based on the fresh four-part comparison protocol below.

    Failed checks and complete-log evidence:

    • UT Test on Ubuntu/x86, job 116356905171: the only failed root test is pkg/tests/sqlintegration.TestLegacyPartitionColumnLimitCopy (49.39s).
    • CI Required, job 116412489549: verifyResults propagates matrixone-ci: failure, without an independent product failure.
    • CI entry: make ut UT_CONFIGURED=1 UT_PARALLEL=6 UT_TIMEOUT=40 UT_SHARD=all; Go 1.27.1, Ubuntu/x86, CGo, short/race, matrixone_test. The failed package ran in the embedded stage's four fresh batches with bounded process parallelism 2.

    Normalized failure:

    TestLegacyPartitionColumnLimitCopy
    legacy_partition_column_limit_test.go:57 / :184
    alter table wide drop c4097
    Error 1105 (HY000): writeto tcp4 ...->127.0.0.1:11020:
    read tcp4 ...->127.0.0.1:11020: read: connection reset by peer
    --- FAIL: TestLegacyPartitionColumnLimitCopy (49.39s)
    

    The failure window also contains LogService heartbeat/checker/proposal timeouts and CN heartbeat connection resets. The cgroup checkpoint at 11:55:37 UTC reports memory current 11,637,600,256 bytes, peak 17,179,869,184, and oom=0,oom_kill=0; these capacity observations do not establish an infrastructure root cause. No OOM kill, panic, reported data race, compiler/type/static/security failure was found in the complete job logs. The raw diagnostic JSON artifact was size-truncated; the complete job log retains the failed-test output and assertion above.

    Fresh four-part comparison:

    1. Both failed jobs' complete logs were downloaded and inspected. The root failure is the runtime connection-reset assertion above.
    2. At the unchanged exact PR head, the exact failed test passed 3/3, root times 43.25s, 42.27s, 47.58s, with terminal package PASS (135.955s, exit 0).
    3. The complete 12-file PR delta changes external CSV numeric materialization, a new exact-decimal wrapper, whitespace record parsing, and their tests/fixtures. It does not change SQL integration fixtures, embedded-cluster startup/lifecycle, LogService/HAKeeper transport, the UT runner, or partitioned COPY DDL. The failing test seeds legacy catalog definitions through the typed engine API and executes COPY ALTER TABLE; it has no CSV source. The new decimal wrapper is reached through external CSV integer materialization, outside this DDL/RPC failure path. The existing assignment parser itself was not modified.
    4. Fresh official main eb18dbfa030b6309c5f5d0c2d5e7078a1466ac7f passed the same exact test 3/3, root times 41.38s, 39.68s, 57.24s, with terminal package PASS (141.075s, exit 0). To respect the managed-lane boundary, the official GitHub archive was exported into an ignored directory in the same lane; all 11,216 files were byte-verified against that archive before and after testing. No Git worktree, checkout or shared-config mutation was used. The failed test and fixture are identical between the PR and main. All 191 tracked native-source/wrapper inputs were also verified identical; both controls use the same read-only Darwin/arm64 native artifacts. Temporary native links were removed by the installed cleanup trap.

    Both local controls used Go 1.27.1 on Darwin/arm64, retaining the CI race/tags/CGo/short mode:

    .agents/skills/mo-dev/scripts/mo-cgo-test -v -race -short \
      -tags matrixone_test -vet=off -count=3 -p=1 -timeout=40m \
      -run '^TestLegacyPartitionColumnLimitCopy$' ./pkg/tests/sqlintegration

    For the exported main control, GIT_WORK_TREE scopes the wrapper's read-only root resolution to that source tree; GIT_OPTIONAL_LOCKS=0 prevents shared-index refresh. The archive SHA-256 is f5899980017a8c5569997caa78e7ce3e8a2c7c65c3f9e9afec5c2ae397dafa5f.

    Additional exact-head CI evidence: the failed race run's raw events contain terminal PASS for all changed owning packages: external 40.034s, function 23.683s, csvparser 1.265s. The same head's shared build, SCA, coverage producer/merge and both selected multi-CN BVT lanes also passed.

    Classification: non-PR flaky candidate under the fresh four-part protocol. These controls do not reproduce the Ubuntu/x86 full-load failure or prove its underlying mechanism is fixed. The absence of the signature in clean-main controls is the expected bounded flaky-candidate result. No unrelated production code or assertions were changed. After recording this evidence, only the failed jobs of run 38715428406 will be rerun once; another occurrence requires renewed attribution.

  16. iamlinjunhong commented on Oct 18, 2026

    @iamlinjunhong
    Contributor

    Additional occurrence for PR #30171, exact head e9955d8e2ac5c1d379f85d05bc2a0ed0d0dc78ab, branch fix/30158-decimal-div-domain.

    Run 39092472034, attempt 1 is complete. Reusing this embedded-cluster/HAKeeper tracker to retain the matching failure history. This issue is closed; the classification below relies on fresh four-part comparison evidence, rather than the known-open-defect exception.

    Complete-log evidence:

    • Ubuntu/x86 UT, job 117571954516: the only failed root is pkg/tests/issues.TestIssue26118DatabaseCopiesPreserveHashIdentifiers (59.06s).
    • CI Required, job 117582392464: verifyResults propagates matrixone-ci: failure; it has no independent product failure.
    • CI entry: time make ut UT_CONFIGURED=1 UT_PARALLEL=8 UT_TIMEOUT=40 UT_SHARD=all, Go 1.27.1, Linux/amd64, CGO enabled, short/race, matrixone_test, bounded Go package parallelism 2 and 40-minute timeout.

    Normalized failure:

    TestIssue26118DatabaseCopiesPreserveHashIdentifiers
    issue_26118_test.go:62 -> issue_test.go:194
    Received unexpected error: context deadline exceeded
    exec failed: drop database if exists `issue#26118#source`
    --- FAIL: TestIssue26118DatabaseCopiesPreserveHashIdentifiers (59.06s)
    

    The failure occurs in deferred cleanup: user/role removal and five database drops share one 30-second context, and the final source-database DROP times out. The preceding business assertions were not reported as failing. The surrounding window contains LogService/HAKeeper heartbeat/checker/proposal timeouts. Those messages and capacity observations are correlations, not proof of an infrastructure root cause. The full failed-step logs contain no compiler/type/static/security failure, panic, reported data race or OOM kill. The diagnostic JSON artifact was size-truncated; complete failure output remains in the downloaded job logs.

    Fresh four-part comparison:

    1. Both failed jobs' complete failed-step logs were read and the runtime cleanup timeout above was isolated.
    2. At the unchanged exact PR head, the exact failed test passed 3/3, root times 7.33s, 1.52s, 1.52s, with terminal package PASS (12.817s, exit 0).
    3. The complete 26-file PR delta and the failing call path were reviewed. The PR changes DECIMAL integer-DIV domain resolution, its protocol admission, DIV view-boundary provenance, unsigned DIV warnings and their regressions. It does not modify this test, the shared embedded fixture, HAKeeper/Raft transport, database-drop cleanup, or the CI harness. This test uses plain INT/VARCHAR columns with no DECIMAL or DIV; its simple view columns carry zero DecimalDivDisplayLength, so the new DIV view projection is not inserted. The failing deferred DROP DATABASE call does not exercise the changed DIV execution, view-boundary or warning paths. The failed test and shared fixture are byte-identical between the PR and current main.
    4. Fresh official main 3c07fac240311d6f2b706674614ed6034e97ff79 passed the same exact test 3/3, root times 7.20s, 1.57s, 1.54s, with terminal package PASS (12.733s, exit 0).

    Both local comparisons use Go 1.27.1 on Darwin/arm64, retaining the CI race/tags/CGO/short mode:

    .agents/skills/mo-dev/scripts/mo-cgo-test \
      -vet=off -short -v -race -tags matrixone_test -count=3 -p 2 -timeout=40m \
      -run '^TestIssue26118DatabaseCopiesPreserveHashIdentifiers$' ./pkg/tests/issues

    To respect the managed-lane boundary, official main was exported into an ignored directory inside the same lane. All 11,436 source files/symlinks were verified against the Git archive, including bytes/targets and modes, before and after testing. The archive SHA-256 is 9d5f7cfc093edad9ce338dd07520101419df9cd9369682bfb39585bf9e9c8b69. The main wrapper's root was verified to be this exported source tree using GIT_WORK_TREE; GIT_OPTIONAL_LOCKS=0 prevents shared-index refresh. Shared Git metadata remains read-only; main source identity is established by the archive verification. No Git worktree, checkout or shared-config mutation was used. All 193 tracked native/Makefile/wrapper/Go-module inputs match between PR and main; both controls use the same verified read-only Darwin/arm64 native artifacts. The cleanup trap removed both temporary native links, and the PR worktree remains clean.

    Additional evidence from this exact PR head's CI: raw UT events contain terminal PASS for pb/plan, sql/colexec, sql/compile, sql/plan/function, sql/plan/rule, and all eight sql/plan shards. Eleven PR-related DECIMAL integer-DIV/view/warning protocol regression roots found in the artifact passed. The same head's shared build, SCA, coverage producer/merge and both selected multi-CN BVT lanes also passed.

    Classification: non-PR flaky candidate under the fresh four-part protocol. The local controls do not reproduce the full-load Linux/amd64 failure or prove its underlying mechanism is fixed. Clean-main controls passing is the expected bounded flaky-candidate result. No production code, assertions, timeout or skip was changed. After recording this evidence, only the failed jobs of run 39092472034 will be rerun once; a further occurrence requires renewed attribution.

  17. gouhongshen commented on Nov 11, 2026

    @gouhongshen
    ContributorAuthor

    Reproduced again in MatrixOne ALL CI workflow run 43077626773 (attempt 1), job Matrixone CI execution / UT Test on Ubuntu/x86 (job log), while validating PR #32438 (head 7943d72fb63f151359c1e5b50611cd1880a2dbbe, target 4.2-dev) on 2026-11-11 18:25–19:19 UTC:

    • TestCreateAndDropPitr (pkg/tests/ddl) failed at ddl_test.go:55: the HAKeeper client connection to 127.0.0.1:11020 got read: connection reset by peer while allocating an id for create database db_TestCreateAndDropPitr_98439336, right after repeated dragonboat propose tick failed: timeout / propose get id failed: timeout / failed to get checker state: timeout from the embedded LogService (error: timeout, converted to code 20429).
    • TestShowAccountsStorageAggregation (pkg/tests/issues/isolated/show_accounts) failed at show_accounts_storage_test.go:171/177 (drop account if exists acc31388a) with driver: bad connection, after CN heartbeats to LogService 127.0.0.1:14020 were reset (connection reset by peer) and HAKeeper liveness queries timed out.

    Why this is unrelated to PR #32438: that PR changes only pkg/sql parsing/plan/function code and BVT fixtures (CAST omitted-length inference and one-argument TEXT CEIL/FLOOR domain); the failing tests are engine-integration tests in packages it does not touch, their failure modes are heartbeats/connections dropping, and in this very run pkg/sql/plan was green (ok ... 2.959s). The same UT job passed entirely on the previous head 8dacb3faa7 earlier the same day (attempt 2 of run 43041162542, job 130632540702), after its attempt 1 failed with a different, also-unrelated frontend test. That matches the known Ubuntu/x86 embedded-cluster HAKeeper-loss pattern tracked in this issue.

  18. gouhongshen commented on Nov 16, 2026

    @gouhongshen
    ContributorAuthor

    Additional CI occurrence for PR #32642, exact head 7bc0b9e312e7131b52c8cdd8878ad68c7bb946eb, target main.

    MatrixOne ALL CI run 43251876960, attempt 1 completed with these failed checks:

    • Matrixone CI execution / UT Test on Ubuntu/x86, job 131300347630: three embedded-cluster tests hit context deadlines:
      • TestViewCheckOptionCanonicalization/round_2, at view_check_option_test.go:174 while executing create view name_const_replayed_23_0 as ...;
      • TestLoadRejectsDuplicatePrimaryKeys/procedure_session_policy_and_rollback/round=2/on=true/nested_call, at issue_30411_test.go:156 on truncate table procedure_load;
      • TestUnicodeUniqueDiagnostics/CN1, at the issue_30339_test.go:57 execution helper.
    • CI Required, job 131363601598: the gate reported matrixone-ci: failure; its log contains no independent product failure.

    Before the assertions, the UT log contains Dragonboat LocalTick batches, HAKeeper/logservice checker, proposal and heartbeat timeouts, failed proposals, and multi-second WAL appends around each failure window. This matches the embedded-cluster/HAKeeper liveness pattern retained here. Runner cgroup telemetry reached the memory limit and recorded memory.events.max=2, with no OOM kill. Resource pressure is a correlation, not an established first cause. The complete-log scan found no additional panic, fatal error, reported data race, or package timeout.

    Why this is a non-PR flaky candidate: PR #32642 changes temporal numeric coercion and prepared BIT_COUNT binding in frontend/planner code, with focused SQL regressions. The failed CREATE VIEW replay, TRUNCATE, and Unicode diagnostics paths do not exercise BIT_COUNT or the added temporal numeric consumers, and the PR does not change these fixtures, embedded-cluster lifecycle, HAKeeper/logservice transport, or the UT runner. In the failed job, pkg/sql/plan passed and the resource-heavy stage containing pkg/sql/plan/function exited successfully. The same head's UT coverage producer passed all 504 packages with no failure event, and the same run's shared build, SCA, coverage merge, and selected BVT lanes passed. These controls do not reproduce the Ubuntu/x86 full-load failure or prove its underlying mechanism.

    Classification: non-PR flaky candidate in this existing tracker. The blocker remains unresolved pending CI; only the failed jobs of run 43251876960 will be rerun once. No PR code or assertions were changed for this occurrence.

  19. gouhongshen commented on Nov 16, 2026

    @gouhongshen
    ContributorAuthor

    Additional CI occurrence for PR #32642, exact head bd572a949f4cb9b0c5382f8f2519ecd303d19680, target main.

    MatrixOne ALL CI run 43869576010, attempt 1 completed with these failed checks:

    • Matrixone CI execution / UT Test on Ubuntu/x86, job 133307211275: five embedded-cluster tests failed:
      • TestIssue29572LogicalViewAuthorization at issue_29572_test.go:51, context deadline exceeded;
      • TestIssue31401ScalarRefreshProgress/defaults at issue_31401_scalar_test.go:69, while executing create table issue31401_peer.t(id int), context deadline exceeded;
      • TestIssue29699DropImmediatelyAfterAsyncIndexCreate at async_index_drop_test.go:43, during embedded cluster 23001 CN startup/cluster refresh, with context deadline exceeded and lock-table binding changes;
      • TestAlterTableAddPartition_Hash_ShouldFail at alter_parittion_test.go:379, with txn commit status is unknown;
      • TestV407LoginRepairsTenantCreatedAfterUpgradeSnapshot at upgrade_v4_0_8_statistics_test.go:191, context deadline exceeded.
    • CI Required, job 133366277405: the gate reported matrixone-ci: failure; its log contains no independent product failure.

    The earliest failed-test window is preceded by Dragonboat LocalTick batches, proposal/checker timeouts, LogService heartbeat deadlines, and multi-second WAL appends. Later connection-refused/reset messages coincide with failed-test cluster sealing and cleanup. The complete-job-log scan found no panic, fatal runtime error, reported data race, package timeout, or OOM kill. Runner telemetry reached the 16 GiB memory limit and recorded memory.events.max=14, with oom=0 and oom_kill=0; this is correlated resource pressure, not a proven first cause. The diagnostic artifact is size-truncated and omits ut-stderr.log and per-test output files, so the underlying liveness fault remains unproven.

    Why this is a non-PR flaky candidate: PR #32642 changes temporal numeric coercion for BIT_COUNT, bitwise consumers, and SEC_TO_TIME, plus prepared binding metadata and focused tests. It does not change the failed fixtures, embedded-cluster lifecycle, HAKeeper/LogService transport, or the UT runner. In this same run pkg/frontend, both pkg/sql/plan shards, and the resource-heavy stage containing pkg/sql/plan/function passed. The failed SQL paths above do not exercise the changed consumers. This matches the embedded-cluster/HAKeeper liveness recurrence pattern retained in this tracker; the tracker is closed, so this classification relies on the fresh run evidence rather than its closed state.

  20. gouhongshen commented on Nov 16, 2026

    @gouhongshen
    ContributorAuthor

    Additional CI occurrence for PR #32642, exact head bd572a949f4cb9b0c5382f8f2519ecd303d19680, target main.

    MatrixOne ALL CI run 43869576010, attempt 2 completed with these failed checks:

    • Matrixone CI execution / UT Test on Ubuntu/x86, job 133372395184: FAIL_UT_CASES contains three embedded-cluster tests, all ending in context deadline exceeded:
      • TestIssue29095RewriteMetadataVisibility/mode0, at issue_29095_test.go:82 through issue_test.go:194, during drop database if exists caller29095;
      • TestIssue29399TableRestoreRetainsDatabaseOwnership/scenario, at issue_29399_test.go:258 through issue_test.go:194, during drop database app;
      • TestIssue29572LogicalViewAuthorization, at issue_29572_test.go:51.
    • CI Required, job 133440178659: the gate reported matrixone-ci: failure; its complete log contains no independent product failure.

    Before the earliest assertion, at 15:28:40–15:28:42 UTC, the UT log records LogService heartbeat/proposal deadlines, Dragonboat batches of 25–36 LocalTick messages, cluster-state deadlines, and multiple WAL appends taking 2.2–3.9 seconds. Similar heartbeat, proposal, and slow-WAL evidence surrounds the later failures. The complete-log scan found no panic, fatal runtime error, reported data race, package timeout, or OOM kill. Runner telemetry peaked at 17,179,852,800 bytes against a 17,179,869,184-byte limit and recorded memory.events.max=1, memory.events.oom=0, and memory.events.oom_kill=0; this is correlated resource pressure rather than an established first cause.

    Why this is a non-PR flaky candidate: the exact-head diff is confined to temporal numeric coercion and prepared binding in pkg/frontend and pkg/sql/plan, plus their function tests and SQL BVT fixtures. It leaves the failed issue fixtures, embedded-cluster lifecycle, HAKeeper/LogService transport, and UT runner unchanged. The failed database-drop and authorization paths do not exercise the changed numeric consumers. In this same run, pkg/frontend, pkg/sql/plan/function, and both pkg/sql/plan race shards passed. Attempt-1 failure TestIssue31401ScalarRefreshProgress passed in attempt 2, while the failure set changed.

    The attempt-2 diagnostics manifest reports 495,214,313 original bytes reduced to the 262,144,000-byte budget. ut-report.json is truncated and ut-stderr.log plus all failed-test output files were omitted, so the underlying first liveness fault remains unproven. The complete job log retains the assertions and service errors cited above.

    Classification: non-PR flaky candidate in this existing embedded-cluster/HAKeeper liveness family. Attempt 2 was the already-authorized rerun, so no further rerun is requested. No PR code or assertions were changed for this occurrence.

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