Skip to content

fix: lock lazy decompressor pool init on Julia < 1.12 - #80

Merged
Beforerr merged 2 commits into
mainfrom
fix-decompressor-race
Oct 9, 2026
Merged

Beforerr merged 2 commits into
mainfrom
fix-decompressor-race

Conversation

@Beforerr

@Beforerr Beforerr commented Oct 9, 2026

Copy link
Copy Markdown
Member

Unlocked lazy init raced when first called inside @threads: workers each built a pool, and one blocked forever returning its decompressor to the other (full) pool. Reproduced on 1.10 with JULIA_NUM_THREADS=8 reading an ELFIN EPD file (3/3 hang on 0.4.2, 5/5 OK with this fix).

@Beforerr
Beforerr force-pushed the fix-decompressor-race branch from 89f9a21 to 8710657 Compare October 9, 2026 19:46
@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1)

Time benchmarks
main 8710657... main / 8710657...
elx/full_load 25.4 ± 2.1 μs 25.5 ± 1.9 μs 0.996 ± 0.11
elx/sum_array 2.73 ± 1.2 μs 2.71 ± 1.2 μs 1.01 ± 0.63
elx/sum_lazy 2.9 ± 0.43 μs 2.85 ± 0.51 μs 1.02 ± 0.24
elx/sum_var_access 2.15 ± 1.2 μs 2.15 ± 1.2 μs 1 ± 0.79
elx/var_access 0.121 ± 0.01 μs 0.12 ± 0.011 μs 1.01 ± 0.12
epochs/DateTime_to_TT2000 0.0622 ± 0.0004 ms 0.0623 ± 0.00029 ms 0.999 ± 0.0079
epochs/Epoch16_parse 0.311 ± 0.011 ms 0.311 ± 0.011 ms 1 ± 0.051
epochs/Epoch16_vs_DateTime 2.92 ± 0.01 μs 2.92 ± 0.019 μs 1 ± 0.0074
epochs/TT2000_parse 0.362 ± 0.011 ms 0.361 ± 0.011 ms 1 ± 0.043
epochs/TT2000_string 5.76 ± 1.9 ms 5.83 ± 1.9 ms 0.988 ± 0.46
epochs/TT2000_to_DateTime 0.112 ± 0.00099 ms 0.116 ± 0.00086 ms 0.964 ± 0.011
epochs/TT2000_vs_DateTime 0.0525 ± 2e-05 ms 0.0535 ± 8e-05 ms 0.982 ± 0.0015
mms/full_load 17.1 ± 2 μs 17.6 ± 2 μs 0.972 ± 0.16
mms/sum_array 0.0954 ± 0.0022 s 0.0953 ± 0.0017 s 1 ± 0.03
mms/sum_slice 3.55 ± 0.48 ms 3.53 ± 0.49 ms 1.01 ± 0.19
mms/sum_var_access 3.52 ± 0.47 ms 3.52 ± 0.48 ms 1 ± 0.19
mms/var_access 0.08 ± 0.02 μs 0.07 ± 0.001 μs 1.14 ± 0.29
time_to_load 0.182 ± 0.0024 s 0.18 ± 0.0027 s 1.01 ± 0.02
Memory benchmarks
main 8710657... main / 8710657...
elx/full_load 0.217 k allocs: 24.8 kB 0.217 k allocs: 24.8 kB 1
elx/sum_array 12 allocs: 28 kB 12 allocs: 28 kB 1
elx/sum_lazy 12 allocs: 28 kB 12 allocs: 28 kB 1
elx/sum_var_access 14 allocs: 28.3 kB 14 allocs: 28.3 kB 1
elx/var_access 1 allocs: 0.234 kB 1 allocs: 0.234 kB 1
epochs/DateTime_to_TT2000 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
epochs/Epoch16_parse 3 allocs: 0.153 MB 3 allocs: 0.153 MB 1
epochs/Epoch16_vs_DateTime 0 allocs: 0 B 0 allocs: 0 B
epochs/TT2000_parse 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
epochs/TT2000_string 0.2 M allocs: 7.02 MB 0.2 M allocs: 7.02 MB 1
epochs/TT2000_to_DateTime 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
epochs/TT2000_vs_DateTime 0 allocs: 0 B 0 allocs: 0 B
mms/full_load 0.056 k allocs: 5.77 kB 0.056 k allocs: 5.77 kB 1
mms/sum_array 0.531 k allocs: 31.6 MB 0.531 k allocs: 31.6 MB 1
mms/sum_slice 0.05 k allocs: 1.29 MB 0.05 k allocs: 1.29 MB 1
mms/sum_var_access 0.05 k allocs: 1.29 MB 0.05 k allocs: 1.29 MB 1
mms/var_access 1 allocs: 0.219 kB 1 allocs: 0.219 kB 1
time_to_load 0.2 k allocs: 11.8 kB 0.2 k allocs: 11.8 kB 1

@Beforerr
Beforerr merged commit 2cb5cd3 into main Oct 9, 2026
7 checks passed
@Beforerr
Beforerr deleted the fix-decompressor-race branch October 9, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant