Describe the bug, including details regarding any error messages, version, and platform.
Environment: macOS 15 arm64, CPython 3.14.3 (python.org), pyarrow from PyPI.
python3.14 -c "import pyarrow; import kglite; kglite.KnowledgeGraph()"
# pyarrow 24.0.0 → exit 139 (SIGSEGV at teardown); 23.0.1 / 22.0.0 → exit 0
kglite is a PyO3/abi3 Rust extension that statically links mimalloc v3 as its Rust global allocator (a very common Rust-wheel pattern). It links no Arrow code and exports one symbol. Import alone (no pyarrow API use, no kglite↔pyarrow data exchange) arms the crash; ARROW_DEFAULT_MEMORY_POOL=system does not help; os._exit(0) avoids it (teardown-only).
Crash: EXC_BAD_ACCESS inside libarrow's bundled mimalloc (_mi_theap_collect_retired + 124, lldb). Process census via MIMALLOC_VERBOSE: CPython 3.14 vendors mimalloc v3.3.2, the extension carries v3.3.1, libarrow 2400 carries a v2-line copy. Switching the extension's copy to v2 — or downgrading pyarrow to ≤23.0.1 — eliminates the crash; so something introduced in 24.0.0 (bundled-mimalloc bump? teardown/atexit registration change?) makes the pre-existing three-allocator situation fatal.
Impact: any Rust wheel shipping a mimalloc-v3 global allocator (the mimalloc crate defaults to v3 since libmimalloc-sys 0.1.47) can now crash any Python ≥3.13 process it shares with pyarrow 24 — at exit, i.e. flaky-looking CI failures and exit-139s with no traceback.
Cross-filed with microsoft/mimalloc (instance-isolation angle): microsoft/mimalloc#1327
Minimal repro wheels + lldb transcript available on request. A coexistence canary in Arrow's Python CI (import pyarrow alongside a mimalloc-v3 wheel, assert clean exit) would catch this class before release; we've added the mirror-image canary on our side.
Component(s)
Python
Describe the bug, including details regarding any error messages, version, and platform.
Environment: macOS 15 arm64, CPython 3.14.3 (python.org), pyarrow from PyPI.
kgliteis a PyO3/abi3 Rust extension that statically links mimalloc v3 as its Rust global allocator (a very common Rust-wheel pattern). It links no Arrow code and exports one symbol. Import alone (no pyarrow API use, no kglite↔pyarrow data exchange) arms the crash;ARROW_DEFAULT_MEMORY_POOL=systemdoes not help;os._exit(0)avoids it (teardown-only).Crash:
EXC_BAD_ACCESSinside libarrow's bundled mimalloc (_mi_theap_collect_retired + 124, lldb). Process census via MIMALLOC_VERBOSE: CPython 3.14 vendors mimalloc v3.3.2, the extension carries v3.3.1, libarrow 2400 carries a v2-line copy. Switching the extension's copy to v2 — or downgrading pyarrow to ≤23.0.1 — eliminates the crash; so something introduced in 24.0.0 (bundled-mimalloc bump? teardown/atexit registration change?) makes the pre-existing three-allocator situation fatal.Impact: any Rust wheel shipping a mimalloc-v3 global allocator (the
mimalloccrate defaults to v3 since libmimalloc-sys 0.1.47) can now crash any Python ≥3.13 process it shares with pyarrow 24 — at exit, i.e. flaky-looking CI failures and exit-139s with no traceback.Cross-filed with microsoft/mimalloc (instance-isolation angle): microsoft/mimalloc#1327
Minimal repro wheels + lldb transcript available on request. A coexistence canary in Arrow's Python CI (import pyarrow alongside a mimalloc-v3 wheel, assert clean exit) would catch this class before release; we've added the mirror-image canary on our side.
Component(s)
Python