You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On some systems (not all) when you start Julia with multiple threads and run the following code:
julia> for i in 1:10
println("ping $i")
@sync Threads.@spawn sleep(0.01)
println("pong $i")
end
ping 1
pong 1
ping 2
pong 2
ping 3
pong 3
ping 4
pong 4
ping 5
pong 5
ping 6
pong 6
ping 7
pong 7
ping 8
pong 8
ping 9
pong 9
ping 10
pong 10
julia> for i in 1:10
@sync Threads.@spawn sleep(0.01)
end
It freezes Julia. Note in particular, that doing some IO within the loop ensures that no freezing happens. (the same freezing happens if loop is replaced by multiple invocations of @sync Threads.@spawn sleep(0.01) in top level scope or if the loop is wrapped in a function and a function is called)
This problem is observed on Julia nightly on the following example configurations:
Julia Version 1.10.0-DEV.430
Commit 9b1ffbbe1b (2023-01-25 12:52 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 12 × Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
Threads: 4 on 12 virtual cores
and
Julia Version 1.10.0-DEV.427
Commit dfab7be1f8b (2023-01-24 19:07 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 2 × Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, icelake-server)
and
Julia Version 1.10.0-DEV.430
Commit 9b1ffbbe1b (2023-01-25 12:52 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 16 × 12th Gen Intel(R) Core(TM) i7-1260P
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, alderlake)
Threads: 4 on 16 virtual cores
and
Julia Version 1.10.0-DEV.430
Commit 9b1ffbbe1bc (2023-01-25 12:52 UTC)
Platform Info:
OS: macOS (arm64-apple-darwin21.3.0)
CPU: 8 × Apple M1
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
Threads: 4 on 4 virtual cores
The text was updated successfully, but these errors were encountered:
When not in threaded region, only thread 0 will manage IO events, but it
may have gone to sleep if there were no IO objects active for it to
watch earlier.
Fix#48430
When not in threaded region, only thread 0 will manage IO events, but it
may have gone to sleep if there were no IO objects active for it to
watch earlier.
Fix#48430
When not in threaded region, only thread 0 will manage IO events, but it
may have gone to sleep if there were no IO objects active for it to
watch earlier.
Fix#48430
(cherry picked from commit 45b7e7a)
Reported and discussed in https://julialang.slack.com/archives/C688QKS7Q/p1674678148290409 (but probably it will be quickly lost so I am re-reporting it here as the issue persists and causes DataFrames.jl GitHub Actions CI to constantly fail).
On some systems (not all) when you start Julia with multiple threads and run the following code:
It freezes Julia. Note in particular, that doing some IO within the loop ensures that no freezing happens. (the same freezing happens if loop is replaced by multiple invocations of
@sync Threads.@spawn sleep(0.01)
in top level scope or if the loop is wrapped in a function and a function is called)This problem is observed on Julia nightly on the following example configurations:
and
and
and
The text was updated successfully, but these errors were encountered: