ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ARM: Buffer Overrun debug help

asked 2012-11-26 02:38:38 -0500

Claudio gravatar image

updated 2014-01-28 17:14:23 -0500

ngrennan gravatar image

Hello fellow ROSers. I have compiled Fuerte from sources on an ACME FoxG20 board running embedian 6 wheezy (armv5tejl platform). I am now attempting to compile the publisher/subscriber tutorial.

Everything appears to work, and it compiles fine. Problem is: I always get this error

[ERROR] [1353939756.715474051]: Exception thrown when deserializing message of length [164] from [/add_two_ints_server]: Buffer Overrun

The same code runs flawlessly on my computer. Whatever mixture of node topology I use, when any node (core, server, client... doesn't matter) is run on the ARM, I get this error. I suspect it may have something to do with the network buffers, but I can't believe such a stupid example can overflow the buffer.

I already enlarged all TCP related buffers, so this shouldn't be the problem. Where else should I look for a solution?


doing a grep -lri "buffer overrun" in ros-underlay returns


This here gives the function name


Doing another grep on this yields:


Reading the serialization.h I did a grep on both ROSCPP_SERIALIZATION_DECL and StreamOverrunException whose result is


Since this is leading me nowhere I decide to grep on the first part of the error message "Exception thrown when..." and this gives


    SubscriptionCallbackHelperDeserializeParams params;
    params.buffer = serialized_message_.message_start;
    params.length = serialized_message_.num_bytes - (serialized_message_.message_start - serialized_message_.buf.get());
    params.connection_header = connection_header_;
    msg_ = helper_->deserialize(params);
  catch (std::exception& e)
    ROS_ERROR("Exception thrown when deserializing message of length [%d] from [%s]: %s", (uint32_t)serialized_message_.num_bytes, (*connection_header_)["callerid"].c_str(), e.what());

So somehow the try fails. Now how do I debug this???

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-11-27 06:28:23 -0500

Brian Gerkey gravatar image

I would guess that your ARM machine is configured to run big-endian. The ROS communication protocol uses little-endian on the wire and as far as I know, roscpp's seralizer doesn't account for running on a big-endian host.

Adding big-endian support to roscpp has been discussed.

But you can likely work around your problem by configuring your ARM machine to run as little-endian instead of big-endian. There's usually a way to do that.

Btw, I would expect rospy to work properly across mixed-endian machines as it's using Python's struct module to implement serialization.

edit flag offensive delete link more


I am the same error with same architecture (AT91SAM9G25) and same debian version. I have build ros-groovy myself. With "dpkg-architecture" I know that my machine is little-endian. So, how I can resolve this error? Claudio, you have answer?

enodiesop gravatar image enodiesop  ( 2013-05-03 06:07:35 -0500 )edit

Years later I run into the same problem, with ros-fuerte on an ARM host running squeeze. Host is little-endian, cross-compiled code says it is little endian. Saw some post on ros-users that mentioned sizeof int8 vs int32, maybe this is the problem. Can anyone shed light on what they found?

dave.peacock gravatar image dave.peacock  ( 2014-02-25 07:54:17 -0500 )edit

Question Tools


Asked: 2012-11-26 02:38:38 -0500

Seen: 2,097 times

Last updated: Nov 27 '12