Robotics StackExchange | Archived questions

segfault eigen RobotState ROS Kinetic + PCL

Hi, I'm working on a project with ROS Kinetic and PCL 1.9.1. I'm on ubuntu 16.04

Sometimes I get a segmentation fault as the following: Thread 1 "fullsequence" received signal SIGSEGV, Segmentation fault. 0x00000000006c1edd in double _vector Eigen::internal::pload(Eigen::internal::unpackettraits<double _vector>::type const*) ()

This problem occurs when I call a lot of nodes in sequence inside a state machine. I googled and it can be due to a problem with the memory alignment done by the eigen library. Currently the eigen version that I have installed is the 3.2.9

Is there any preferred version of eigen to work with in both ROS and PCL?

EDIT: Below the backtrace of the segfault

Thread 1 "full_sequence" received signal SIGSEGV, Segmentation fault.
0x00000000006c1e5f in double __vector Eigen::internal::pload<double __vector>(Eigen::internal::unpacket_traits<double __vector>::type const*) ()
(gdb) bt full
#0  0x00000000006c1e5f in double __vector Eigen::internal::pload<double __vector>(Eigen::internal::unpacket_traits<double __vector>::type const*) ()
No symbol table info available.
#1  0x00000000006e0f58 in double __vector Eigen::internal::evaluator<Eigen::PlainObjectBase<Eigen::Matrix<double, 4, 4, 0, 4, 4> > >::packet<32, double __vector>(long, long) const ()
No symbol table info available.
#2  0x00000000006e046c in void Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<double, 4, 4, 0, 4, 4> >, Eigen::internal::evaluator<Eigen::Matrix<double, 4, 4, 0, 4, 4> >, Eigen::internal::assign_op<double>, 0>::assignPacket<16, 32, double __vector>(long, long) ()
No symbol table info available.
#3  0x00000000006df63f in void Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<double, 4, 4, 0, 4, 4> >, Eigen::internal::evaluator<Eigen::Matrix<double, 4, 4, 0, 4, 4> >, Eigen::internal::assign_op<double>, 0>::assignPacketByOuterInner<16, 32, double __vector>(long, long) ()
No symbol table info available.
#4  0x00000000006ddf52 in Eigen::internal::copy_using_evaluator_innervec_CompleteUnrolling<Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<double, 4, 4, 0, 4, 4> >, Eigen::internal::evaluator<Eigen::Matrix<double, 4, 4, 0, 4, 4> >, Eigen::internal::assign_op<double>, 0>, 0, 16>::run(Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<double, 4, 4, 0, 4, 4> >, Eigen::internal::evaluator<Eigen::Matr--Type <RET> for more, q to quit, c to continue without paging--
ix<double, 4, 4, 0, 4, 4> >, Eigen::internal::assign_op<double>, 0>&) ()
No symbol table info available.
#5  0x00007ffff7125c1d in moveit::core::RobotState::updateLinkTransformsInternal(moveit::core::JointModel const*) ()
   from /opt/ros/kinetic/lib/libmoveit_robot_state.so.0.9.17
No symbol table info available.
#6  0x00007ffff7125d52 in moveit::core::RobotState::updateLinkTransforms() ()
   from /opt/ros/kinetic/lib/libmoveit_robot_state.so.0.9.17
No symbol table info available.
#7  0x00007ffff785a233 in moveit::planning_interface::MoveGroupInterface::getCurrentPose(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
   from /opt/ros/kinetic/lib/libmoveit_move_group_interface.so.0.9.17
No symbol table info available.
#8  0x00000000006564a0 in ArmControl::computeCartesianTrajectoryPostGrasp(double, moveit_msgs::RobotTrajectory_<std::allocator<void> >&) ()
No symbol table info available.
#9  0x0000000000657364 in ArmControl::postGraspApproach(geometry_msgs::Pose_<std::allocator<void> >, double) ()
No symbol table info available.
#10 0x000000000064e69c in MoveArmPostGrasp::tick() ()
No symbol table info available.
#11 0x00007ffff7b9c6af in BT::TreeNode::executeTick() ()
--Type <RET> for more, q to quit, c to continue without paging--
   from /opt/ros/kinetic/lib/libbehaviortree_cpp_v3.so
No symbol table info available.
#12 0x00007ffff7b856fb in BT::SyncActionNode::executeTick() ()
   from /opt/ros/kinetic/lib/libbehaviortree_cpp_v3.so
No symbol table info available.
#13 0x00007ffff7bb0b55 in BT::SequenceNode::tick() ()
   from /opt/ros/kinetic/lib/libbehaviortree_cpp_v3.so
No symbol table info available.
#14 0x00007ffff7b9c6af in BT::TreeNode::executeTick() ()
   from /opt/ros/kinetic/lib/libbehaviortree_cpp_v3.so
No symbol table info available.
#15 0x0000000000633643 in main ()
No symbol table info available.

Asked by Alessio on 2019-10-31 07:39:14 UTC

Comments

Not necessarily preferred, but all packages distributed by the ROS buildfarm will be using the version of Eigen that is distributed for the version of Ubuntu/Debian/Some Other OS that the package is built for.

Using any other version could result in SEGFAULTs, but it depends on a nr of factors, which we cannot guess and only you would be able to identify.

Asked by gvdhoorn on 2019-10-31 09:06:07 UTC

Hi, thanks for the reply. It makes sense and I was expecting this kind of answer but I asked to be sure. I have updated my question with the backtrace of the segfault, maybe someone can give me a hint.

The funny thing is that the segfault appears only randomly. It seems that all begins inside the RobotState class.

Asked by Alessio on 2019-10-31 12:04:58 UTC

Answers