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

SIGSEGV in waitForTimeTransform in docker

asked 2018-09-19 05:38:55 -0500

mojovski gravatar image

I am facing a strange SIGSEGV error inside the TF module, when used in a docker container.

In short: the method tf::Transformer::waitForTransform(...) causes a segmentation fault! See this repository to reproduce the error quickly: https://github.com/mojovski/tf_docker...

In long: The waitForTransform in these lines causes the crash:

std::string global_frame="map";
std::string robot_frame="base_link";
try{
  ROS_INFO_STREAM("timenow: " << ros::Time::now().toSec());
  bool res=listener.waitForTransform(global_frame, robot_frame,
                           ros::Time::now(), ros::Duration(0.1), ros::Duration(0.1),
                           &err_msg);
}
catch (tf::TransformException ex){
  ROS_ERROR("%s",ex.what());
}

Strangely, it runs on my Ubuntu 16.04 machine. But when I also use Ubuntu16.04 inside docker, this crashes.

If you do the steps in the readme here https://github.com/mojovski/tf_docker... , you will get this stack trace:

    Thread 1 "test179" received signal SIGSEGV, Segmentation fault.
0x00007ffff73bddda in ros::TimeBase<ros::Time, ros::Duration>::operator+(ros::Duration const&) const () from /opt/ros/kinetic/lib/librostime.so
(gdb) bt
#0  0x00007ffff73bddda in ros::TimeBase<ros::Time, ros::Duration>::operator+(ros::Duration const&) const () from /opt/ros/kinetic/lib/librostime.so
#1  0x00007ffff65d6013 in tf2_ros::Buffer::canTransform(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ros::Time const&, ros::Duration, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) const () from /opt/ros/kinetic/lib/libtf2_ros.so
#2  0x00007ffff7bb6a3f in tf::Transformer::waitForTransform(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ros::Time const&, ros::Duration const&, ros::Duration const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) const ()
   from /opt/ros/kinetic/lib/libtf.so
#3  0x000000000040a8ac in main (argc=1, argv=0x7fffffffe448) at /root/catkin_ws/src/test179/src/test_bug179.cpp:31

After some days of looking for a reason, I hope now that someone can help me with that.

Thanks a lot in advance!

PS: I Also created an issue about this here: https://github.com/ros/geometry/issue...

edit retag flag offensive close merge delete

Comments

Seeing ros::Time mentioned here: did you update all ROS packages in the Docker container? In your Dockerfile I only see it installing a few additional pkgs after starting from ros:kinetic.

There has been a recent ABI breakage, so it might be that the ros:kinetic image you're using ..

gvdhoorn gravatar image gvdhoorn  ( 2018-09-19 05:54:40 -0500 )edit

.. still has the state from before the breakage, necessitating a full update of all ROS pkgs in order to avoid SEGFAULTs.

See also #q303093.

gvdhoorn gravatar image gvdhoorn  ( 2018-09-19 05:55:45 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-09-19 05:55:40 -0500

mojovski gravatar image

updated 2018-09-19 05:55:52 -0500

If I use the "recent" branch kinetic-devel from here https://github.com/ros/roscpp_core the error disappears.

edit flag offensive delete link more

Comments

That's not needed, see my answer.

gvdhoorn gravatar image gvdhoorn  ( 2018-09-19 05:57:11 -0500 )edit
0

answered 2018-09-19 05:56:30 -0500

gvdhoorn gravatar image

According to the second answer to #q303093, this is related to the recent ABI breakage:

We were seeing a (related) issue with our docker builds, however we _were_ compiling our code in the image. Our problem looks like it is from the released ros:kinetic docker image not having the latest update in it (despite being updated 6 days ago). So the packages we were installing were built against a newer (non-backward compatible) versions of base packages than were installed on the image (_and_ those packages didn't call out needing the newer base packages).

Needed action from OSRF: Update the ros:kinetic docker image

I assume the docker image is built inside the build farm and triggered by the release, so I'm a little surprised that it is behind. I think something needs to be updated on the build farm to prevent this from happening again.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-09-19 05:38:55 -0500

Seen: 305 times

Last updated: Sep 19 '18