Skip to content

Ubuntu 16.04 ros-kinetic crashes when loading the node #9

@Pedrous

Description

@Pedrous

Hey,

I am using Ubuntu 16.04 and I installed tensorflow 1.8.0 from source by following command:
bazel build --config=opt --define framework_shared_object=false tensorflow:libtensorflow_cc.so

I build the tensorflow_ros_cpp with this command:
catkin build tensorflow_ros_cpp --cmake-args -DTF_BAZEL_LIBRARY="/home/petrimanninen/tensorflow/bazel-bin/tensorflow/libtensorflow_framework.so" -DTF_BAZEL_SRC_DIR="/home/petrimanninen/tensorflow"

I made a dummy node with following CMakelists.txt:

cmake_minimum_required(VERSION 2.8.3)
project(testpkg)
add_definitions(-std=c++11)
find_package(catkin_simple 0.1.0 REQUIRED)
catkin_simple(ALL_DEPS_REQUIRED)
cs_add_executable(${PROJECT_NAME}_node src/test_node.cpp)

And with the following package.xml:

<?xml version="1.0"?>
<package format="2">
  <name>testpkg</name>
  <version>0.0.0</version>
  <description>The testpkg package</description>

  <buildtool_depend>catkin</buildtool_depend>
  <buildtool_depend>catkin_simple</buildtool_depend>
  <depend>roscpp</depend>
  <depend>tensorflow_ros_cpp</depend>
</export>
</package>

If I add the tensorflow_ros_cpp package as a dependency for my dummy package, ROS crashes immediately with segmentation fault when starting the node (otherwise it runs just fine). The output of GDB backtrace is following:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff4b9852b in google::protobuf::Arena::OnArenaAllocation(std::type_info const*, unsigned long) const ()
   from /home/petrimanninen/segmap_ws/devel/lib/libtensorflow_framework.so
(gdb) bt
#0  0x00007ffff4b9852b in google::protobuf::Arena::OnArenaAllocation(std::type_info const*, unsigned long) const ()
   from /home/petrimanninen/segmap_ws/devel/lib/libtensorflow_framework.so
#1  0x00007ffff4ac9201 in google::protobuf::FileDescriptorProto* google::protobuf::Arena::CreateMessage<google::protobuf::FileDescriptorProto>(google::protobuf::Arena*)
    () from /home/petrimanninen/segmap_ws/devel/lib/libtensorflow_framework.so
#2  0x00007ffff4211038 in google::protobuf::MessageLite::ParseFromArray(void const*, int) () from /usr/lib/x86_64-linux-gnu/libprotobuf.so.9
#3  0x00007ffff425a1b6 in google::protobuf::EncodedDescriptorDatabase::Add(void const*, int) () from /usr/lib/x86_64-linux-gnu/libprotobuf.so.9
#4  0x00007ffff421b9b8 in google::protobuf::DescriptorPool::InternalAddGeneratedFile(void const*, int) () from /usr/lib/x86_64-linux-gnu/libprotobuf.so.9
#5  0x00007ffff424a48c in google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() () from /usr/lib/x86_64-linux-gnu/libprotobuf.so.9
#6  0x00007ffff7de76ca in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffd5d8, env=env@entry=0x7fffffffd5e8) at dl-init.c:72
#7  0x00007ffff7de77db in call_init (env=0x7fffffffd5e8, argv=0x7fffffffd5d8, argc=1, l=<optimized out>) at dl-init.c:30
#8  _dl_init (main_map=0x7ffff7ffe168, argc=1, argv=0x7fffffffd5d8, env=0x7fffffffd5e8) at dl-init.c:120
#9  0x00007ffff7dd7c6a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#10 0x0000000000000001 in ?? ()
#11 0x00007fffffffd9e3 in ?? ()
#12 0x0000000000000000 in ?? ()

I assume that ROS is supposed to use the Ubuntu 16.04 provided protobuf version but somehow it gets linked to the tensorflow protobuf which then does not work, but I cannot quite figure out what to do with it?

Could someone please help me with this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions