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

ARROW-14654: [R][Docs] Add article on how to run R with C++ debugger to dev docs #11658

Closed
wants to merge 5 commits into from

Conversation

thisisnic
Copy link
Member

This PR adds an article about how to run R with the C++ debugger to the dev docs. It also adds a submenu for articles to be published on the pkgdown site but not distributed with the package as vignettes. Note that the current R developer guide remains as it's own menu option so we don't break links to it in other packages.

@github-actions
Copy link

the bug. One way around this is to find the code that causes the error, and
run R with a C++ debugger.

Firstly, load R with your debugger. The most common debuggers are `gdb` and `lldb`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to note up here that if you're on macOS, you're probably going to be using lldb.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


Now, run your code - either directly in the session or by sourcing it from a
file. If the code results in a segfault, you will have extra output that you
can use to diagnose the problem or attach to an issue as extra information.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to link to more than just Davis's (very good) blog post. Like to good references of gdb and lldb commands, which are similar but not the same. And/or other blog posts about debugging in R.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have added a few bits including equivalent gdb and lldb commands now.

@paleolimbot
Copy link
Member

I tried to set up llvm to see if there were any differences but ran into what is apparently a known issue...that you can't attach a debugger to the official R install MacOS (because of security stuff...reference here + workaround: https://mac.r-project.org/bin/macosx/RMacOSX-FAQ.html#I-cannot-attach-debugger-to-R courtesy of Jim and Gabor). Not sure if that's worth putting into the vignette or not!

@thisisnic
Copy link
Member Author

I tried to set up llvm to see if there were any differences but ran into what is apparently a known issue...that you can't attach a debugger to the official R install MacOS (because of security stuff...reference here + workaround: https://mac.r-project.org/bin/macosx/RMacOSX-FAQ.html#I-cannot-attach-debugger-to-R courtesy of Jim and Gabor). Not sure if that's worth putting into the vignette or not!

Thanks for testing that out; it is 100% worth adding - good call!

@ursabot
Copy link

ursabot commented Nov 15, 2021

Benchmark runs are scheduled for baseline = d738cb1 and contender = 8f0a560. 8f0a560 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Finished ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.13% ⬆️0.04%] ursa-thinkcentre-m75q
Supported benchmarks:
ursa-i9-9960x: langs = Python, R, JavaScript
ursa-thinkcentre-m75q: langs = C++, Java
ec2-t3-xlarge-us-east-2: cloud = True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants