Despite you naming it try_segfault, I don’t think this is actually a segment[ation] fault, but that’s a nitpick (in your case, nor mine despite “unknown function (ip: (nil))” which I have and you don’t; I don’t think you would get a stack-trace, for a segfault?).
You might want to open an issue about this, but just give the facts. Please check this in the latest 1.9 master (and 1.6.5), and report against it. Julia 1.8 should be out any day now, so it’s likely not helpful to ask for a backport to 1.7.x, but to 1.8.x would be good, and to 1.6.x. I didn’t check 1.6.5 or 1.7.2.
I tried your script or even an empty infinite loop, starting with:
atexit(exit)
I got similar results. Note, not with atexit(exit()) # then I got a confusing, at first, error.
I’m on Linux, and I get similar as you in my julia-1.9-DEV-76cf1761e6 (and also in 1.3.1):
trying...
^C
signal (2): Interrupt
in expression starting at /home/pharaldsson_sym/gdp_speed/gdp_speeds/ctrlc.jl:25
epoll_wait at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
uv__io_poll at /workspace/srcdir/libuv/src/unix/epoll.c:240
uv_run at /workspace/srcdir/libuv/src/unix/core.c:383
ijl_task_get_next at /buildworker/worker/package_linux64/build/src/partr.c:556
poptask at ./task.jl:884
wait at ./task.jl:893
task_done_hook at ./task.jl:597
jfptr_task_done_hook_54049.clone_1 at /home/pharaldsson_sym/julia-1.9-DEV-76cf1761e6/lib/julia/sys.so (unknown line)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2349 [inlined]
ijl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2531
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1825 [inlined]
jl_finish_task at /buildworker/worker/package_linux64/build/src/task.c:254
start_task at /buildworker/worker/package_linux64/build/src/task.c:942
unknown function (ip: (nil))
Allocations: 2904 (Pool: 2892; Big: 12); GC: 0
What was the point of @async line? Then I get a longer error, when you report you may want to omit it, or show with if it’s supposed to be there, or maybe show both.
Note, I reported a bug previously about CTRL-C not working, and it didn’t for your code in my Julia 1.7.0:
That issue was closed, so I assumed fixed, but maybe not. See also the open issue linked from it at the bottom. Please report what you think relevant and maybe link to this discussion.
If you mean as intended, just exiting, i.e. not working the same, with the error, that’s also relevant info to report.