Is it possible to dump segfault stack trace from REPL-only crash?

I ran into this issue Julia REPL segfaults when loading R's sf package through RCall.jl · Issue #2299 · julia-vscode/julia-vscode · GitHub that can only be reproduced in the REPL (one that’s connected to VS Code). I am trying to obtain a useful dump from the segfault following Reporting and analyzing crashes (segfaults) · The Julia Language. However, the line

$ gdb --args usr/bin/julia-debug <path_to_your_script>

requires a script to be run. Is it possible to use gdb with the julia REPL instead of a script so that I can debug the above issue?

Might be possible to try using the ability to produce an rr trace with --bug-report=rr which will upload the trace to S3 or --bug-report=rr-local which will save it to a local file. That will only work on Linux, however, which may not be helpful to you.

Thank you for the suggestion, though as you hinted it won’t work for me (I’m on OSX).

I did manage to attach lldb to a running REPL process, so I think there’s a path forward that way.

Yeah, you can absolutely attach a debugger to a REPL process. Good luck!