ros / ros_comm

ROS communications-related packages, including core client libraries (roscpp, rospy, roslisp) and graph introspection tools (rostopic, rosnode, rosservice, rosparam).
http://wiki.ros.org/ros_comm
752 stars 913 forks source link

ROS crash on Raspberry Pi 4B with a very simple program #2197

Closed 13037639065 closed 2 years ago

13037639065 commented 2 years ago

With ROS noetic on Raspberry PI model 4B(64bit ARM), we frequently encounter ROS message related problems.

this is a minimal reproducible example, here https://github.com/AutoxingTech/simple_publisher_crash

randoms commented 2 years ago

We met similar problems. ROS ate up all memory when compile with -O3 option on Raspberry PI . I tried your example, and found the problem was in roscpp_core/roscpp_serialization. The serializer set a very large wrong message size. It seems to be some memory align issue. I will open a new issue to roscpp_core.

randoms commented 2 years ago

This is a bug of gcc. The issue was caused by -ftree-loop-vectorize optimization option which is included by -O3 option. The issue was reported here and still not fixed in gcc 9.3. Upgrade to gcc 10.x should fix this issue.

13037639065 commented 2 years ago

This information is very useful, thank you

peci1 commented 1 year ago

PR https://github.com/ros/roscpp_core/pull/136 should fix this. I'm looking for someone who could verify. Just please notice that Focal now has GCC 9.4 by default where I could not reproduce the issue. So the test would need to be done with GCC 9.3 installed explicitly.