Build with multi-threads OFF and vectorisation ON results in double free corruption
(On the latest devel branch)
When building with multithreads OFF and vectorisation ON, the benchmarks segfault with a double free corruption.
The following is tested by running talos_legs:
- Multithreads OFF, vectorisation OFF: OK (8.89 ms)
- Multithreads ON, vectorisation OFF: OK (5.05 ms)
- Multithreads ON, vectorisation ON: OK (5.13 ms)
- Multithreads OFF, vectorisation ON: double free or corruption (out)
This is the backtrace for a crash:
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x00007ffff7a6d897 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff7b9ab9a "%s\n")
at ../sysdeps/posix/libc_fatal.c:181
#3 0x00007ffff7a7490a in malloc_printerr (str=str@entry=0x7ffff7b9c870 "double free or corruption (out)")
at malloc.c:5350
#4 0x00007ffff7a7be75 in _int_free (have_lock=0, p=0x555555ba2a70, av=0x7ffff7dcfc40 <main_arena>) at malloc.c:4278
#5 __GI___libc_free (mem=0x555555ba2a80) at malloc.c:3124
#6 0x00007fffdbe32543 in boost::python::objects::caller_py_function_impl<boost::python::detail::caller<boost::python::detail::member<Eigen::Matrix<double, -1, 1, 0, -1, 1>, pinocchio::ModelTpl<double, 0, pinocchio::JointCollectionDefaultTpl> >, boost::python::return_value_policy<boost::python::return_by_value, boost::python::default_call_policies>, boost::mpl::vector3<void, pinocchio::ModelTpl<double, 0, pinocchio::JointCollectionDefaultTpl>&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&> > >::operator()(_object*, _object*) ()
from /opt/openrobots/lib/python2.7/site-packages/pinocchio/libpinocchio_pywrap.so
#7 0x00007fffded76e55 in boost::python::objects::function::call(_object*, _object*) const ()
from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.65.1
#8 0x00007fffded77008 in ?? () from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.65.1
#9 0x00007fffded7dbcb in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const
() from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.65.1
#10 0x00007fffdf004493 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<eigenpy::Exception, void (*)(eigenpy::Exception const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(eigenpy::Exception const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) () from /opt/openrobots/lib/libeigenpy.so
#11 0x00007fffded7d96f in boost::python::handle_exception_impl(boost::function0<void>) ()
from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.65.1
#12 0x00007fffded746c9 in ?? () from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.65.1
#13 0x0000555555631fee in PyObject_CallFunction ()
This is on Ubuntu 18.04 using the latest devel branch of Crocoddyl with the latest robotpkg release of Pinocchio.