Repository navigation
Closed
Labels
bugSomething isn't working
Description
Bug report
Required Info:
- Operating System:
Ubuntu 16.04 - Installation type:
from source - Version or commit hash:
0.5.3 eb97379 - DDS implementation:
opensplice - Client library (if applicable):
rclpy
Steps to reproduce issue
change the demo_node_py talker's publish frequency to 20Hz and start the talker with command 'python3 talker.py'
then press Ctrl-C to interrupt it. in some case, it may cause segmentation fault.
the traceback of gdb :
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `python3 talker.py'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fb0ffd75049 in rmw_trigger_guard_condition (guard_condition_handle=0x7c001e7200096b00)
at /home/tusimple/ros2_zoro/src/hpc-zoro/rmw_zoro_cpp/src/rmw_trigger_guard_condition.cpp:30
30 if (guard_condition_handle->implementation_identifier != tusimple_zoro_identifier) {
[Current thread is 1 (Thread 0x7fb0fcc1d700 (LWP 28506))]
(gdb) bt
#0 0x00007fb0ffd75049 in rmw_trigger_guard_condition (guard_condition_handle=0x7c001e7200096b00)
at /home/tusimple/ros2_zoro/src/hpc-zoro/rmw_zoro_cpp/src/rmw_trigger_guard_condition.cpp:30
#1 0x00007fb1011bec1a in rmw_trigger_guard_condition ()
from /home/tusimple/ros2_bb/install/rmw_implementation/lib/librmw_implementation.so
#2 0x00007fb1013d0010 in rcl_trigger_guard_condition (guard_condition=0x29f9310)
at /home/tusimple/ros2_bb/src/ros2/rcl/rcl/src/rcl/guard_condition.c:152
#3 0x00007fb101ca5ac6 in catch_function (signo=2) at /home/tusimple/ros2_bb/src/ros2/rclpy/rclpy/src/rclpy/_rclpy.c:47
#4 0x00007fb0fdbf6c7b in ?? () from /usr/lib/libddskernel.so
#5 0x00007fb0fdc34542 in ?? () from /usr/lib/libddskernel.so
#6 0x00007fb1031ee6ba in start_thread (arg=0x7fb0fcc1d700) at pthread_create.c:333
#7 0x00007fb102f2441d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
dirk-thomas commentedon Aug 8, 2018
In the issue template you mention OpenSplice but the stacktrace indicates the problem happens in the package
rmw_zoro_cpp. Can you please clarify.reed-lau commentedon Aug 8, 2018
sorry, it's our extension.
I test it on fastrtps, the same segmentfault occurs.
useful bt as follow,
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `python3 talker.py'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fa9496f96e7 in rmw_trigger_guard_condition () from /home/tusimple/ros2_bb/install/rmw_fastrtps_cpp/lib/librmw_fastrtps_cpp.so
[Current thread is 1 (Thread 0x7fa94d478700 (LWP 115401))]
(gdb) bt
#0 0x00007fa9496f96e7 in rmw_trigger_guard_condition () from /home/tusimple/ros2_bb/install/rmw_fastrtps_cpp/lib/librmw_fastrtps_cpp.so
#1 0x00007fa94b043c1a in rmw_trigger_guard_condition () from /home/tusimple/ros2_bb/install/rmw_implementation/lib/librmw_implementation.so
#2 0x00007fa94b255010 in rcl_trigger_guard_condition (guard_condition=0x2e36730) at /home/tusimple/ros2_bb/src/ros2/rcl/rcl/src/rcl/guard_condition.c:152
#3 0x00007fa94bb2aac6 in catch_function (signo=2) at /home/tusimple/ros2_bb/src/ros2/rclpy/rclpy/src/rclpy/_rclpy.c:47
#4
#5 0x00000000005228f5 in PyErr_Restore () at ../Python/errors.c:51
#6 0x000000000054a33c in builtin_hasattr_impl.isra.8 (name=, obj=) at ../Python/bltinmodule.c:1064
#7 builtin_hasattr.lto_priv () at ../Python/clinic/bltinmodule.c.h:327
#8 0x00000000004e9b7f in PyCFunction_Call () at ../Objects/methodobject.c:109
#9 0x00000000005372f4 in call_function (oparg=, pp_stack=0x7ffce7695970) at ../Python/ceval.c:4705
#10 PyEval_EvalFrameEx () at ../Python/ceval.c:3236
#11 0x0000000000540199 in _PyEval_EvalCodeWithName () at ../Python/ceval.c:4018
#12 0x000000000053bd92 in fast_function (nk=, na=, n=, pp_stack=0x7ffce7695b80, func=) at ../Python/ceval.c:4813
#13 call_function (oparg=, pp_stack=0x7ffce7695b80) at ../Python/ceval.c:4730
#14 PyEval_EvalFrameEx () at ../Python/ceval.c:3236
reed-lau commentedon Aug 8, 2018
here opensplice version, runtime error may occur
[INFO] [talker]: Publishing: "Hello World: 0"
[INFO] [talker]: Publishing: "Hello World: 1"
[INFO] [talker]: Publishing: "Hello World: 2"
[INFO] [talker]: Publishing: "Hello World: 3"
[INFO] [talker]: Publishing: "Hello World: 4"
[INFO] [talker]: Publishing: "Hello World: 5"
[INFO] [talker]: Publishing: "Hello World: 6"
^C[rcutils|error_handling.c:89] provided allocator is invalid, error state not updated
RuntimeError: Failed to trigger guard_condition: guard condition handle is null, at /home/tusimple/ros2_bb/src/ros2/rmw_opensplice/rmw_opensplice_cpp/src/rmw_trigger_guard_condition.cpp:33
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tusimple/ros2_bb/install/rclpy/lib/python3.5/site-packages/rclpy/task.py", line 206, in call
self._handler.send(None)
File "/home/tusimple/ros2_bb/install/rclpy/lib/python3.5/site-packages/rclpy/executors.py", line 297, in handler
with work_tracker:
File "/home/tusimple/ros2_bb/install/rclpy/lib/python3.5/site-packages/rclpy/executors.py", line 57, in enter
self._num_work_executing += 1
File "/usr/lib/python3.5/threading.py", line 241, in exit
return self._lock.exit(*args)
SystemError: <built-in method exit of _thread.RLock object at 0x7f6cd22865a0> returned a result with an error set
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "talker.py", line 55, in
main()
File "talker.py", line 48, in main
rclpy.spin(node)
File "/home/tusimple/ros2_bb/install/rclpy/lib/python3.5/site-packages/rclpy/init.py", line 108, in spin
executor.spin_once()
File "/home/tusimple/ros2_bb/install/rclpy/lib/python3.5/site-packages/rclpy/executors.py", line 523, in spin_once
handler()
File "/home/tusimple/ros2_bb/install/rclpy/lib/python3.5/site-packages/rclpy/task.py", line 206, in call
self._handler.send(None)
KeyboardInterrupt
reed-lau commentedon Aug 8, 2018
opensplice version, sometime
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `python3 talker.py'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000000000fb7dc0 in ?? ()
[Current thread is 1 (Thread 0x7f419d903700 (LWP 125294))]
(gdb) bt
#0 0x0000000000fb7dc0 in ?? ()
#1 0x00007f419fbe10dc in rcutils_set_error_state () from /home/tusimple/ros2_bb/install/rcutils/lib/librcutils.so
#2 0x00007f41a0209046 in rcl_trigger_guard_condition (guard_condition=0xfb7dd0) at /home/tusimple/ros2_bb/src/ros2/rcl/rcl/src/rcl/guard_condition.c:153
#3 0x00007f41a0adeac6 in catch_function (signo=2) at /home/tusimple/ros2_bb/src/ros2/rclpy/rclpy/src/rclpy/_rclpy.c:47
#4 0x00007f419e2d2c7b in ?? () from /usr/lib/libddskernel.so
#5 0x00007f419e310542 in ?? () from /usr/lib/libddskernel.so
#6 0x00007f41a20276ba in start_thread (arg=0x7f419d903700) at pthread_create.c:333
#7 0x00007f41a1d5d41d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
dirk-thomas commentedon Aug 9, 2018
I can reproduce the problem on the default platform Bionic wit FastRTPS.
joncppl commentedon Oct 2, 2018
(Built from source, bouncy bolson release (rclpy==0.5.4), on Arch Linux w/ fastrtps)
I am experiencing the same behaviour with my rclpy nodes. They segfault when I ctrl-c them. My stacktrace looks a bit different than yours though.
This also sometimes happens even to
ros2 topic echo ...and
A quick look at where it died...
fix sigint guard condition's lifecycle bug
fix sigint guard condition's lifecycle bug
fix sigint guard condition's lifecycle bug (#288)
fix sigint guard condition's lifecycle bug (#288)
fix sigint guard condition's lifecycle bug (#288)
fix sigint guard condition's lifecycle bug (#288) (#298)
Merge pull request ros2#215 from RosLibRust/re-org-move-ros1-to-own-c…