@cfunction
s precompiled into a system image are not executable from a foreign thread due to TLS accesses
#43748
Labels
compiler:codegen
Generation of LLVM IR and native code
@ericphanson is observing segmentation faults when using a system image with CUDA.jl (x-ref: JuliaGPU/CUDA.jl#1314). The TL;DR is that CUDA.jl uses
:uv_async_send
to triggerAsyncConditions
from a foreign thread.async_send(handle::Ptr{Cvoid}) = ccall(:uv_async_send, Cvoid, (Ptr{Cvoid},), handle)
.If we disassemble the code we normally run, when executing without a custom systemimage:
On the other hand having a custom sysimage:
The pointer to disassemble was obtained by using
Reproducer.launch()
With:
and a
precompile.jl
like:This is funnily related to #43747, since I wanted to have errors instead of mysterious segmentation faults.
cc: @KristofferC (although I don't think there is something we can do in PackageCompiler.jl), @maleadt
The text was updated successfully, but these errors were encountered: