Open ZhenshengLee opened 3 years ago
@ZhenshengLee were you able to check whether this works? https://answers.ros.org/question/384441/how-to-debug-rmw-segfaults-launched-by-ros2cli-like-ros2-topic-echo/?answer=384845#post-id-384845
@ZhenshengLee Can you double check if this problem in your setup is fixed or persists after #70 has been merged? Thanks!
@mossmaurice
@ZhenshengLee Can you double check if this problem in your setup is fixed or persists after #70 has been merged? Thanks!
I am happy to do so, but #70 is for #57 and #69 , especially in galactic branch. Seeing your changes in https://github.com/ros2/rmw_iceoryx/blob/4b2ebbdcec913a08cfe45fc045e5de0e5bdbc812/rmw_iceoryx_cpp/src/internal/iceoryx_type_info_introspection.cpp#L212
There is nothing wrong in the foxy branch of this function, see https://github.com/ros2/rmw_iceoryx/blob/676a6de1c4b7f9ff0d99a3521942db4ac3d4de2d/rmw_iceoryx_cpp/src/internal/iceoryx_type_info_introspection.cpp#L182
This issue was created when ros2 topic echo /chatter
work but ros2 topic echo /tf
makes segfault.
I will give it a test in foxy branch with @christophebedard method, but it will not be a double-check.
@mossmaurice
Edit:
A fast way to reproduce this bug it to
ros2 launch velodyne_description example.launch.py
ros2 topic echo /tf_static
And you will see
Log level set to: [Warning]
Segmentation fault (core dumped)
@christophebedard your method works on vscode! Thank you very much.
the launch file in vscode is like the following.
{
"name": "zs: gdbrun ros2",
"type": "cppdbg",
"request": "launch",
"program": "/usr/bin/python3",
"args": [
"/opt/ros/foxy/bin/ros2",
"topic",
"echo",
"/tf_static"
],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
"environment": [
{
"name": "RMW_IMPLEMENTATION",
// "value": "rmw_fastrtps_cpp"
// "value": "rmw_ecal_proto_cpp"
"value": "rmw_iceoryx_cpp"
}
],
"externalConsole": false,
// "preLaunchTask": "source_ros2_ws",
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
Env
Observed
Expected
ros2 topic echo /tf
run without errorComment
the following commands also cause segfault.
ros2 topic hz /tf
ros2 topic hz /tf_static
ros2 topic hz /rslidar_points
lgsvl may not be needed to reproduce the behavior.
_Originally posted by @ZhenshengLee in https://github.com/ros2/rmw_iceoryx/issues/42#issuecomment-874418462_