Closed
Labels
bugSomething isn't working
Description
Bug report
Required Info:
- Operating System:
- Ubuntu 16.04 AMD64
- Installation type:
- Source
- Version or commit hash:
- Release versions of crystal, from Create crystal release repos file. ros2#624
- DDS implementation:
- RTI Connext
- Client library (if applicable):
- rclpy-ish
Steps to reproduce issue
Terminal 1:
ros2 launch topic_monitor depth_demo.launch.py
Terminal 2:
ros2 run topic_monitor topic_monitor
(hit Ctrl-C here)
Expected behavior
Topic monitor quits cleanly.
Actual behavior
Topic monitor quits with various different behaviors. One particularly nasty one:
[INFO] [topic_monitor]: /topic1_data: 159
[INFO] [topic_monitor]: /topic1_data: 160
[INFO] [topic_monitor]: /topic1_data: 161
[INFO] [topic_monitor]: /topic1_data: 162
[INFO] [topic_monitor]: /topic1_data: 163
[INFO] [topic_monitor]: /topic1_data: 164
[INFO] [topic_monitor]: /topic1_data: 165
[INFO] [topic_monitor]: /topic1_data: 166
[INFO] [topic_monitor]: /topic1_data: 167
[INFO] [topic_monitor]: /topic1_data: 168
[INFO] [topic_monitor]: /topic1_data: 169
^CRuntimeError: Failed to trigger guard_condition: guard condition handle implementation '�[�'(0x7f553e777db0) does not match rmw implementation 'rmw_connext_cpp'(0x7f553bf7c1a0), at /home/ubuntu/ros2_ws/src/ros2/rmw_connext/rmw_connext_shared_cpp/src/trigger_guard_condition.cpp:35, at /home/ubuntu/ros2_ws/src/ros2/rcl/rcl/src/rcl/guard_condition.c:160
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/ros2_ws/build/topic_monitor/topic_monitor/scripts/topic_monitor.py", line 420, in main
while data_receiving_thread.isAlive():
SystemError: PyEval_EvalFrameEx returned a result with an error set
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/ros2_ws/install/topic_monitor/lib/topic_monitor/topic_monitor", line 11, in <module>
load_entry_point('topic-monitor', 'console_scripts', 'topic_monitor')()
File "/home/ubuntu/ros2_ws/build/topic_monitor/topic_monitor/scripts/topic_monitor.py", line 420, in main
while data_receiving_thread.isAlive():
KeyboardInterrupt
[INFO] [topic_monitor]: /topic1_data: 170
[INFO] [topic_monitor]: /topic1_data: 171
[INFO] [topic_monitor]: /topic1_data: 172
[INFO] [topic_monitor]: /topic1_data: 173
[INFO] [topic_monitor]: /topic1_data: -1
And then it hung.
Additional information
It fails almost every time, with different behaviors.
Activity
[-]rclpy crash somtimes when hitting Ctrl-C[/-][+]rclpy crash sometimes when hitting Ctrl-C[/+]clalancette commentedon Dec 14, 2018
This may be related to #178, #192, and #215
wjwwood commentedon Dec 14, 2018
Ouch, that looks like either uninitialized memory or use after free...
sloretz commentedon Mar 20, 2019
@clalancette if you still have this workspace would you mind checking if this is still an issue now that #288 has been merged?
clalancette commentedon Mar 22, 2019
I've had to switch to an 18.04 workspace now. Also note that I built from the latest master. The result of the test is that I haven't seen the corruption again, but things still don't actually work with this test.
When I run
ros2 launch topic_monitor depth_demo.launch.py, things start off pretty well:However, when I kill it with Ctrl-C, things get ugly:
The topic monitor itself is much worse. I run
ros2 run topic_monitor topic_monitor(with the above demo already running), and it just seems to hang completely. When I hit Ctrl-C, I get this:That is, it looks like it doesn't actually start receiving data until I kill something off. At this point,
topic_monitoris unkillable with Ctrl-C; I have to manually kill it off with a signal.ivanpauno commentedon May 24, 2019
Same issue when doing
cntrl+cin action server example.dirk-thomas commentedon May 24, 2019
@ivanpauno Your posted snippet doesn't contain any exception byond the
KeyboardInterruptwhich is expected if youSIGINTthe process.ivanpauno commentedon May 24, 2019
Ok, I read badly the issue description. I expected a nicer message when you
cntrl+ca node.dirk-thomas commentedon May 28, 2019
Since the reported crash seems to be fixed I will close this ticket.
@ivanpauno Please feel free to create a PR to catch the
KeyboardInterruptin the specific executables to avoid showing it to the user.