Skip to content
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

Should RStudio install a SIGSEGV handler? #14656

Open
t-kalinowski opened this issue May 6, 2024 · 1 comment
Open

Should RStudio install a SIGSEGV handler? #14656

t-kalinowski opened this issue May 6, 2024 · 1 comment
Milestone

Comments

@t-kalinowski
Copy link
Member

I think that most segmentation faults that users experience are confined to rsession. Perhaps RStudio could install a signal handler that just gracefully restarts the R session on a segfault, instead of crashing the full IDE?

An almost too-good-to-be-true feature would be if the signal handler did something more, like attach to the rsession with lldb/gdb and print a traceback before restarting, or give an option to drop into the gdb console. This might be as simple as sending a command to terminal like lldb -p <rsession pid>

@t-kalinowski t-kalinowski added enhancement new New incoming issues, ready for initial review. labels May 6, 2024
@t-kalinowski t-kalinowski changed the title Should Rstudio install a SIGSEGV handler? Should RStudio install a SIGSEGV handler? May 6, 2024
@jeffvroom
Copy link
Contributor

Great suggestions, thanks for filing that. We should be offering an option to restart rsession on SEGV. Launching gdb or lldb would be nice to have, or maybe there's a way to have the user direct it to save a core file? The stack is way more useful once we have added back symbols.

In the meantime, to be sure everyone is aware, there is already a signal handler for SEGV that is installed when /etc/rstudio/crash-handler.conf has the enabled flag. Here's how I configure it:

crash-handling-enabled=1
crash-db-path=/tmp/crash-dumps
uploads-enabled=0

The minidump files generated can be turned into stack traces with symbols given the exact build number.

@ronblum ronblum removed the new New incoming issues, ready for initial review. label May 8, 2024
@ronblum ronblum added this to the Later milestone May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants