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

Consider the use of Backward-cpp or similar for getting stack traces during Segfaults #1273

Open
arjo129 opened this issue Sep 2, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@arjo129
Copy link

arjo129 commented Sep 2, 2024

Backward.cpp is already used fairly effectively by the Gazebo team. It provides end users with a stack trace in the event that there is a segfault in their code by installing a signal handler. This can help us better understand issues with our own code and aid plugin developers with debugging as well.

Options to consider:

@arjo129 arjo129 added the enhancement New feature or request label Sep 2, 2024
@arjo129 arjo129 self-assigned this Sep 2, 2024
@clalancette
Copy link
Contributor

So while I think this would be helpful, I think there are a few things we need to consider:

  1. Does Backward.cpp work across both Linux and Windows?
  2. If the answer to the previous question is "yes", can we get it from the platform (i.e. Ubuntu)?
  3. The signal handling story in ROS 2 is complicated. If we want to implement this across the board, we'd probably have to at least implement it in rclcpp, rclpy, rosbag2, and possibly ros2cli and launch (the latter two are Python, but maybe we want to install it anyway). We'd also have to integrate with the existing signal handling, which is quite complicated (especially on Windows).

@arjo129
Copy link
Author

arjo129 commented Sep 4, 2024

Does Backward.cpp work across both Linux and Windows?

Yes.

If the answer to the previous question is "yes", can we get it from the platform (i.e. Ubuntu)?

Ubuntu seems to have a package but the package does not provide cmake targets. In the OSRF codebase it seems to be vendored in osrf_testing_tools_cpp and in 2 different places in gazebo.

The signal handling story in ROS 2 is complicated. If we want to implement this across the board, we'd probably have to at least implement it in rclcpp, rclpy, rosbag2, and possibly ros2cli and launch (the latter two are Python, but maybe we want to install it anyway). We'd also have to integrate with the existing signal handling, which is quite complicated (especially on Windows).

I've never had luck with using backward-cpp with python. That being said, I think perusing the rclcpp repo there is an open issue ros2/rclcpp#2396 which is related. In my mind it makes sense to provide RVIZ and

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants