Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-6442

cpimport leaks open column segment files when a bulk load aborts (LeakSanitizer report in CI)

    XMLWordPrintable

Details

    • Bug
    • Status: In Review (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • 2026-8

    Description

      LeakSanitizer failed the ASanRegr stage of nightly build 3952 (stable-23.10, ubuntu:24.04, 10.6-enterprise) with a leak in cpimport:

      Root cause: ColumnInfo owns the column segment file handle (curCol.dataFile.pFile, raw IDBDataFile*), but ~ColumnInfo() never closes it — only the normal load-completion path calls closeColumnFile(). When a bulk load aborts after the column files were opened (in build 3952 the import was interrupted by an unrelated test211 hang and stack restart), the ColumnInfo objects are destroyed with the files still open, leaking the IDBDataFile objects and their descriptors.

      The leak is small (~572 B once, in a short-lived process) and only occurs on the abort path, which is why it appears sporadically in CI: the leak itself is deterministic, the abort trigger is not. Any aborted import under ASan will fail the sanitizer gate.

      Fix: close the file in ~ColumnInfo() via the base-class ColumnInfo::closeColumnFile(false, /abort/ true). Abort semantics only release the handle — no flush/finalization (the compressed override is deliberately not dispatched from the destructor) and no extent-map interaction, so it is destructor-safe.

      Attachments

        Activity

          People

            vasily.kozhukhovskiy Vasily Kozhukhovskiy
            vasily.kozhukhovskiy Vasily Kozhukhovskiy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 1d
                1d
                Remaining:
                Time Spent - 0.25d Remaining Estimate - 0.75d
                0.75d
                Logged:
                Time Spent - 0.25d Remaining Estimate - 0.75d
                0.25d

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.