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

Segfault on Ctrl-C #2012

Closed
mjforan opened this issue Jan 22, 2025 · 9 comments · Fixed by #2014
Closed

Segfault on Ctrl-C #2012

mjforan opened this issue Jan 22, 2025 · 9 comments · Fixed by #2014
Labels

Comments

@mjforan
Copy link

mjforan commented Jan 22, 2025

Describe the bug
Killing a ros2_control launch with Ctl-C causes a segfault and cleanup methods like on_deactivate do not run.

To Reproduce

git clone https://github.com/ros-controls/ros2_control_demos.git
cd ros2_control_demos
docker build . -f Dockerfile/Dockerfile -t ros2_control_demos --build-arg ROS_DISTRO=jazzy
docker run --rm -it ros2_control_demos bash
. install/setup.bash
ros2 launch ros2_control_demo_example_1 rrbot.launch.py

wait for everything to initialize...
Ctrl-C

Expected behavior
Clean shutdown

Screenshots

^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[robot_state_publisher-2] [INFO] [1737557728.284547701] [rclcpp]: signal_handler(signum=2)
[ros2_control_node-1] [INFO] [1737557728.284551321] [rclcpp]: signal_handler(signum=2)
[ros2_control_node-1] Stack trace (most recent call last):
[ros2_control_node-1] #7    Object "/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2", at 0xffffffffffffffff, in 
[ros2_control_node-1] #6    Object "/opt/ros/jazzy/lib/controller_manager/ros2_control_node", at 0x64e5c5265c94, in _start
[ros2_control_node-1] #5    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x71a0f848f28a, in __libc_start_main
[ros2_control_node-1] #4    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x71a0f848f1c9, in 
[ros2_control_node-1] #3    Object "/opt/ros/jazzy/lib/controller_manager/ros2_control_node", at 0x64e5c5264ce2, in main
[ros2_control_node-1] #2    Object "/opt/ros/jazzy/lib/controller_manager/ros2_control_node", at 0x64e5c5265eb2, in 
[ros2_control_node-1] #1    Object "/opt/ros/jazzy/lib/librclcpp.so", at 0x71a0f8a596b9, in rclcpp::Executor::~Executor()
[ros2_control_node-1] #0    Object "/opt/ros/jazzy/lib/librclcpp.so", at 0x71a0f8a52e51, in 
[ros2_control_node-1] Segmentation fault (Address not mapped to object [0x71a0f45fd020])

Environment (please complete the following information):

  • OS: [Ubuntu 24.04]
  • Version [Jazzy]
@mjforan mjforan added the bug label Jan 22, 2025
@christophfroehlich
Copy link
Contributor

Thanks for reporting this. I thought that I had reported that already, but can't find any similar issues now.

I saw that in the tests, that's why I have deactivated the return code check
https://github.com/ros-controls/ros2_control_demos/blob/master/example_1/test/test_rrbot_launch.py#L149

@christophfroehlich
Copy link
Contributor

@mjforan
Copy link
Author

mjforan commented Jan 22, 2025

To be clear, this is not only an issue with the demos. I see this new behavior on my own hardware interfaces as well.

@christophfroehlich
Copy link
Contributor

Sure, but I saw that with the tests/demos already -> we can reproduce it and work on that.

@christophfroehlich
Copy link
Contributor

@saikishor Interestingly, we don't see this in the test here in this repo.

@saikishor
Copy link
Member

@saikishor Interestingly, we don't see this in the test here in this repo.

That's weird. If it can be easily reproducable, then should be easy to fix

@mjforan
Copy link
Author

mjforan commented Jan 22, 2025

I was working in a slightly older container and got a different result on ctrl-c. Maybe this will help guide your debugging:

[ros2_control_node-2] /opt/ros/jazzy/lib/controller_manager/ros2_control_node: symbol lookup error: /opt/ros/jazzy/lib/libdiff_drive_controller.so: undefined symbol: _ZN20controller_interface23ControllerInterfaceBaseD2Ev

And here are some relevant software versions:

ros-jazzy-controller-interface/now 4.21.0-1noble.20241228.025831 arm64 [installed,local]
ros-jazzy-controller-manager/now 4.21.0-1noble.20241228.041458 arm64 [installed,local]
ros-jazzy-diff-drive-controller/now 4.19.0-1noble.20250115.225929 arm64 [installed,local]

@saikishor
Copy link
Member

Nothing has been done to fix this in the last releases. I doubt that this is fixed.

Thanks. I'll check it out.

@saikishor
Copy link
Member

Hello @mjforan!

This PR : #2014 should fix the issue you are facing. It would be great, if you can try it out and If it works, please approve the PR.

Thank you!

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

Successfully merging a pull request may close this issue.

3 participants