Skip to content

[CI]: UT coverage crashes in TestReallocPhysicalFailureRestoresOwnership under RLIMIT_AS #28451

Closed

Description

@iamlinjunhong

Is there an existing issue for the same bug?

  • I searched open and recently closed MatrixOne issues for the exact test and normalized failure class. Existing OOM coverage issues concern different packages or runner-level kills; none covers this deterministic mpool test with fatal error: runtime: cannot allocate memory under its process-local address-space limit.

Source PR and exact head

Failed check

Observed failure

The coverage runner reported zero build failures but two failed events for github.com/matrixorigin/matrixone/pkg/common/mpool / TestReallocPhysicalFailureRestoresOwnership. The stable signature was:

--- FAIL: TestReallocPhysicalFailureRestoresOwnership
fatal error: runtime: cannot allocate memory
...
pkg/common/mpool.(*MPool).ReallocZero
pkg/common/mpool.TestReallocPhysicalFailureRestoresOwnership

The failure occurred while the test was exercising ReallocZero after setting a process-local RLIMIT_AS limit to the current address-space pages plus 64 MiB. The stack reaches MPoolStats.RecordAlloc from ReallocZero before the test can complete its expected allocation-failure assertions. The runner diagnostics immediately afterward reported 15 GiB total memory and 13 GiB available, with no cgroup memory files available; this is a process address-space/coverage interaction, not a host-wide OOM report.

Independent evidence

Reproduction

  1. Run the MatrixOne UT Coverage workflow on Linux/x86 with Go 1.26.4 and the matrixone_test tag.
  2. Include pkg/common/mpool in the coverage package set.
  3. Observe TestReallocPhysicalFailureRestoresOwnership under coverage; the test sets RLIMIT_AS and calls ReallocZero with a 1 GiB target, then may abort with the signature above instead of returning the expected allocator error.

Expected behavior

The deterministic physical-allocation-failure test should complete under the repository UT Coverage mode and assert the restored ownership/accounting state without a runtime fatal allocation error.

The failed jobs for run 34242721121 will be rerun once after this issue is recorded.

Activity

  1. iamlinjunhong commented on Sep 12, 2026

    @iamlinjunhong
    ContributorAuthor

    Recurrence evidence for PR #27716

    Source PR: #27716
    Issue context: #27655
    The failed workflow ran against the remote PR head fa1a80fa6c9135ac25e268af3ac5a9b63e6a12f0 (attempt 1). The repair lane rebased the unchanged PR content onto official up/main at ba2b02d2153f7ddf48bf58db9fef129731e11562; the local candidate is 866c304618501e42d045e3307071e3cb9cc3e16b.

    Failed checks from run https://github.com/matrixorigin/matrixone/actions/runs/34690395184:

    The UT coverage artifact has no build failures. The product failure is the same deterministic case covered by this issue:

    github.com/matrixorigin/matrixone/pkg/common/mpool
    TestReallocPhysicalFailureRestoresOwnership
    realloc_failure_linux_test.go:98: Received unexpected error: exit status 2
    fatal error: runtime: cannot allocate memory
    

    The child test intentionally sets a process-local RLIMIT_AS to its current address-space pages plus 64 MiB, then calls MPool.ReallocZero with the 512 MiB physical-failure target. The failure occurs inside the child runtime instead of returning the expected physical allocator rejected error. The runner diagnostics reported about 13 GiB available host memory and no swap, so this is not a host-wide OOM. Coverage merge and CI Required then fail as downstream consequences of the UT producer failure.

    Independence evidence:

    • The current official up/main contains the byte-identical pkg/common/mpool/realloc_failure_linux_test.go, including the process-local limit and the 512 MiB target, and contains the merged fede78e3b9 coverage-crash adjustment.
    • The PR diff and dependency closure touch information_schema view metadata, parser/planner handling, protocol fencing, and their tests; they do not touch pkg/common/mpool, this test, or the coverage harness.
    • The current PR own focused and owning-package validation passed, including full pkg/sql/compile, pkg/sql/plan, pkg/sql/plan/function, parser, sysview, and v4.0.6 upgrade tests, plus two fresh public SQL rounds.
    • The earlier unrelated Linux/x86 occurrence and maintainer analysis recorded in this issue remain the same failure mechanism; the merged follow-up did not prevent this recurrence under the current coverage run.

    Reproduction: run the UT Coverage workflow on Linux/x86 with the repository coverage mode and include pkg/common/mpool; the named test applies its process-local RLIMIT_AS and can terminate with the signature above before its ownership-restoration assertions complete.

    The failed jobs for run 34690395184 will be rerun once after this evidence is recorded.

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

Metadata

Metadata

Assignees

Labels

kind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions