LinearAlgebra.* hangs when in a @threads loop on Apple M2 running 1.9.0 x86_64

MacBook-Pro-M2 ~> file /Applications/Julia-1.9.app/Contents/Resources/julia/bin/julia 
/Applications/Julia-1.9.app/Contents/Resources/julia/bin/julia: Mach-O 64-bit executable x86_64
MacBook-Pro-M2 ~> julia -t auto
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.0 (2023-05-07)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using Base.Threads, LinearAlgebra

julia> @threads for i = 1:2
                             t = rand(1,1) * rand(1,1)
                           end

I tried the same with the native arm64 1.9.0-rc2 (2023-04-01) and it terminated as expected

I’m confused whether the issue is resolved by running a native Julia binary or if there is a difference between 1.9.0-rc2 and 1.9.0. Does native aarch64 1.9.0 terminate as expected?

Yes, indeed arm64 1.9.0 works correctly.

Can anybody with Apple M1 or M2 running the 1.9.0 x86_64 version of Julia try it and see if they can replicate the problem?

I have a M2 Macbook Pro, and I cannot replicate the problem. I am currently using the 1.9.0 64 bit version of Julia.

Rosetta is known to have some issues when threading so sticking to native is probably best.

1 Like

Thank you. Maybe it is something specific to my installation.

I don’t know if this is helpful but I was unable to replicate the error running version 1.9.0 on the M1