Skip to content

Darwin/ARM64: Julia freezes on @threads loops #45626

Closed
@ssagl

Description

@ssagl

I'm encountering a previously documented issue when running @threads loops on the arm64 native 1.8.0-rc1 version of julia. Apparently, this has been a known issue before but marked as closed (link to issue). The bug still seems to exist and is causing troubles for me. I'll quote a minimal example from the thread that initially documented this issue (Originally posted by @gbaraldi in #41820 (comment)):

julia> function foo()
          Threads.@threads for i in 1:10
               rand()
           end
       end
foo (generic function with 1 method)

julia> for i in 1:1000
           println(i)
           for j in 1:10000
               foo()
           end
       end

This freezes for me somewhere in i = 11 on my Mac with the current 1.8.0-rc1 version of julia.

Below I attach the exact output of versioninfo():

julia> versiononfo()
Julia Version 1.8.0-rc1
Commit 6368fdc6565 (2022-05-27 18:33 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.3.0)
  CPU: 10 × Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 8 on 8 virtual cores

Metadata

Metadata

Assignees

No one assigned

    Labels

    multithreadingBase.Threads and related functionalitysystem:apple siliconAffects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions