julia icon indicating copy to clipboard operation
julia copied to clipboard

Add informational note to user-signalled `SIGSEGV`

Open topolarity opened this issue 4 months ago • 2 comments

If we hit a segfault from a user-triggered SIGSEGV, that usually means that someone has tampered with our signal handlers (as in https://github.com/JuliaInterop/Clang.jl/pull/549)

Prints as:

julia> Threads.@threads for i in 1:1000; zeros(1024, 1024) .+ zeros(1024, 1024); end

[29561] signal 11 (-6): Segmentation fault
signal came from user-land, signal handlers may be mis-configured.
in expression starting at REPL[3]:1

This will not help if the signal handler was dropped on the floor or intercepted by another application without forwarding, but it will at least be useful to detect bad signal forwarding from another library.

topolarity avatar Aug 14 '25 14:08 topolarity

Oh, maybe this would help with PyCall and PythonCall, there are often segfaults because of multithreaded GC interacting badly with the python process.

giordano avatar Aug 14 '25 17:08 giordano

I think the goal is to distinguish a raise from a MMU triggered segfault

gbaraldi avatar Aug 15 '25 14:08 gbaraldi