segfault eigen RobotState ROS Kinetic + PCL

asked 2019-10-31 07:39:14 -0600

Alessio gravatar image

updated 2019-10-31 12:17:46 -0600

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 "full_sequence" received signal SIGSEGV, Segmentation fault. 0x00000000006c1edd in double __vector Eigen::internal::pload<double __vector="">(Eigen::internal::unpacket_traits<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 ...
(more)
edit retag flag offensive close merge delete

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.

gvdhoorn gravatar image gvdhoorn  ( 2019-10-31 09:06:07 -0600 )edit

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.

Alessio gravatar image Alessio  ( 2019-10-31 12:04:58 -0600 )edit