Skip to content

Build failure: python313Packages.pyarrow on darwin - possible python bug malloc error #461396

Closed

Description

@mio-aotearoa

Nixpkgs version

  • Unstable (25.11)

Steps to reproduce

nix build .#python313Packages.pyarrow

Can Hydra reproduce this build failure?

Hydra doesn’t try to build the package.

Link to Hydra build job

No response

Relevant log output

nix build .#python313Packages.pyarrow
error: Cannot build '/nix/store/6agsxcc7ifxlxskb6jmz97pbbmnp741f-python3.13-pyarrow-20.0.0.drv'.
       Reason: builder failed with exit code 134.
       Output paths:
         /nix/store/3ciy9xr7sh2qmm5ssrmax03nfw9sxavh-python3.13-pyarrow-20.0.0
         /nix/store/kmxbsh1vzhv31z4hxj1751kd6ncahram-python3.13-pyarrow-20.0.0-dist
       Last 25 log lines:
       > Running phase: installPhase
       > Executing pypaInstallPhase
       > Successfully installed pyarrow-20.0.0-cp313-cp313-macosx_14_0_arm64.whl
       > Finished executing pypaInstallPhase
       > Running phase: pythonOutputDistPhase
       > Executing pythonOutputDistPhase
       > Finished executing pythonOutputDistPhase
       > Running phase: fixupPhase
       > checking for references to /nix/var/nix/builds/nix-5740-3076103686/ in /nix/store/3ciy9xr7sh2qmm5ssrmax03nfw9sxavh-python3.13-pyarrow-20.0.0...
       > patching script interpreter paths in /nix/store/3ciy9xr7sh2qmm5ssrmax03nfw9sxavh-python3.13-pyarrow-20.0.0
       > stripping (with command strip and flags -S) in  /nix/store/3ciy9xr7sh2qmm5ssrmax03nfw9sxavh-python3.13-pyarrow-20.0.0/lib
       > checking for references to /nix/var/nix/builds/nix-5740-3076103686/ in /nix/store/kmxbsh1vzhv31z4hxj1751kd6ncahram-python3.13-pyarrow-20.0.0-dist...
       > patching script interpreter paths in /nix/store/kmxbsh1vzhv31z4hxj1751kd6ncahram-python3.13-pyarrow-20.0.0-dist
       > Executing pythonRemoveTestsDir
       > Finished executing pythonRemoveTestsDir
       > Running phase: installCheckPhase
       > no Makefile or custom installCheckPhase, doing nothing
       > Running phase: pythonCatchConflictsPhase
       > Running phase: pythonRemoveBinBytecodePhase
       > Running phase: pythonImportsCheckPhase
       > Executing pythonImportsCheckPhase
       > Check whether the following modules can be imported: pyarrow pyarrow.compute pyarrow.csv pyarrow.dataset pyarrow.feather pyarrow.flight pyarrow.fs pyarrow.json pyarrow.orc pyarrow.parquet
       > python3.13(9980,0x1fba16240) malloc: *** error for object 0x103902de0: pointer being freed was not allocated
       > python3.13(9980,0x1fba16240) malloc: *** set a breakpoint in malloc_error_break to debug
       > /nix/store/cl3z8l3pja2pxcrmvqbwx13x7wbfd94d-python-imports-check-hook.sh/nix-support/setup-hook: line 6:  9980 Abort trap: 6              ( cd "$pythonImportsCheckOutput" && /nix/store/hv7qldswrqvg1sjys1lmgjg875hkffng-python3-3.13.9/bin/python3.13 -c 'import sys; import importlib; list(map(lambda mod: importlib.import_module(mod), sys.argv[1:]))' ${pythonImportsCheck[*]} )
       For full logs, run:
         nix log /nix/store/6agsxcc7ifxlxskb6jmz97pbbmnp741f-python3.13-pyarrow-20.0.0.drv

Additional context

git log|head
commit a603d123fc44af98e868e83f56cfc450b46aac73
Merge: 5f36aef8969a 26e836795048
Author: Aaron Andersen <[email protected]>
Date:   Thu Nov 13 17:59:44 2025 -0500

    zzz: init at 0.2.0 (#460833)

System metadata

  • system: "aarch64-darwin"
  • host os: Darwin 24.6.0, macOS 15.7.3
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 2.31.2
  • nixpkgs: /nix/store/yff8cp4mrjrf71i1g9llxqpip8a6sfyj-source

Notify maintainers

@veprbl @cpcloud @mweinelt @natsukium


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Activity

  1. sarahec commented on Nov 14, 2025

    @sarahec
    Contributor

    From other discussions, protobuf is the likely culprit. There are three different versions in the pyarrow closure.

    looking at the pyarrow package there is three protobuf versions in its transitive closure
    30 via apache-orc (via arrow-cpp)
    31 via arrow-cpp (pinned in arrow-cpp)
    33 via grpc (via arrow-cpp)

    Here's the stack trace:

    Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
    0   libsystem_kernel.dylib        	       0x18425f5b0 __pthread_kill + 8
    1   libsystem_pthread.dylib       	       0x184299888 pthread_kill + 296
    2   libsystem_c.dylib             	       0x18419e850 abort + 124
    3   libsystem_malloc.dylib        	       0x18409d224 malloc_vreport + 892
    4   libsystem_malloc.dylib        	       0x1840a0f78 malloc_report + 64
    5   libsystem_malloc.dylib        	       0x1840a5e04 ___BUG_IN_CLIENT_OF_LIBMALLOC_POINTER_BEING_FREED_WAS_NOT_ALLOCATED + 76
    6   libprotobuf.33.0.0.dylib      	       0x114c6d610 google::protobuf::FileOptions::SharedDtor(google::protobuf::MessageLite&) + 152
    7   libprotobuf.33.0.0.dylib      	       0x114c61828 google::protobuf::FileDescriptorProto::SharedDtor(google::protobuf::MessageLite&) + 68
    8   libprotobuf.33.0.0.dylib      	       0x114c618a8 google::protobuf::FileDescriptorProto::~FileDescriptorProto() + 20
    9   libprotobuf.33.0.0.dylib      	       0x114c7f190 google::protobuf::EncodedDescriptorDatabase::Add(void const*, int) + 112
    10  libprotobuf.33.0.0.dylib      	       0x114c11090 google::protobuf::DescriptorPool::InternalAddGeneratedFile(void const*, int) + 104
    11  libprotobuf.33.0.0.dylib      	       0x114cd26a4 google::protobuf::internal::AddDescriptors(google::protobuf::internal::DescriptorTable const*) + 148
    12  dyld                          	       0x183eeecb0 invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 444
    13  dyld                          	       0x183f2c730 invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 324
    14  dyld                          	       0x183f4b534 invocation function for block in mach_o::Header::forEachSection(void (mach_o::Header::SectionInfo const&, bool&) block_pointer) const + 312
    15  dyld                          	       0x183f48158 mach_o::Header::forEachLoadCommand(void (load_command const*, bool&) block_pointer) const + 208
    16  dyld                          	       0x183f499f0 mach_o::Header::forEachSection(void (mach_o::Header::SectionInfo const&, bool&) block_pointer) const + 124
    17  dyld                          	       0x183f2c220 dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 516
    18  dyld                          	       0x183eeea68 dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 172
    19  dyld                          	       0x183ef68b0 dyld4::JustInTimeLoader::runInitializers(dyld4::RuntimeState&) const + 36
    20  dyld                          	       0x183eef214 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const + 308
    21  dyld                          	       0x183eef1b4 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const + 212
    22  dyld                          	       0x183eef1b4 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const + 212
    23  dyld                          	       0x183eef1b4 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const + 212
    24  dyld                          	       0x183eef1b4 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const + 212
    25  dyld                          	       0x183ef3e50 dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator()() const + 180
    26  dyld                          	       0x183eef530 dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 716
    27  dyld                          	       0x183f13ad0 dyld4::APIs::dlopen_from(char const*, int, void*)::$_0::operator()() const + 1856
    28  dyld                          	       0x183f0836c dyld4::APIs::dlopen_from(char const*, int, void*) + 1104
    29  dyld                          	       0x183f07e70 dyld4::APIs::dlopen(char const*, int) + 128
    30  libpython3.13.dylib           	       0x10340d2f0 _PyImport_FindSharedFuncptr + 324
    31  libpython3.13.dylib           	       0x1033a0af4 _PyImport_GetModInitFunc + 56
    32  libpython3.13.dylib           	       0x10339f46c _imp_create_dynamic + 500
    33  libpython3.13.dylib           	       0x103206d54 cfunction_vectorcall_FASTCALL + 280
    34  libpython3.13.dylib           	       0x103336eb0 _PyEval_EvalFrameDefault + 13948
    35  libpython3.13.dylib           	       0x103183dc4 object_vacall + 428
    36  libpython3.13.dylib           	       0x103183ac4 PyObject_CallMethodObjArgs + 124
    37  libpython3.13.dylib           	       0x10339a164 PyImport_ImportModuleLevelObject + 3048
    38  libpython3.13.dylib           	       0x10333c2c8 _PyEval_EvalFrameDefault + 35476
    39  libpython3.13.dylib           	       0x103333328 PyEval_EvalCode + 308
    40  libpython3.13.dylib           	       0x10332dd48 builtin_exec + 1888
    41  libpython3.13.dylib           	       0x103206e68 cfunction_vectorcall_FASTCALL_KEYWORDS + 148
    42  libpython3.13.dylib           	       0x103336eb0 _PyEval_EvalFrameDefault + 13948
    43  libpython3.13.dylib           	       0x103329288 map_next + 260
    44  libpython3.13.dylib           	       0x1031cb614 list_extend_iter_lock_held + 316
    45  libpython3.13.dylib           	       0x1031c9d78 list_vectorcall + 488
    46  libpython3.13.dylib           	       0x103181c98 PyObject_Vectorcall + 92
    47  libpython3.13.dylib           	       0x103335f18 _PyEval_EvalFrameDefault + 9956
    48  libpython3.13.dylib           	       0x103333328 PyEval_EvalCode + 308
    49  libpython3.13.dylib           	       0x1033d9df4 run_eval_code_obj + 268
    50  libpython3.13.dylib           	       0x1033d96cc run_mod + 384
    51  libpython3.13.dylib           	       0x1033d5bbc _PyRun_SimpleStringFlagsWithName + 544
    52  libpython3.13.dylib           	       0x10340de9c Py_RunMain + 2184
    53  libpython3.13.dylib           	       0x10340e590 pymain_main + 756
    54  libpython3.13.dylib           	       0x10340e69c Py_BytesMain + 60
    55  dyld                          	       0x183ed1d54 start + 7184
  2. sarahec commented on Nov 14, 2025

    @sarahec
    Contributor

    I believe @GaetanLepage is working on this.

  3. thunze commented on Nov 14, 2025

    @thunze
    Member

    Relevant PRs: #461569, #461572

  4. sarahec commented on Nov 15, 2025

    @sarahec
    Contributor

    Fixes in #461569 and #461572 but they rebuild enough packages that they're in staging.

  5. towry commented on Nov 19, 2025

    @towry
  6. GaetanLepage commented on Dec 4, 2025

    @GaetanLepage
    Contributor

    Now building fine.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: build failure

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions