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

Illegal instruction in serialize on Gumstix

asked 2012-05-27 07:44:38 -0600

TommyP gravatar image

I am running Fuerte on a Ubuntu Lucid installed on a Gumstix Overo. I get an illegal instruction in serialization code:

Program received signal SIGILL, Illegal instruction.
[Switching to Thread 0x445c4420 (LWP 2640)]
0x001313b8 in ros::serialization::Serializer<double>::read<ros::serialization::IStream> (stream=..., v=@0x1965f0)
    at /opt/ros/fuerte/include/ros/serialization.h:201
201     ROS_CREATE_SIMPLE_SERIALIZER(double);

The backtrace is:

(gdb) bt
#0  0x001313b8 in ros::serialization::Serializer<double>::read<ros::serialization::IStream> (stream=..., v=@0x1965f0)
    at /opt/ros/fuerte/include/ros/serialization.h:201
#1  0x001312c6 in ros::serialization::deserialize<double, ros::serialization::IStream> (stream=..., t=@0x1965f0)
    at /opt/ros/fuerte/include/ros/serialization.h:161
#2  0x00131192 in next<double> (stream=..., m=...)
    at /opt/ros/fuerte/include/ros/serialization.h:716
#3  ros::serialization::Serializer<lrs_srvs::LQFlyqAddFlyto3dMRequest_<std::allocator<void> > >::allInOne<ros::serialization::IStream, lrs_srvs::LQFlyqAddFlyto3dMRequest_<std::allocator<void> >&> (stream=..., m=...)
    at /home/witas/svnwitas/ros/lrs/lrs_srvs/srv_gen/cpp/include/lrs_srvs/LQFlyqAddFlyto3dM.h:268
#4  0x0012f82a in ros::serialization::Serializer<lrs_srvs::LQFlyqAddFlyto3dMRequest_<std::allocator<void> > >::read<ros::serialization::IStream, lrs_srvs::LQFlyqAddFlyto3dMRequest_<std::allocator<void> > > (stream=..., t=...)
    at /home/witas/svnwitas/ros/lrs/lrs_srvs/srv_gen/cpp/include/lrs_srvs/LQFlyqAddFlyto3dM.h:278
#5  0x0012deda in ros::serialization::deserialize<lrs_srvs::LQFlyqAddFlyto3dMRequest_<std::allocator<void> >, ros::serialization::IStream> (stream=..., 
    t=...) at /opt/ros/fuerte/include/ros/serialization.h:161
#6  0x0012b882 in ros::serialization::deserializeMessage<lrs_srvs::LQFlyqAddFlyto3dMRequest_<std::allocator<void> > > (m=..., message=...)
    at /opt/ros/fuerte/include/ros/serialization.h:857
#7  0x001238e6 in ros::ServiceCallbackHelperT<ros::ServiceSpec<lrs_srvs::LQFlyqAddFlyto3dMRequest_<std::allocator<void> >, lrs_srvs::LQFlyqAddFlyto3dMResponse_<std::allocator<void> > > >::call (this=0x19af40, params=...)
    at /opt/ros/fuerte/include/ros/service_callback_helper.h:194
#8  0x4019b850 in ros::ServiceCallback::call() ()
   from /opt/ros/fuerte/lib/libroscpp.so
#9  0x401e424c in ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS*) ()
   from /opt/ros/fuerte/lib/libroscpp.so
#10 0x401e3da6 in ros::CallbackQueue::callAvailable(ros::WallDuration) ()
   from /opt/ros/fuerte/lib/libroscpp.so
#11 0x4024602c in ros::SingleThreadedSpinner::spin(ros::CallbackQueue*) ()
   from /opt/ros/fuerte/lib/libroscpp.so
#12 0x402271be in ros::spin(ros::Spinner&) ()
   from /opt/ros/fuerte/lib/libroscpp.so
#13 0x40227176 in ros::spin() () from /opt/ros/fuerte/lib/libroscpp.so
#14 0x000da9e0 in spin_thread ()
    at /home/witas/svnwitas/ros/lrs/lrs_quadsim/src/quadconnect.cc:81
#15 0x0011f4a0 in boost::detail::thread_data<void (*)()>::run (this=0x1a24f8)
    at /usr/include/boost/thread/detail/thread.hpp:56
#16 0x4040d792 in thread_proxy () from /usr/lib/libboost_thread.so.1.40.0
#17 0x4040d792 in thread_proxy () from /usr/lib/libboost_thread.so.1.40.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Any idea if this is a bug in my code or a bug in the ROS code? Is this any known issue with a work around?

Or what can I do to debug this more and solve the problem?

edit retag flag offensive close merge delete

Comments

Did you install from source or debian packages?

ahendrix gravatar image ahendrix  ( 2012-05-28 09:23:45 -0600 )edit

I compiled from source. Are there Ubuntu or Debian packages for Gumstix or for Arm?

TommyP gravatar image TommyP  ( 2012-05-28 12:19:06 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2012-05-31 13:27:50 -0600

TommyP gravatar image

I changed my definition of the srv so that the floats/doubles became 32 bits aligned (changed an uint8 to uint32). And with that change the program works. So this is definitely a 32 bits alignment problem in the code generated for the srv.

Maybe it should be documented somewhere that this problem exists and what a possible work around is?

edit flag offensive delete link more
1

answered 2012-05-28 12:22:52 -0600

TommyP gravatar image

updated 2012-05-28 12:37:40 -0600

I have not confirmed it yet but it seems like unaligned floats are not allowed.

See: http://comments.gmane.org/gmane.linux.distributions.gumstix.general/54616

I will test the work around with -msoft-float clag to the compiler and see if the problem goes away. But it took hours to compile so it will take some time to test.

I tested to change float64 to float32 but no change.

This issue seems also to be discussed here:

http://www.ros.org/wiki/eros/alignment

edit flag offensive delete link more
0

answered 2013-03-04 03:26:03 -0600

Raptor gravatar image

I posted a similar issue here: http://answers.ros.org/question/52326/arm-architecture-with-armhf-port-move_base-bus-error-alignment-trapexception/

From the several issues that relate to this same problem, it seems like the problem is in the de-/serialization code!

There is still no real solutions to fix this bug on armhf ARM platforms. Things seem to work fine on armel.

edit flag offensive delete link more

Comments

I saw that. That is worrying since we have seriously started to use the Gumstix with armhf. For not the camera driver works OK. A real solution is really needed.

TommyP gravatar image TommyP  ( 2013-03-04 09:22:13 -0600 )edit
Raptor gravatar image Raptor  ( 2013-03-05 05:58:40 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2012-05-27 07:44:38 -0600

Seen: 415 times

Last updated: Mar 04 '13