Skip to content

GH-50471: [C++][Python] Bump bundled mimalloc to 3.4.1#50555

Closed
raulcd wants to merge 6 commits into
apache:mainfrom
raulcd:GH-50471
Closed

GH-50471: [C++][Python] Bump bundled mimalloc to 3.4.1#50555
raulcd wants to merge 6 commits into
apache:mainfrom
raulcd:GH-50471

Conversation

@raulcd

@raulcd raulcd commented Jul 20, 2026

Copy link
Copy Markdown
Member

Rationale for this change

A new version of mimalloc was released. The existing version of mimalloc can cause a segmentation fault as seen on the referenced issue.

What changes are included in this PR?

Bumping the mimalloc version.

Are these changes tested?

Yes, via CI and archery.
I've also tested the minimal reproducer from the issue:

import threading

def imp():
    import pyarrow  # dlopens libarrow -> bundled mimalloc initializes on this thread

def alloc():
    import pyarrow as pa
    pa.array(["x"] * 5000)

a = threading.Thread(target=imp); a.start(); a.join()
b = threading.Thread(target=alloc); b.start(); b.join()

The above cause a segfault on every execution with pyarrow 25.0.0 on a local Python 3.14. With the new built wheel with the new mimalloc version, I haven't been able to reproduce the segfault after several attempts.

Are there any user-facing changes?

No

Copilot AI review requested due to automatic review settings July 20, 2026 13:15
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #50471 has been automatically assigned in GitHub to PR creator.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the bundled mimalloc version used by Arrow’s C++ (and thus Python wheel) builds to address a known multi-threaded initialization crash scenario.

Changes:

  • Bump ARROW_MIMALLOC_BUILD_VERSION from v3.3.1 to v3.4.1.
  • Update the corresponding SHA256 checksum for the mimalloc source archive.

Comment thread cpp/thirdparty/versions.txt
Copilot AI review requested due to automatic review settings July 20, 2026 13:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 20, 2026 13:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@raulcd

raulcd commented Jul 20, 2026

Copy link
Copy Markdown
Member Author

Unfortunately the two failures are suspicious and look related. Those seeming to affect only macOS arm64 doesn't make it easy to debug/diagnose.

Copilot AI review requested due to automatic review settings July 20, 2026 15:16
@raulcd
raulcd marked this pull request as draft July 20, 2026 15:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment on lines 2569 to +2573
-DMI_INSTALL_TOPLEVEL=ON
# Don't override default malloc
-DMI_OVERRIDE=OFF
-DMI_OSX_INTERPOSE=OFF
-DMI_OSX_ZONE=OFF
@raulcd

raulcd commented Jul 20, 2026

Copy link
Copy Markdown
Member Author

I'll close this PR as there's a second PR from @pitrou that is covering similar problems. Both the initial fix on that PR and the bump seem required to be done together:

@raulcd raulcd closed this Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants