Ask Your Question

Illegal instruction in serialize on Gumstix

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

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

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/
#9  0x401e424c in ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS*) ()
   from /opt/ros/fuerte/lib/
#10 0x401e3da6 in ros::CallbackQueue::callAvailable(ros::WallDuration) ()
   from /opt/ros/fuerte/lib/
#11 0x4024602c in ros::SingleThreadedSpinner::spin(ros::CallbackQueue*) ()
   from /opt/ros/fuerte/lib/
#12 0x402271be in ros::spin(ros::Spinner&) ()
   from /opt/ros/fuerte/lib/
#13 0x40227176 in ros::spin() () from /opt/ros/fuerte/lib/
#14 0x000da9e0 in spin_thread ()
    at /home/witas/svnwitas/ros/lrs/lrs_quadsim/src/
#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/
#17 0x4040d792 in thread_proxy () from /usr/lib/
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


Did you install from source or debian packages?

ahendrix gravatar image ahendrix  ( 2012-05-28 09:23:45 -0500 )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 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

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

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

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

TommyP gravatar image

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

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


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:

edit flag offensive delete link more

answered 2013-03-04 03:26:03 -0500

Raptor gravatar image

I posted a similar issue here:

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


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 -0500 )edit
Raptor gravatar image Raptor  ( 2013-03-05 05:58:40 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


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

Seen: 285 times

Last updated: Mar 04 '13