diff --git a/r/vignettes/developers/debugging.Rmd b/r/vignettes/developers/debugging.Rmd index a18178dfac1..b9aa8bb75a5 100644 --- a/r/vignettes/developers/debugging.Rmd +++ b/r/vignettes/developers/debugging.Rmd @@ -75,7 +75,7 @@ Here is debugger output from the segfault shown in the previous example. You can see here that the exact line which triggers the segfault is included in the output. -``` +```shell > S3FileSystem$create() Thread 1 "R" received signal SIGSEGV, Segmentation fault. @@ -83,6 +83,23 @@ Thread 1 "R" received signal SIGSEGV, Segmentation fault. 318 operator++() noexcept ``` +#### Getting debugger output if your session hangs + +The instructions above can provide valuable additional context when a segfault +occurs. However, there are occasionally circumstances in which a bug could +cause your session to hang indefinitely without segfaulting. In this case, it +may be diagnostically useful to interrupt the debugger and generate backtraces +from all running threads. + +To do this, firstly, press Ctrl/Cmd and C to interrupt the debugger, and then run: + +```shell +thread apply all bt +``` + +This will generate a large amount of output, but this information is useful when +identifying the cause of the issue. + ## Resources The following resources provide detailed guides to debugging R code: