Closed 13037639065 closed 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.
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.
This information is very useful, thank you
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.
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