Skip to content

EXC_BAD_ACCESS in jl_object_id__cold on macOS via (py)juliacall #58475

@mkitti

Description

@mkitti
(python3.13) (base) kittisopikulm@kittisopikulm-wm1 python3.13 % lldb python
(lldb) target create "python"
Current executable set to '/Users/kittisopikulm/.julia/dev/PythonCall/python3.13/.pixi/envs/default/bin/python' (arm64).
(lldb) run
Process 6498 launched: '/Users/kittisopikulm/.julia/dev/PythonCall/python3.13/.pixi/envs/default/bin/python' (arm64)
Python 3.13.3 | packaged by conda-forge | (main, Apr 14 2025, 20:44:30) [Clang 18.1.8 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import juliacall
warning: (arm64) /Users/kittisopikulm/.julia/juliaup/julia-1.11.5+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/Printf/3FQLY_RnzCd.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
warning: (arm64) /Users/kittisopikulm/.julia/juliaup/julia-1.11.5+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/UUIDs/SIw1t_RnzCd.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
warning: (arm64) /Users/kittisopikulm/.julia/juliaup/julia-1.11.5+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/Logging/PWFjL_RnzCd.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
warning: (arm64) /Users/kittisopikulm/.julia/compiled/v1.11/UnsafePointers/FMCLb_LIt2D.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
warning: (arm64) /Users/kittisopikulm/.julia/juliaup/julia-1.11.5+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/Mmap/GDYy0_RnzCd.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
warning: (arm64) /Users/kittisopikulm/.julia/compiled/v1.11/Pidfile/wlmRx_LIt2D.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
warning: (arm64) /Users/kittisopikulm/.julia/compiled/v1.11/Scratch/ICI1U_LIt2D.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
warning: (arm64) /Users/kittisopikulm/.julia/juliaup/julia-1.11.5+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/LazyArtifacts/MRP8l_RnzCd.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
warning: (arm64) /Users/kittisopikulm/.julia/compiled/v1.11/DataValueInterfaces/9Lpkp_LIt2D.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
warning: (arm64) /Users/kittisopikulm/.julia/compiled/v1.11/DataAPI/3a8mN_LIt2D.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
warning: (arm64) /Users/kittisopikulm/.julia/compiled/v1.11/IteratorInterfaceExtensions/N0h8q_LIt2D.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
warning: (arm64) /Users/kittisopikulm/.julia/compiled/v1.11/TableTraits/I6SaN_LIt2D.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
Process 6498 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x100a0)
    frame #0: 0x00000001061636a0 libjulia-internal.1.11.5.dylib`jl_object_id__cold(tv=<unavailable>, v=0x000000015da15840) at builtins.c:441:13 [opt]
Target 0: (python) stopped.
warning: libjulia-internal.1.11.5.dylib was compiled with optimization - stepping may behave oddly; variables may not be available.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x100a0)
  * frame #0: 0x00000001061636a0 libjulia-internal.1.11.5.dylib`jl_object_id__cold(tv=<unavailable>, v=0x000000015da15840) at builtins.c:441:13 [opt]
    frame #1: 0x000000010615cc70 libjulia-internal.1.11.5.dylib`smallintset_rehash(a=0x000000014fea6a50, hash=(libjulia-internal.1.11.5.dylib`idset_hash [inlined] jl_genericmemory_ptr_ref at julia.h:1192:12
libjulia-internal.1.11.5.dylib`idset_hash at idset.c:6:21), data=0x0000000141bd2bd0, newsz=32768, np=<unavailable>) at smallintset.c:218:48 [opt]
    frame #2: 0x000000010615c854 libjulia-internal.1.11.5.dylib`jl_smallintset_insert(pcache=0x000000016fdf9cf8, parent=0x0000000000000000, hash=(libjulia-internal.1.11.5.dylib`idset_hash [inlined] jl_genericmemory_ptr_ref at julia.h:1192:12
libjulia-internal.1.11.5.dylib`idset_hash at idset.c:6:21), val=7115, data=0x0000000141bd2bd0) at smallintset.c:197:13 [opt]
    frame #3: 0x0000000106164468 libjulia-internal.1.11.5.dylib`jl_idset_put_idx(keys=0x0000000141bd2bd0, idxs=0x000000014fea6a50, idx=7115) at idset.c:104:9 [opt]
    frame #4: 0x000000010617de8c libjulia-internal.1.11.5.dylib`jl_as_global_root(val=0x000000015d9bf280, insert=1) at staticdata.c:2548:34 [opt]
    frame #5: 0x00000001061ee43c libjulia-internal.1.11.5.dylib`jl_encode_as_indexed_root(s=0x000000016fdf9fb0, v=0x000000015d9bf280) at ircode.c:108:13 [opt]
    frame #6: 0x00000001061eabf0 libjulia-internal.1.11.5.dylib`jl_encode_value_(s=<unavailable>, v=0x0000000141cd1e50, as_literal=0) at ircode.c:273:13 [opt]
    frame #7: 0x00000001061ee7dc libjulia-internal.1.11.5.dylib`jl_encode_memory_slice(s=0x000000016fdf9fb0, mem=0x000000013fb6f4f0, offset=0, len=<unavailable>) at ircode.c:135:13 [opt]
    frame #8: 0x00000001061eb378 libjulia-internal.1.11.5.dylib`jl_encode_value_(s=<unavailable>, v=0x0000000141d1c250, as_literal=1) at ircode.c:403:9 [opt]
    frame #9: 0x00000001061e9fe0 libjulia-internal.1.11.5.dylib`ijl_compress_ir(m=0x000000015d401f60, code=0x0000000142461600) at ircode.c:866:9 [opt]
    frame #10: 0x000000014bee9f24 sys.dylib`julia_maybe_compress_codeinfo_39899.1 at typeinfer.jl:394
    frame #11: 0x000000014bb7ab00 sys.dylib`julia_CodeInstance_26618.1 at typeinfer.jl:408
    frame #12: 0x000000014c5fd6cc sys.dylib`julia_cache_resultNOT._39908.1 at typeinfer.jl:435
    frame #13: 0x000000014c5fd7a0 sys.dylib`jfptr_cache_resultNOT._39909.1 + 60
    frame #14: 0x000000014bbaccd4 sys.dylib`julia_finish_nocycle_39879.1 at typeinfer.jl:269
    frame #15: 0x000000014bbfb484 sys.dylib`julia__typeinf_39867.1 at typeinfer.jl:249
    frame #16: 0x000000014c5f9594 sys.dylib`julia_typeinf_39819.1 at typeinfer.jl:215
    frame #17: 0x000000014c67bfc4 sys.dylib`julia_typeinf_edge_39988.1 at typeinfer.jl:923
    frame #18: 0x000000014c68a2ac sys.dylib`julia_abstract_call_method_38697.1 at abstractinterpretation.jl:660
    frame #19: 0x000000014bedcc4c sys.dylib`julia_abstract_call_gf_by_type_38516.1 at abstractinterpretation.jl:102
    frame #20: 0x000000014bf6cfa0 sys.dylib`julia_abstract_call_known_39231.1 at abstractinterpretation.jl:2200
    frame #21: 0x000000014c2eb160 sys.dylib`julia_abstract_call_39387.1 at abstractinterpretation.jl:2282
    frame #22: 0x000000014bb7c08c sys.dylib`julia_abstract_call_39402.1 at abstractinterpretation.jl:2275
    frame #23: 0x000000014bf53a54 sys.dylib`julia_abstract_call_39380.1 at abstractinterpretation.jl:2423
    frame #24: 0x000000014c6713a8 sys.dylib`julia_abstract_eval_call_39486.1 at abstractinterpretation.jl:2438
    frame #25: 0x000000014bbe8734 sys.dylib`julia_abstract_eval_statement_expr_39501.1 at abstractinterpretation.jl:2454
    frame #26: 0x000000014c674594 sys.dylib`julia_abstract_eval_statement_39625.1 at abstractinterpretation.jl:2752
    frame #27: 0x000000014c276aa0 sys.dylib`julia_abstract_eval_basic_statement_39691.1 at abstractinterpretation.jl:3068
    frame #28: 0x000000014bf55eb8 sys.dylib`julia_typeinf_local_39762.1 at abstractinterpretation.jl:3331
    frame #29: 0x000000014bbacd40 sys.dylib`julia_typeinf_nocycle_39812.1 at abstractinterpretation.jl:3413
    frame #30: 0x000000014bbfb35c sys.dylib`julia__typeinf_39867.1 at typeinfer.jl:244
    frame #31: 0x000000014c5f9594 sys.dylib`julia_typeinf_39819.1 at typeinfer.jl:215
    frame #32: 0x000000014bbfb9a0 sys.dylib`julia_typeinf_ext_40029.1 at typeinfer.jl:1101
    frame #33: 0x000000014bee143c sys.dylib`julia_typeinf_ext_toplevel_40061.1 at typeinfer.jl:1139
    frame #34: 0x000000014c5f94f0 sys.dylib`julia_typeinf_ext_toplevel_40056.1 at typeinfer.jl:1135
    frame #35: 0x000000014bb76c10 sys.dylib`jfptr_typeinf_ext_toplevel_40057.1 + 64
    frame #36: 0x000000010614d9b4 libjulia-internal.1.11.5.dylib`jl_type_infer [inlined] jl_apply(args=<unavailable>, nargs=3) at julia.h:2157:12 [opt]
    frame #37: 0x000000010614d9a4 libjulia-internal.1.11.5.dylib`jl_type_infer(mi=0x0000000141531b10, world=26727, force=<unavailable>) at gf.c:390:32 [opt]
    frame #38: 0x0000000105ef0aa0 libjulia-codegen.1.11.5.dylib`jl_generate_fptr_impl(mi=0x0000000141531b10, world=26727, did_compile=0x000000016fdfd08c) at jitlayers.cpp:519:19 [opt]
    frame #39: 0x0000000106152b5c libjulia-internal.1.11.5.dylib`jl_compile_method_internal(mi=0x0000000141531b10, world=26727) at gf.c:2536:16 [opt]
    frame #40: 0x0000000106156028 libjulia-internal.1.11.5.dylib`ijl_apply_generic [inlined] _jl_invoke(F=0x000000015d4682a0, args=0x000000016fdfd2f0, nargs=2, mfunc=0x0000000141531b10, world=26727) at gf.c:2940:16 [opt]
    frame #41: 0x0000000106155f84 libjulia-internal.1.11.5.dylib`ijl_apply_generic(F=0x000000015d4682a0, args=0x000000016fdfd2f0, nargs=2) at gf.c:3125:12 [opt]
    frame #42: 0x000000015d1f388c WdXsa_LIt2D.dylib`julia__pyjl_callmethod_9729 at base.jl:67
    frame #43: 0x000000015d1df970 WdXsa_LIt2D.dylib`julia__pyjl_callmethod_9722 at C.jl:63
    frame #44: 0x000000015d229730 WdXsa_LIt2D.dylib`jfptr__pyjl_callmethod_9723 + 108
    frame #45: 0x000000015d22a4d4 WdXsa_LIt2D.dylib`jlcapi__pyjl_callmethod_9817 + 232
    frame #46: 0x00000001000edb10 python`cfunction_call + 352
    frame #47: 0x000000010007ce40 python`_PyObject_MakeTpCall + 340
    frame #48: 0x00000001001fad94 python`_PyEval_EvalFrameDefault + 11428
    frame #49: 0x000000010007dbd4 python`PyObject_Vectorcall + 92
    frame #50: 0x0000000100129314 python`_Py_slot_tp_getattr_hook + 896
    frame #51: 0x00000001000f7388 python`PyObject_GetAttr + 88
    frame #52: 0x0000000100202768 python`_PyEval_EvalFrameDefault + 42616
    frame #53: 0x00000001001f6eac python`PyEval_EvalCode + 308
    frame #54: 0x00000001001f2320 python`builtin_exec + 1756
    frame #55: 0x00000001000ee8bc python`cfunction_vectorcall_FASTCALL_KEYWORDS + 140
    frame #56: 0x00000001001fc064 python`_PyEval_EvalFrameDefault + 16244
    frame #57: 0x000000010007f99c python`object_vacall + 400
    frame #58: 0x000000010007f708 python`PyObject_CallMethodObjArgs + 124
    frame #59: 0x0000000100252828 python`PyImport_ImportModuleLevelObject + 2408
    frame #60: 0x0000000100200f84 python`_PyEval_EvalFrameDefault + 36500
    frame #61: 0x00000001001f6eac python`PyEval_EvalCode + 308
    frame #62: 0x00000001001f2320 python`builtin_exec + 1756
    frame #63: 0x00000001000ee8bc python`cfunction_vectorcall_FASTCALL_KEYWORDS + 140
    frame #64: 0x000000010007dbd4 python`PyObject_Vectorcall + 92
    frame #65: 0x00000001001fad94 python`_PyEval_EvalFrameDefault + 11428
    frame #66: 0x00000001001f6eac python`PyEval_EvalCode + 308
    frame #67: 0x00000001001f2320 python`builtin_exec + 1756
    frame #68: 0x00000001000ee8bc python`cfunction_vectorcall_FASTCALL_KEYWORDS + 140
    frame #69: 0x000000010007dbd4 python`PyObject_Vectorcall + 92
    frame #70: 0x00000001001fad94 python`_PyEval_EvalFrameDefault + 11428
    frame #71: 0x00000001002b7980 python`pymain_run_module + 288
    frame #72: 0x00000001002b8514 python`pymain_run_stdin + 908
    frame #73: 0x00000001002b774c python`Py_RunMain + 2880
    frame #74: 0x00000001002b9164 python`pymain_main + 716
    frame #75: 0x00000001000047c8 python`main + 56
    frame #76: 0x000000018132ffd8 dyld`start + 2412

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions