Bad interaction of Metal.jl and PyPlot on julia 1.11.2

Dearests,

Still fighting to test the GPU on my new macbook pro M4.

Fresh new environment on version 1.11.2

(TEST_PYPLOT) pkg> add Metal, PyPlot
(TEST_PYPLOT) pkg> add Metal, PyPlot
   Resolving package versions...
    Updating `~/SCRA/PKG/TEST_PYPLOT/Project.toml`
  [dde4c033] + Metal v1.4.2
  [d330b81b] + PyPlot v2.11.5
    Updating `~/SCRA/PKG/TEST_PYPLOT/Manifest.toml`
  [79e6a3ab] + Adapt v4.1.1
  [a9b6321e] + Atomix v1.0.1
  [fa961155] + CEnum v0.5.0
  [523fee87] + CodecBzip2 v0.8.4
⌅ [3da002f7] + ColorTypes v0.11.5
⌅ [5ae59095] + Colors v0.12.11
  [8f4d0f93] + Conda v1.10.2
  [e2ba6199] + ExprTools v0.1.10
  [53c48c17] + FixedPointNumbers v0.8.5
⌅ [0c68f7d7] + GPUArrays v10.3.1
⌅ [46192b85] + GPUArraysCore v0.1.6
⌅ [61eb1bfa] + GPUCompiler v0.27.8
  [692b3bcd] + JLLWrappers v1.6.1
  [682c06a0] + JSON v0.21.4
  [63c18a36] + KernelAbstractions v0.9.31
  [929cbde3] + LLVM v9.1.3
  [b964fa9f] + LaTeXStrings v1.4.0
  [1914dd2f] + MacroTools v0.5.13
  [dde4c033] + Metal v1.4.2
  [d8793406] + ObjectFile v0.4.2
  [e86c9b32] + ObjectiveC v3.1.0
  [69de0a69] + Parsers v2.8.1
  [aea7be01] + PrecompileTools v1.2.1
  [21216c6a] + Preferences v1.4.3
  [438e738f] + PyCall v1.96.4
  [d330b81b] + PyPlot v2.11.5
  [189a3867] + Reexport v1.2.2
  [ae029012] + Requires v1.3.0
  [6c6a2e73] + Scratch v1.2.1
  [90137ffa] + StaticArrays v1.9.8
  [1e83bf80] + StaticArraysCore v1.4.3
  [10745b16] + Statistics v1.11.1
  [53d494c1] + StructIO v0.3.1
  [a759f4b9] + TimerOutputs v0.5.26
  [3bb67fe8] + TranscodingStreams v0.11.3
  [013be700] + UnsafeAtomics v0.2.1
  [81def892] + VersionParsing v1.3.0
  [6e34b625] + Bzip2_jll v1.0.8+2
  [2e619515] + Expat_jll v2.6.4+1
⌅ [f52de702] + LLVMDowngrader_jll v0.3.0+2
  [dad2f222] + LLVMExtra_jll v0.0.34+0
  [7106de7a] + LibMPDec_jll v2.5.1+0
⌅ [e9f186c6] + Libffi_jll v3.2.2+1
  [458c3c95] + OpenSSL_jll v3.0.15+1
  [93d3a430] + Python_jll v3.10.14+0
  [76ed43ae] + SQLite_jll v3.47.2+0
  [ffd25f8a] + XZ_jll v5.6.3+0
  [0dad84c5] + ArgTools v1.1.2
  [56f22d72] + Artifacts v1.11.0
  [2a0f44e3] + Base64 v1.11.0
  [ade2ca70] + Dates v1.11.0
  [f43a241f] + Downloads v1.6.0
  [7b1f6079] + FileWatching v1.11.0
  [b77e0a4c] + InteractiveUtils v1.11.0
  [4af54fe1] + LazyArtifacts v1.11.0
  [b27032c2] + LibCURL v0.6.4
  [76f85450] + LibGit2 v1.11.0
  [8f399da3] + Libdl v1.11.0
  [37e2e46d] + LinearAlgebra v1.11.0
  [56ddb016] + Logging v1.11.0
  [d6f4376e] + Markdown v1.11.0
  [a63ad114] + Mmap v1.11.0
  [ca575930] + NetworkOptions v1.2.0
  [44cfe95a] + Pkg v1.11.0
  [de0858da] + Printf v1.11.0
  [9a3f8284] + Random v1.11.0
  [ea8e919c] + SHA v0.7.0
  [9e88b42a] + Serialization v1.11.0
  [6462fe0b] + Sockets v1.11.0
  [fa267f1f] + TOML v1.0.3
  [a4e569a6] + Tar v1.10.0
  [8dfed614] + Test v1.11.0
  [cf7118a7] + UUIDs v1.11.0
  [4ec0a83e] + Unicode v1.11.0
  [e66e0078] + CompilerSupportLibraries_jll v1.1.1+0
  [deac9b47] + LibCURL_jll v8.6.0+0
  [e37daf67] + LibGit2_jll v1.7.2+0
  [29816b5a] + LibSSH2_jll v1.11.0+1
  [c8ffd9c3] + MbedTLS_jll v2.28.6+0
  [14a3606d] + MozillaCACerts_jll v2023.12.12
  [4536629a] + OpenBLAS_jll v0.3.27+1
  [83775a58] + Zlib_jll v1.2.13+1
  [8e850b90] + libblastrampoline_jll v5.11.0+0
  [8e850ede] + nghttp2_jll v1.59.0+0
  [3f19e933] + p7zip_jll v17.4.0+2
        Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`

then

julia> using Metal, PyPlot

[71240] signal 11 (2): Segmentation fault: 11
in expression starting at REPL[2]:1
new_dict at /Users/pagnani/.julia/artifacts/34701ab16d39e21aead9243740946a1b34a1cd3a/lib/libpython3.10.dylib (unknown line)
PyType_Ready at /Users/pagnani/.julia/artifacts/34701ab16d39e21aead9243740946a1b34a1cd3a/lib/libpython3.10.dylib (unknown line)
PyModuleDef_Init at /Users/pagnani/.julia/artifacts/34701ab16d39e21aead9243740946a1b34a1cd3a/lib/libpython3.10.dylib (unknown line)
_PyImport_LoadDynamicModuleWithSpec at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
_imp_create_dynamic at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
cfunction_vectorcall_FASTCALL at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
_PyEval_EvalFrameDefault at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
object_vacall at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
PyObject_CallMethodObjArgs at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
PyImport_ImportModuleLevelObject at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
_PyEval_EvalFrameDefault at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
PyEval_EvalCode at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
builtin_exec at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
cfunction_vectorcall_FASTCALL_KEYWORDS at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
_PyEval_EvalFrameDefault at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
object_vacall at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
PyObject_CallMethodObjArgs at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
PyImport_ImportModuleLevelObject at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
_PyEval_EvalFrameDefault at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
PyEval_EvalCode at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
builtin_exec at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
cfunction_vectorcall_FASTCALL_KEYWORDS at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
_PyEval_EvalFrameDefault at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
object_vacall at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
PyObject_CallMethodObjArgs at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
PyImport_ImportModuleLevelObject at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
_PyEval_EvalFrameDefault at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
PyEval_EvalCode at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
builtin_exec at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
cfunction_vectorcall_FASTCALL_KEYWORDS at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
_PyEval_EvalFrameDefault at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
object_vacall at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
PyObject_CallMethodObjArgs at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
PyImport_ImportModuleLevelObject at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
builtin___import__ at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
cfunction_vectorcall_FASTCALL_KEYWORDS at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
_PyObject_CallFunctionVa at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
PyObject_CallFunction at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
PyImport_Import at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
PyImport_ImportModule at /Users/pagnani/.julia/conda/3/aarch64/lib/libpython3.12.dylib (unknown line)
jlplt_PyImport_ImportModule_6339 at /Users/pagnani/.julia/compiled/v1.11/PyCall/GkzkC_YXJ8w.dylib (unknown line)
_pyimport at /Users/pagnani/.julia/packages/PyCall/1gn3u/src/PyCall.jl:483
pyimport at /Users/pagnani/.julia/packages/PyCall/1gn3u/src/PyCall.jl:507
__init__ at /Users/pagnani/.julia/packages/PyCall/1gn3u/src/pyinit.jl:207
unknown function (ip: 0x124de651b)
jl_apply at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/./julia.h:2157 [inlined]
jl_module_run_initializer at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/toplevel.c:76
run_module_init at ./loading.jl:1378
register_restored_modules at ./loading.jl:1366
#_include_from_serialized#1082 at ./loading.jl:1254
_include_from_serialized at ./loading.jl:1210 [inlined]
_include_from_serialized at ./loading.jl:1210 [inlined]
#_require_search_from_serialized#1105 at ./loading.jl:2041
_require_search_from_serialized at ./loading.jl:1969
jfptr__require_search_from_serialized_45167.1 at /Users/pagnani/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/lib/julia/sys.dylib (unknown line)
_require at ./loading.jl:2527
__require_prelocked at ./loading.jl:2388
jfptr___require_prelocked_71636.1 at /Users/pagnani/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/lib/julia/sys.dylib (unknown line)
jl_apply at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/./julia.h:2157 [inlined]
jl_f__call_in_world at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/builtins.c:894
#invoke_in_world#3 at ./essentials.jl:1089 [inlined]
invoke_in_world at ./essentials.jl:1086 [inlined]
_require_prelocked at ./loading.jl:2375
macro expansion at ./loading.jl:2314 [inlined]
macro expansion at ./lock.jl:273 [inlined]
__require at ./loading.jl:2271
jfptr___require_71567.1 at /Users/pagnani/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/lib/julia/sys.dylib (unknown line)
jl_apply at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/./julia.h:2157 [inlined]
jl_f__call_in_world at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/builtins.c:894
#invoke_in_world#3 at ./essentials.jl:1089 [inlined]
invoke_in_world at ./essentials.jl:1086 [inlined]
require at ./loading.jl:2260
jfptr_require_71564.1 at /Users/pagnani/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/lib/julia/sys.dylib (unknown line)
jl_apply at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/./julia.h:2157 [inlined]
call_require at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/toplevel.c:486 [inlined]
eval_import_path at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/toplevel.c:523
jl_toplevel_eval_flex at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/toplevel.c:759
jl_toplevel_eval_flex at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/toplevel.c:886
ijl_toplevel_eval at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/toplevel.c:952 [inlined]
ijl_toplevel_eval_in at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/toplevel.c:994
jlplt_ijl_toplevel_eval_in_9493.1 at /Users/pagnani/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/REPL/u0gqU_3gH4d.dylib (unknown line)
eval at ./boot.jl:430 [inlined]
eval_user_input at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:245
repl_backend_loop at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:342
#start_repl_backend#59 at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:327
start_repl_backend at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:324
#run_repl#72 at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:483
run_repl at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:469
jfptr_run_repl_10091.1 at /Users/pagnani/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/REPL/u0gqU_3gH4d.dylib (unknown line)
#1150 at ./client.jl:446
jfptr_YY.1150_14648.1 at /Users/pagnani/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/compiled/v1.11/REPL/u0gqU_3gH4d.dylib (unknown line)
jl_apply at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/./julia.h:2157 [inlined]
jl_f__call_latest at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/builtins.c:875
#invokelatest#2 at ./essentials.jl:1055 [inlined]
invokelatest at ./essentials.jl:1052 [inlined]
run_main_repl at ./client.jl:430
repl_main at ./client.jl:567 [inlined]
_start at ./client.jl:541
jfptr__start_73877.1 at /Users/pagnani/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/lib/julia/sys.dylib (unknown line)
jl_apply at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/./julia.h:2157 [inlined]
true_main at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/jlapi.c:900
jl_repl_entrypoint at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-11/src/jlapi.c:1059
Allocations: 7655374 (Pool: 7651932; Big: 3442); GC: 20
Segmentation fault: 11

Note that including only Metal, and PyPlot is ok. However if I do

julia> using PyPlot, Metal # ok

PyPlot seems to work and also Metal (at least superficially). It seems that to trigger the segmentation fault I need to use first Metal and after PyPlot

Is it a known bug?

A