-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad interaction between PyCall and Metal #500
Comments
Also happens with PythonCall instead of PyCall. MWE: $ julia --startup-file=no -e'using Pkg; Pkg.activate(temp=true); Pkg.add("Python_jll"); Pkg.add("PyCall"); using Python_jll, PyCall' |
Spent a bit looking into this and I have no idea where this should even be reported. Looking at the stacktrace, it seems like at some point the PyCall libpython dylib switches over to using the Python_jll dylib even if they're loaded into different modules (don't know if that's expected). It also crashes similarly with PythonCall so maybe it's a python issue? It could also be with how Python_jll initializes things. PythonCall Stacktrace
|
Seems like we try to load libPython 3.10 and 3.12. So we could just close our older Python dylib provided by Python_jll since we don't actually use it: # /Users/tim/Developer/Metal.jl/src/initialization.jl:47
Libdl.dlclose(Python_jll.libpython_handle)
# ... # Loaded libraries for Metal and PyCall:
julia> using Metal
dyld[88353]: <4C4C44CD-5555-3144-A157-48DD45CEDC51> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/Serialization/zGad9_3gH4d.dylib
dyld[88353]: <4C4C4412-5555-3144-A130-C8E8F3869C36> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/Printf/3FQLY_3gH4d.dylib
dyld[88353]: <4C4C4448-5555-3144-A157-5D817AFDA47B> /Users/tim/.julia/compiled/v1.11/Adapt/rUIgN_xImsA.dylib
dyld[88353]: <4C4C44FA-5555-3144-A157-0FEDFF5FDFDC> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/Dates/p8See_3gH4d.dylib
dyld[88353]: <4C4C444E-5555-3144-A15B-37C9CF3E913F> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/TOML/mjrwE_3gH4d.dylib
dyld[88353]: <4C4C440C-5555-3144-A180-C3CDB774DB75> /Users/tim/.julia/compiled/v1.11/Preferences/pWSk8_xImsA.dylib
dyld[88353]: <4C4C441D-5555-3144-A183-08E11183AF75> /Users/tim/.julia/compiled/v1.11/CEnum/0gyUJ_xImsA.dylib
dyld[88353]: <4C4C447D-5555-3144-A17E-7B07BA279AC6> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/NetworkOptions/J8H6s_3gH4d.dylib
dyld[88353]: <4C4C4408-5555-3144-A1B3-CF7844998013> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/MbedTLS_jll/u5NEn_3gH4d.dylib
dyld[88353]: <E5135FC9-EC24-36D7-A34B-4EF04FE9654C> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/lib/julia/libmbedcrypto.2.28.6.dylib
dyld[88353]: <D8A279E5-9BEB-3297-B05F-E4CB4E66D0EF> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/lib/julia/libmbedtls.2.28.6.dylib
dyld[88353]: <44D83F27-1DD6-3634-9C33-CAE496C3B0E3> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/lib/julia/libmbedx509.2.28.6.dylib
dyld[88353]: <4C4C44AA-5555-3144-A1D8-99411948003E> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/LibSSH2_jll/K6mup_3gH4d.dylib
dyld[88353]: <C32F35F6-0366-3BB1-9D0A-A21A71A13BFB> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/lib/julia/libssh2.1.0.1.dylib
dyld[88353]: <4C4C44AA-5555-3144-A1A4-8FBF998F4FD5> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/LibGit2_jll/nfCpg_3gH4d.dylib
dyld[88353]: <01A81F1B-3DAC-3154-9D73-477CBE9E32B1> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/lib/julia/libgit2.1.7.2.dylib
dyld[88353]: <4C4C441B-5555-3144-A141-163AB9FAA3AC> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/LibGit2/xrYJZ_3gH4d.dylib
dyld[88353]: <4C4C442D-5555-3144-A127-EE47C6A1834A> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/ArgTools/aGHFV_3gH4d.dylib
dyld[88353]: <4C4C44CA-5555-3144-A151-D24F1CD5B31A> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/nghttp2_jll/KTGSA_3gH4d.dylib
dyld[88353]: <05FE8589-5CC7-3EF7-8C1E-125E0C6793D3> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/lib/julia/libnghttp2.14.dylib
dyld[88353]: <4C4C447E-5555-3144-A1CE-3C2825647817> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/LibCURL_jll/9JWaY_3gH4d.dylib
dyld[88353]: <4FA6C897-3127-39C1-8BD9-7F0FAB4ABB8A> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/lib/julia/libcurl.4.dylib
dyld[88353]: <4C4C4462-5555-3144-A13D-2D038F473518> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/MozillaCACerts_jll/XKIUi_3gH4d.dylib
dyld[88353]: <4C4C44D2-5555-3144-A15D-CAFEF741E5C1> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/LibCURL/ht49g_3gH4d.dylib
dyld[88353]: <4C4C4444-5555-3144-A19E-F3745CE64DFC> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/Downloads/eiA4B_3gH4d.dylib
dyld[88353]: <4C4C44F9-5555-3144-A101-796E153890A3> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/Tar/G9ZYP_3gH4d.dylib
dyld[88353]: <4C4C44BF-5555-3144-A1C4-752D9094A760> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/p7zip_jll/dfuGM_3gH4d.dylib
dyld[88353]: <4C4C44DF-5555-3144-A1BB-25AEAFEC09CC> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/UUIDs/SIw1t_3gH4d.dylib
dyld[88353]: <4C4C4438-5555-3144-A194-0FC966C30923> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/Logging/PWFjL_3gH4d.dylib
dyld[88353]: <4C4C44B6-5555-3144-A145-3AD6DF2826DA> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/Pkg/tUTdb_3gH4d.dylib
dyld[88353]: <4C4C447A-5555-3144-A1F5-D6F5494AD973> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/LazyArtifacts/MRP8l_3gH4d.dylib
dyld[88353]: <4C4C44D8-5555-3144-A145-8258B68B6E5E> /Users/tim/.julia/compiled/v1.11/JLLWrappers/7Zgw7_xImsA.dylib
dyld[88353]: <4C4C445D-5555-3144-A121-DB758F6DED89> /Users/tim/.julia/compiled/v1.11/LLVMExtra_jll/R9OeX_xImsA.dylib
dyld[88353]: <4C4C4400-5555-3144-A19B-2E9B17B6ACC3> /Users/tim/.julia/compiled/v1.11/LLVM/e8NBy_xImsA.dylib
dyld[88353]: <4C4C4493-5555-3144-A1CB-BD451305F445> /Users/tim/.julia/compiled/v1.11/Reexport/bTpYr_xImsA.dylib
dyld[88353]: <4C4C4475-5555-3144-A1C0-F2D54E0EC8EB> /Users/tim/.julia/compiled/v1.11/GPUArraysCore/qiYUe_xImsA.dylib
dyld[88353]: <4C4C448F-5555-3144-A181-57F3BA4F82B6> /Users/tim/.julia/compiled/v1.11/Statistics/ERcPL_xImsA.dylib
dyld[88353]: <4C4C44A7-5555-3144-A116-48AA33BD1118> /Users/tim/.julia/compiled/v1.11/GPUArrays/v5u0T_xImsA.dylib
dyld[88353]: <4C4C446A-5555-3144-A1A7-7896776EB3EA> /Users/tim/.julia/compiled/v1.11/ExprTools/eM8wu_xImsA.dylib
dyld[88353]: <4C4C44C8-5555-3144-A194-785C7B80E215> /Users/tim/.julia/compiled/v1.11/TimerOutputs/hd2yD_xImsA.dylib
dyld[88353]: <4C4C4466-5555-3144-A12B-6EE576FFFB94> /Users/tim/.julia/compiled/v1.11/Scratch/ICI1U_xImsA.dylib
dyld[88353]: <4C4C44DE-5555-3144-A1B7-D78485ECDF4D> /Users/tim/.julia/compiled/v1.11/PrecompileTools/AQ9Mk_xImsA.dylib
dyld[88353]: <4C4C4484-5555-3144-A132-C96573D52E0E> /Users/tim/.julia/compiled/v1.11/GPUCompiler/yPwef_xImsA.dylib
dyld[88353]: <4C4C444D-5555-3144-A110-1642CB863428> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/Zlib_jll/xjq3Q_3gH4d.dylib
dyld[88353]: <4C4C44F8-5555-3144-A165-19A10A7CBF61> /Users/tim/.julia/compiled/v1.11/LLVMDowngrader_jll/f1OYk_xImsA.dylib
dyld[88353]: <4C4C44DB-5555-3144-A1F4-1FD6F82E384A> /Users/tim/.julia/compiled/v1.11/Expat_jll/4P57b_xImsA.dylib
dyld[88353]: <4C4C4436-5555-3144-A1A8-EEC6C7DA340F> /Users/tim/.julia/artifacts/becfd6f89f1a272ace2375b067f1153515ca70b3/lib/libexpat.1.10.0.dylib
dyld[88353]: <4C4C4460-5555-3144-A112-90D9717E1983> /Users/tim/.julia/compiled/v1.11/Bzip2_jll/biC9V_xImsA.dylib
dyld[88353]: <4C4C44DA-5555-3144-A1B3-236DE9FE39CC> /Users/tim/.julia/artifacts/73674ecf50f470c8706f958c9b6b1c5f2106ad71/lib/libbz2.1.0.8.dylib
dyld[88353]: <4C4C44B7-5555-3144-A146-27205DDE6482> /Users/tim/.julia/compiled/v1.11/Libffi_jll/y4lM8_xImsA.dylib
dyld[88353]: <4C4C444B-5555-3144-A124-F76E705DAB56> /Users/tim/.julia/artifacts/5b90ad21b4b1af3a9446241fb5afe3e3b3eda941/lib/libffi.6.dylib
dyld[88353]: <4C4C44D8-5555-3144-A1D7-64F93C04421F> /Users/tim/.julia/compiled/v1.11/SQLite_jll/RKhY6_xImsA.dylib
dyld[88353]: <4C4C447D-5555-3144-A1CA-26C280BAC982> /Users/tim/.julia/artifacts/5148429af2bf0b9311f7f3a9f684a33821187f42/lib/libsqlite3.0.dylib
dyld[88353]: <4C4C44EB-5555-3144-A127-D03C1F2F9403> /Users/tim/.julia/compiled/v1.11/LibMPDec_jll/toPXN_xImsA.dylib
dyld[88353]: <7A23AFED-8B84-366D-8D81-CC56ADC23818> /Users/tim/.julia/artifacts/94adb8c569de1740de973b018000afedf54f17c0/lib/libmpdec.2.5.1.dylib
dyld[88353]: <4C4C4480-5555-3144-A1F6-4BBCCC27BB02> /Users/tim/.julia/compiled/v1.11/XZ_jll/uX93p_xImsA.dylib
dyld[88353]: <4C4C44D9-5555-3144-A1BA-58602BDB65C1> /Users/tim/.julia/artifacts/0502fc8d9d40c3f989375aa55d294358bef74537/lib/liblzma.5.dylib
dyld[88353]: <4C4C4474-5555-3144-A112-0D0153ABA376> /Users/tim/.julia/compiled/v1.11/OpenSSL_jll/M3X35_xImsA.dylib
dyld[88353]: <4C4C4425-5555-3144-A1DB-BD55BA53C62B> /Users/tim/.julia/artifacts/f7d4ded8121147b1c95fd800dc34f9cf0f96c9ed/lib/libcrypto.3.dylib
dyld[88353]: <4C4C4472-5555-3144-A198-0AF3F1C6CEA9> /Users/tim/.julia/artifacts/f7d4ded8121147b1c95fd800dc34f9cf0f96c9ed/lib/libssl.3.dylib
dyld[88353]: <4C4C4443-5555-3144-A140-7ED1F0423FF5> /Users/tim/.julia/compiled/v1.11/Python_jll/vTS36_xImsA.dylib
dyld[88353]: <4C4C4436-5555-3144-A146-787071B3065C> /Users/tim/.julia/artifacts/34701ab16d39e21aead9243740946a1b34a1cd3a/lib/libpython3.10.dylib
dyld[88353]: <4C4C44BA-5555-3144-A15F-06E3243D2CC6> /Users/tim/.julia/compiled/v1.11/StructIO/aDnIf_xImsA.dylib
dyld[88353]: <4C4C44DE-5555-3144-A1F4-44ADF38DCD21> /Users/tim/.julia/compiled/v1.11/ObjectFile/iQ45I_xImsA.dylib
dyld[88353]: <4C4C4447-5555-3144-A101-0696073E68CA> /Users/tim/.julia/compiled/v1.11/ObjectiveC/fLhpC_xImsA.dylib
dyld[88353]: <4C4C4426-5555-3144-A1C5-897AEA5C836A> /Users/tim/.julia/compiled/v1.11/UnsafeAtomics/OuhNJ_xImsA.dylib
dyld[88353]: <4C4C44F9-5555-3144-A159-3EE248C18953> /Users/tim/.julia/compiled/v1.11/Atomix/3LdQ4_xImsA.dylib
dyld[88353]: <4C4C4480-5555-3144-A12E-2579F6A57EC9> /Users/tim/.julia/compiled/v1.11/MacroTools/38lnR_xImsA.dylib
dyld[88353]: <4C4C443B-5555-3144-A14F-3746F8DF75EA> /Users/tim/.julia/compiled/v1.11/StaticArraysCore/Tzw28_xImsA.dylib
dyld[88353]: <4C4C445D-5555-3144-A12C-7661BBA48191> /Users/tim/.julia/compiled/v1.11/StaticArrays/yY9vm_xImsA.dylib
dyld[88353]: <4C4C44F1-5555-3144-A172-BF745E436175> /Users/tim/.julia/compiled/v1.11/AdaptStaticArraysExt/9bCdf_xImsA.dylib
dyld[88353]: <4C4C4413-5555-3144-A1EC-090B16A49042> /Users/tim/.julia/compiled/v1.11/KernelAbstractions/aywHT_xImsA.dylib
dyld[88353]: <4C4C449A-5555-3144-A1F2-66FE82725D35> /Users/tim/.julia/compiled/v1.11/UnsafeAtomicsLLVM/yk2PZ_xImsA.dylib
dyld[88353]: <4C4C440E-5555-3144-A1D8-F52466E9D1E2> /Users/tim/.julia/compiled/v1.11/StaticArraysStatisticsExt/EfhbW_xImsA.dylib
dyld[88353]: <4C4C44D8-5555-3144-A193-200F87B7A655> /Users/tim/.julia/compiled/v1.11/LinearAlgebraExt/1TyTB_xImsA.dylib
dyld[88353]: <4C4C445C-5555-3144-A1F1-0155B1C290EA> /Users/tim/.julia/compiled/v1.11/TranscodingStreams/eJQ7D_xImsA.dylib
dyld[88353]: <4C4C443D-5555-3144-A1F1-98E9375D9853> /Users/tim/.julia/compiled/v1.11/CodecBzip2/5pIlR_xImsA.dylib
dyld[88353]: <4C4C44CF-5555-3144-A196-CB8690D82267> /Users/tim/.julia/compiled/v1.11/Metal/ACDsk_xImsA.dylib
dyld[88353]: <4C4C44FF-5555-3144-A1CE-064A732FB757> /Users/tim/.julia/compiled/v1.11/AtomixMetalExt/xK3tW_xImsA.dylib
julia> using PyCall
dyld[88353]: <4C4C44B3-5555-3144-A10C-35194FC54BBC> /Users/tim/.julia/compiled/v1.11/VersionParsing/VBbTm_xImsA.dylib
dyld[88353]: <4C4C4478-5555-3144-A181-10E77D6764AD> /Users/tim/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/Mmap/GDYy0_3gH4d.dylib
dyld[88353]: <4C4C4416-5555-3144-A1BC-7A775E43202F> /Users/tim/.julia/compiled/v1.11/Parsers/833b9_xImsA.dylib
dyld[88353]: <4C4C44CF-5555-3144-A1A4-3F3E0F079877> /Users/tim/.julia/compiled/v1.11/JSON/uf6oy_xImsA.dylib
dyld[88353]: <4C4C44B8-5555-3144-A1C4-B8C16FA23314> /Users/tim/.julia/compiled/v1.11/Conda/WZE3U_xImsA.dylib
dyld[88353]: <4C4C44D3-5555-3144-A180-FF5185576472> /Users/tim/.julia/compiled/v1.11/PyCall/GkzkC_xImsA.dylib
dyld[88353]: <8D04578A-92F0-32FF-A57E-874CA5A15CFB> /Users/tim/.julia/conda/3/aarch64/lib/libpython3.12.dylib
dyld[88353]: <C7ED4B31-F8EF-3455-803F-95DA85D38821> /Users/tim/.julia/conda/3/aarch64/lib/python3.12/lib-dynload/_opcode.cpython-312-darwin.so
dyld[88353]: libpython3.10.dylib has weak-def (or flat lookup) symbol used by _opcode.cpython-312-darwin.so, so cannot be delayed |
We should probably get rid of |
I opened #512. Once resolved for us we should probably figure out where to transfer this issue to. |
Dear all,
I found the following combination of package loading makes julia segfault. In a fresh new environment
then
Versioninfo
Note that inverting the package loading order does not trigger any segfault (i.e.
using PyCall, Metal
is ok)xref
Metal's versioninfo
The text was updated successfully, but these errors were encountered: