actionlib icon indicating copy to clipboard operation
actionlib copied to clipboard

ActionServer crash on deconstrucion

Open astumpf opened this issue 10 years ago • 1 comments

I've been able to reproduce an issue, when using the action server. When I terminate the program, the executable terminates each time with:

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
  what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument

This is the callstack:

Thread 6 (Thread 0x7f872971d700 (LWP 22968)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
No locals.
#1  0x00007f8731388bcb in ros::ROSOutAppender::logThread() () from /opt/ros/indigo/lib/libroscpp.so
No symbol table info available.
#2  0x00007f8730830a4a in ?? () from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.54.0
No symbol table info available.
#3  0x00007f873060f182 in start_thread (arg=0x7f872971d700) at pthread_create.c:312
        __res = <optimized out>
        pd = 0x7f872971d700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140218492638976, -1329213057410763180, 0, 0, 140218492639680, 140218492638976, 1334188262192346708, 1334137537842804308}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#4  0x00007f872fe2247d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
No locals.

Thread 1 (Thread 0x7f8731d4c7c0 (LWP 22964)):
#0  0x00007f872fd5ecc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
        resultvar = 0
        pid = 22964
        selftid = 22964
#1  0x00007f872fd620d8 in __GI_abort () at abort.c:89
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {0, 32299864, 140218631443799, 140217797312517, 0, 140218603567208, 140218599664936, 140218603567208, 32299864, 32288736, 140218631472405, 140218633340832, 140218600601741, 1, 140218633343184, 32326336}}, sa_flags = 10, sa_restorer = 0x7f8731d4c7c0}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x00007f8730363535 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#3  0x00007f87303616d6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#4  0x00007f8730360799 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#5  0x00007f873036134a in __gxx_personality_v0 () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#6  0x00007f87300fcfd3 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
No symbol table info available.
#7  0x00007f87300fd4f7 in _Unwind_Resume () from /lib/x86_64-linux-gnu/libgcc_s.so.1
No symbol table info available.
#8  0x00007f8731338b29 in ros::Timer::Impl::~Impl() () from /opt/ros/indigo/lib/libroscpp.so
No symbol table info available.
#9  0x00007f873133a452 in boost::detail::sp_counted_impl_p<ros::Timer::Impl>::dispose() () from /opt/ros/indigo/lib/libroscpp.so
No symbol table info available.
#10 0x00007f8731338859 in ros::Timer::~Timer() () from /opt/ros/indigo/lib/libroscpp.so
No symbol table info available.
#11 0x00007f873191878c in actionlib::ActionServer<vigir_pluginlib_msgs::GetPluginDescriptionsAction_<std::allocator<void> > >::~ActionServer (this=0x1ed8320, __in_chrg=<optimized out>) at /opt/ros/indigo/include/actionlib/server/action_server_imp.h:116
No locals.
#12 0x00007f8731918834 in actionlib::ActionServer<vigir_pluginlib_msgs::GetPluginDescriptionsAction_<std::allocator<void> > >::~ActionServer (this=0x1ed8320, __in_chrg=<optimized out>) at /opt/ros/indigo/include/actionlib/server/action_server_imp.h:116
No locals.
#13 0x00007f873191501c in boost::checked_delete<actionlib::ActionServer<vigir_pluginlib_msgs::GetPluginDescriptionsAction_<std::allocator<void> > > > (x=0x1ed8320) at /usr/include/boost/checked_delete.hpp:34
No locals.
#14 0x00007f87319236b8 in boost::detail::sp_counted_impl_p<actionlib::ActionServer<vigir_pluginlib_msgs::GetPluginDescriptionsAction_<std::allocator<void> > > >::dispose (this=0x1ed7920) at /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:78
No locals.
#15 0x000000000047e19c in boost::detail::sp_counted_base::release (this=0x1ed7920) at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:146
No locals.
#16 0x000000000047e25f in boost::detail::shared_count::~shared_count (this=0x1ed8170, __in_chrg=<optimized out>) at /usr/include/boost/smart_ptr/detail/shared_count.hpp:371
No locals.
#17 0x00007f87318f150a in boost::shared_ptr<actionlib::ActionServer<vigir_pluginlib_msgs::GetPluginDescriptionsAction_<std::allocator<void> > > >::~shared_ptr (this=0x1ed8168, __in_chrg=<optimized out>) at /usr/include/boost/smart_ptr/shared_ptr.hpp:328
No locals.
#18 0x00007f8731918a32 in actionlib::SimpleActionServer<vigir_pluginlib_msgs::GetPluginDescriptionsAction_<std::allocator<void> > >::~SimpleActionServer (this=0x1ed80e0, __in_chrg=<optimized out>) at /opt/ros/indigo/include/actionlib/server/simple_action_server_imp.h:143
No locals.
#19 0x00007f873191526a in boost::checked_delete<actionlib::SimpleActionServer<vigir_pluginlib_msgs::GetPluginDescriptionsAction_<std::allocator<void> > > > (x=0x1ed80e0) at /usr/include/boost/checked_delete.hpp:34
No locals.
#20 0x00007f8731923656 in boost::detail::sp_counted_impl_p<actionlib::SimpleActionServer<vigir_pluginlib_msgs::GetPluginDescriptionsAction_<std::allocator<void> > > >::dispose (this=0x1ed79f0) at /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:78
No locals.
#21 0x000000000047e19c in boost::detail::sp_counted_base::release (this=0x1ed79f0) at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:146
No locals.
#22 0x000000000047e25f in boost::detail::shared_count::~shared_count (this=0x1ed44b8, __in_chrg=<optimized out>) at /usr/include/boost/smart_ptr/detail/shared_count.hpp:371
No locals.
#23 0x00007f87318ee09c in boost::shared_ptr<actionlib::SimpleActionServer<vigir_pluginlib_msgs::GetPluginDescriptionsAction_<std::allocator<void> > > >::~shared_ptr (this=0x1ed44b0, __in_chrg=<optimized out>) at /usr/include/boost/smart_ptr/shared_ptr.hpp:328
No locals.
#24 0x00007f87318e49fb in vigir_pluginlib::PluginManager::~PluginManager (this=0x1ed4430, __in_chrg=<optimized out>) at /home/alex/thor/src/vigir/vigir_pluginlib/vigir_pluginlib/src/plugin_manager.cpp:14
No locals.
#25 0x00007f8731911818 in boost::checked_delete<vigir_pluginlib::PluginManager> (x=0x1ed4430) at /usr/include/boost/checked_delete.hpp:34
No locals.
#26 0x00007f87319236fa in boost::detail::sp_counted_impl_p<vigir_pluginlib::PluginManager>::dispose (this=0x1ed2de0) at /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:78
No locals.
#27 0x000000000047e19c in boost::detail::sp_counted_base::release (this=0x1ed2de0) at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:146
No locals.
#28 0x000000000047e25f in boost::detail::shared_count::~shared_count (this=0x7f8731b6d918 <vigir_pluginlib::PluginManager::singelton+8>, __in_chrg=<optimized out>) at /usr/include/boost/smart_ptr/detail/shared_count.hpp:371
No locals.
#29 0x00007f87318ee074 in boost::shared_ptr<vigir_pluginlib::PluginManager>::~shared_ptr (this=0x7f8731b6d910 <vigir_pluginlib::PluginManager::singelton>, __in_chrg=<optimized out>) at /usr/include/boost/smart_ptr/shared_ptr.hpp:328
No locals.
#30 0x00007f872fd645ea in __cxa_finalize (d=0x7f8731b6cf90) at cxa_finalize.c:56
        check = 289
        cxafn = <optimized out>
        cxaarg = <optimized out>
        f = 0x1ec83c0
        funcs = 0x1ec80b0
#31 0x00007f87318e2173 in __do_global_dtors_aux () from /home/alex/thor/devel/lib/libvigir_pluginlib.so
No symbol table info available.
#32 0x00007ffd2e4cb300 in ?? ()
No symbol table info available.
#33 0x00007f8731b7e73a in _dl_fini () at dl-fini.c:252
        array = 0x7f8731b63740
        i = 0
        nmaps = 32647
        nloaded = <optimized out>
        i = 2
        l = 0x7f8731d8f790
        ns = 140218599884266
        maps = 0x7ffd2e4cb160
        maps_size = 140218631376784
        do_audit = 836302736
        __PRETTY_FUNCTION__ = "_dl_fini"
Backtrace stopped: frame did not save the PC

This will not happen, when I initialize the ActionServer, but not start it.

The entire code can be found here: https://github.com/team-vigir/vigir_pluginlib/blob/master/vigir_pluginlib/src/plugin_manager.cpp

I'm using Ubuntu 14.04 with Indigo.

astumpf avatar Dec 18 '15 19:12 astumpf

Can confirm, I receive the same error as well after closing axclient.py.

$ rosrun actionlib axclient.py /pbd_action_exicute/goal
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
  what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument
Aborted

$ apt-cache show ros-indigo-actionlib
Package: ros-indigo-actionlib
Version: 1.11.6-0trusty-20160628-074812-0700
Architecture: amd64
Maintainer: Mikael Arguedas <[email protected]>
Installed-Size: 1402
Depends: libboost-system1.54.0, libboost-thread1.54.0, libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.6), libboost-all-dev, ros-indigo-actionlib-msgs, ros-indigo-message-runtime, ros-indigo-roscpp, ros-indigo-rospy, ros-indigo-rostest, ros-indigo-std-msgs
Homepage: http://www.ros.org/wiki/actionlib
Priority: extra
Section: misc
Filename: pool/main/r/ros-indigo-actionlib/ros-indigo-actionlib_1.11.6-0trusty-20160628-074812-0700_amd64.deb
Size: 125538
SHA256: 7d0b6dddc42f84dbfd71ba639e69b07cdcdd01878d6e96b9a8eca3da53c7e9cc
SHA1: 6f8c01fc989d81b67c58d14cc3c86a93695c2502
MD5sum: 1a6a0da45cccfc4c620e8c8d2bc7c52c
Description: The actionlib stack provides a standardized interface for interfacing with preemptable tasks.
 Examples of this include moving the base to a target location, performing a laser scan and returning the resulting point cloud, detecting the handle of a door, etc.
Description-md5: 3d0ff72234d7055f40b8fe52fec4a296

ruffsl avatar Mar 04 '17 03:03 ruffsl