-
-
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
Chairmarks segfaults on 1.12 #57018
Comments
With multiple threads and an assert build on 3d85309 (the assertions only seem to trigger when Julia is started with multiple threads): julia> using Chairmarks
julia> x = @be rand;
julia> typeof(x)
[115080] signal 11 (1): Segmentation fault
in expression starting at REPL[3]:1
julia: /cache/build/builder-demeter6-3/julialang/julia-master/src/gc-stock.h:437: gc_check_ptls_of_parallel_collector_thread: Assertion `__extension__ ({ __auto_type __atomic_load_ptr = (&ptls->gc_state); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, (memory_order_relaxed)); __atomic_load_tmp; }) == 3' failed.
julia: /cache/build/builder-demeter6-3/julialang/julia-master/src/gc-stock.h:437: gc_check_ptls_of_parallel_collector_thread: Assertion `__extension__ ({ __auto_type __atomic_load_ptr = (&ptls->gc_state); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, (memory_order_relaxed)); __atomic_load_tmp; }) == 3' failed.
julia: /cache/build/builder-demeter6-3/julialang/julia-master/src/gc-stock.h:437: gc_check_ptls_of_parallel_collector_thread: Assertion `__extension__ ({ __auto_type __atomic_load_ptr = (&ptls->gc_state); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, (memory_order_relaxed)); __atomic_load_tmp; }) == 3' failed.
julia: /cache/build/builder-demeter6-3/julialang/julia-master/src/gc-stock.h:437: gc_check_ptls_of_parallel_collector_thread: Assertion `__extension__ ({ __auto_type __atomic_load_ptr = (&ptls->gc_state); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, (memory_order_relaxed)); __atomic_load_tmp; }) == 3' failed.
[115080] signal 6 (-6): Aborted
in expression starting at REPL[3]:1
julia: /cache/build/builder-demeter6-3/julialang/julia-master/src/gc-stock.h:437: gc_check_ptls_of_parallel_collector_thread: Assertion `__extension__ ({ __auto_type __atomic_load_ptr = (&ptls->gc_state); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, (memory_order_relaxed)); __atomic_load_tmp; }) == 3' failed.
Aborted (core dumped) |
* update compat (need Julia 1.8 for allequal) * Stop testing on nightly due to JuliaLang/julia#57018
I don't need threads. It looks like the return value, which should be:
is instead getting a pointer to the raw memory allocation instead of the Vector wrapper of the Memory wrapper of it (happens to be a malloc object), which segfaults in the GC later |
There appears to be an ABI disagreement. The caller (which is
|
Could this be an artifact of mine and @oscardssmith PR? |
For those playing along at home, the ABI issue comes from the abstract type precompile https://github.com/LilithHafner/Chairmarks.jl/blob/80e84d0ba90fcac61959d1f992e034f5445bf4cd/src/precompile.jl#L7, which made Julia think that the function returned a boxed Tuple, instead of an unboxed Tuple |
On 1.11, Chairmarks works fine. On 1.12, it segfaults. The strings
"@inbounds"
and"unsafe"
do not appear in thesrc
directory and I don't do anything particularly internal that I know of. IMO, the funkeyest code is here: https://github.com/LilithHafner/Chairmarks.jl/blob/80e84d0ba90fcac61959d1f992e034f5445bf4cd/src/benchmarking.jl#L115-L165.Tagging GC at a guess because it appears in the segfault stack trace, but it could certianly be due to a non-gc issue.
MWE:
The text was updated successfully, but these errors were encountered: