-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Julia 1.11.0-1.11.1 hangs while testing/precompiling a basic Test project with julia_args = ["--threads=auto"]
#56458
Comments
Vaguely related to #56345 |
It seems reproducible on an x86_64 macOS using Docker constrained to two CPU cores (similar to the GitLab CI SaaS agent): $ docker run -it --rm -v $(pwd):/mnt -w /mnt julia:1 bash -c "while true; do date; sleep 60; done & julia --project -e '@show Sys.CPU_THREADS; using Pkg; Pkg.test(; coverage = true, julia_args = [\"--threads=auto\"])'"
Tue Nov 5 15:21:57 UTC 2024
Sys.CPU_THREADS = 2
Installing known registries into `~/.julia`
Added `General` registry to ~/.julia/registries
Testing Sample
Status `/tmp/jl_j26BPk/Project.toml`
[a9065fac] Sample v0.1.0 `/mnt`
[8dfed614] Test v1.11.0
Status `/tmp/jl_j26BPk/Manifest.toml`
[a9065fac] Sample v0.1.0 `/mnt`
[2a0f44e3] Base64 v1.11.0
[b77e0a4c] InteractiveUtils v1.11.0
[56ddb016] Logging v1.11.0
[d6f4376e] Markdown v1.11.0
[9a3f8284] Random v1.11.0
[ea8e919c] SHA v0.7.0
[9e88b42a] Serialization v1.11.0
[8dfed614] Test v1.11.0
Precompiling project for configuration --code-coverage=@/mnt --color=yes --check-bounds=yes --warn-overwrite=yes --depwarn=yes --inline=yes --startup-file=no --track-allocation=none --threads=auto...
Tue Nov 5 15:22:57 UTC 2024 ] 0/1
Tue Nov 5 15:23:57 UTC 2024 ] 0/1
Tue Nov 5 15:24:57 UTC 2024 ] 0/1
Progress [> ] 0/1
◒ Sample
Also when constraining to 4 CPU cores: $ docker run -it --rm -v $(pwd):/mnt -w /mnt julia:1 bash -c "while true; do date; sleep 60; done & julia --project -e '@show Sys.CPU_THREADS; using Pkg; Pkg.test(; coverage = true, julia_args = [\"--threads=auto\"])'"
Tue Nov 5 15:29:46 UTC 2024
Sys.CPU_THREADS = 4
Installing known registries into `~/.julia`
Added `General` registry to ~/.julia/registries
Testing Sample
Status `/tmp/jl_aowubp/Project.toml`
[a9065fac] Sample v0.1.0 `/mnt`
[8dfed614] Test v1.11.0
Status `/tmp/jl_aowubp/Manifest.toml`
[a9065fac] Sample v0.1.0 `/mnt`
[2a0f44e3] Base64 v1.11.0
[b77e0a4c] InteractiveUtils v1.11.0
[56ddb016] Logging v1.11.0
[d6f4376e] Markdown v1.11.0
[9a3f8284] Random v1.11.0
[ea8e919c] SHA v0.7.0
[9e88b42a] Serialization v1.11.0
[8dfed614] Test v1.11.0
Precompiling project for configuration --code-coverage=@/mnt --color=yes --check-bounds=yes --warn-overwrite=yes --depwarn=yes --inline=yes --startup-file=no --track-allocation=none --threads=auto...
Tue Nov 5 15:30:46 UTC 2024 ] 0/1
Tue Nov 5 15:31:46 UTC 2024 ] 0/1
Tue Nov 5 15:32:46 UTC 2024 ] 0/1
Tue Nov 5 15:33:46 UTC 2024 ] 0/1
Tue Nov 5 15:34:46 UTC 2024 ] 0/1
Progress [> ] 0/1
◐ Sample
|
--threads=auto
--threads=auto
when running on a machine with 2 CPU cores
--threads=auto
when running on a machine with 2 CPU cores--threads=auto
when running on a machine with 2 or 4 CPU cores
Problem seems to be resolved on $ docker run -it --rm -v $(pwd):/mnt -w /mnt debian:bookworm bash -c "apt-get update; apt-get --yes install curl; curl -fsSL https://install.julialang.org | sh -s -- --yes --default-channel nightly; . /root/.bashrc; julia --version; while true; do date; sleep 60; done & julia --project -e '@show Sys.CPU_THREADS; using Pkg; Pkg.test(; coverage = true, julia_args = [\"--threads=auto\"])'"
# ...
julia version 1.12.0-DEV
Tue Nov 5 15:41:55 UTC 2024
Sys.CPU_THREADS = 4
Installing known registries into `~/.julia`
Added `General` registry to ~/.julia/registries
Updating registry at `~/.julia/registries/General.toml`
Updating `/mnt/Project.toml`
[8dfed614] ~ Test ⇒ v1.11.0
Updating `/mnt/Manifest.toml`
[2a0f44e3] + Base64 v1.11.0
[b77e0a4c] + InteractiveUtils v1.11.0
[dc6e5ff7] + JuliaSyntaxHighlighting v1.12.0
[56ddb016] + Logging v1.11.0
[d6f4376e] + Markdown v1.11.0
[9a3f8284] + Random v1.11.0
[ea8e919c] + SHA v0.7.0
[9e88b42a] + Serialization v1.11.0
[f489334b] + StyledStrings v1.11.0
[8dfed614] ~ Test ⇒ v1.11.0
Testing Sample
Status `/tmp/jl_ltFcmE/Project.toml`
[a9065fac] Sample v0.1.0 `/mnt`
[8dfed614] Test v1.11.0
Status `/tmp/jl_ltFcmE/Manifest.toml`
[a9065fac] Sample v0.1.0 `/mnt`
[2a0f44e3] Base64 v1.11.0
[b77e0a4c] InteractiveUtils v1.11.0
[dc6e5ff7] JuliaSyntaxHighlighting v1.12.0
[56ddb016] Logging v1.11.0
[d6f4376e] Markdown v1.11.0
[9a3f8284] Random v1.11.0
[ea8e919c] SHA v0.7.0
[9e88b42a] Serialization v1.11.0
[f489334b] StyledStrings v1.11.0
[8dfed614] Test v1.11.0
Precompiling for configuration --code-coverage=@/mnt --color=yes --check-bounds=yes --warn-overwrite=yes --depwarn=yes --inline=yes --startup-file=no --track-allocation=none --threads=auto
Precompiling packages finished.
1 dependency successfully precompiled in 1 seconds. 8 already precompiled.
Testing Running tests...
Test Summary: | Pass Total Time
Sample | 1 1 1.3s
Testing Sample tests passed |
--threads=auto
when running on a machine with 2 or 4 CPU cores--threads=auto
when running on a machine with 2 or 4 CPU cores
--threads=auto
when running on a machine with 2 or 4 CPU coresjulia_args="--threads=auto"
julia_args="--threads=auto"
julia_args = ["--threads=auto"]
Alright - managed to narrow it down a bit more: The issue seems to not be related to the number of CPU cores available. The simple invocation works
But the "start Julia without threads, and then ask Pkg.test to run a Julia session with threads" approach hangs (on Julia 1.11.0-1.11.1):
|
Using
|
Scheduled testing of a very basic
Test
project with--threads=auto
started hanging three weeks ago - since Oct. 8, when Julia 1.11 was released.The scheduled testing is using the
julia:1
container (which became synonymous withjulia:1.11
on Oct. 8) and the hang occurs while precompiling the test-project (when running tests).The scheduled testing is simply running
Pkg.test
with--threads=auto
for a project with onlyTest
as a dependency: https://gitlab.com/stemann/julia-gitlab-ci-templates/-/tree/master/examples/SampleWithout
--threads=auto
(usingPkg.test(; coverage = true)
), the testing completes without issues (of course): https://gitlab.com/stemann/julia-gitlab-ci-templates/-/jobs/8234833097"Stack trace" (Julia-style):
Pkg.test(; coverage = true, julia_args = ["--threads=auto"])
The text was updated successfully, but these errors were encountered: