Gazebo thread died with error code -6 [closed]

asked 2012-04-13 06:12:40 -0600

Erwan R. gravatar image

updated 2014-11-22 17:05:06 -0600

ngrennan gravatar image

Hello ROS community !

I just started working with ROS electric pr2 simulator this week in the idea of testing different algorithms for navigation. I installed it successfully and followed the very first tutorials about launching the simulator and loading a model, plus using keyboard control and rviz. In using Linux/Ubuntu 10.04 on Dell Precision T3400 with Intel Core 2 Duo 3.16GHz, nVidia Corporation G84 [Quadro FX 1700] G-card,

Everything's working quite well, but when I stop using the simulator, it crashes after a random (?) period of time.

I tried launch the simulation in two different ways : these commands in separate terminals :

roslaunch gazebo_worlds empty_world.launch

roslaunch pr2_gazebo pr2.launch

roslaunch pr2_teleop teleop_keyboard.launch

rosrun rviz rviz

This usually result in a crash with mutex error :

gazebo: /usr/include/boost/thread/pthread/recursive_mutex.hpp:62: boost::recursive_mutex::~recursive_mutex(): Assertion!pthread_mutex_destroy(&m)' failed.

[gazebo-2] process has died [pid 16499, exit code -6]. log files: /home/renaudo/.ros/log/c4610322-857e-11e1-9c53-002219119be4/gazebo-2*.log`

The second is in my opinion equivalent but let's share that : I replace the two first commands by :

roslaunch pr2_gazebo pr2_empty_world.launch

And :

terminate called after throwing an instance of 'char const*'

[gazebo-2] process has died [pid 20172, exit code -6]. log files: /home/renaudo/.ros/log/2ed25e52-8581-11e1-a4c3-002219119be4/gazebo-2*.log

In both cases the process died with error code -6 and considering other posts of this forum, I think it's a segfault or something like that. I sometimes happens when minimizing windows. Could somebody confirm a Graphical card issue or have any idea of the problem source ?

EDIT : Adding backtrace for info :

(gdb) backtrace 
#0  0x00007fa2f07b5a75 in raise ()
from /lib/
#1  0x00007fa2f07b95c0 in abort ()
from /lib/
#2  0x00007fa2f106b8c5 in __gnu_cxx::__verbose_terminate_handler() ()
from /usr/lib/
#3  0x00007fa2f1069cf6 in ?? ()
from /usr/lib/
#4  0x00007fa2f1069d23 in std::terminate() ()
from /usr/lib/
#5  0x00007fa2f1069e1e in __cxa_throw ()
from /usr/lib/
#6  0x00007fa2f85865bd in libgazebo::Iface::Close (this=0x1bfee20)
at /tmp/buildd/ros-electric-simulator-gazebo-1.4.13/debian/ros-electric-simulator-gazebo/opt/ros/electric/stacks/simulator_gazebo/gazebo/build/gazebo/libgazebo/
#7  0x00007fa2f8864a26 in ~Factory (this=0x1c2b8a0, __in_chrg=<value optimized out>)
at /tmp/buildd/ros-electric-simulator-gazebo-1.4.13/debian/ros-electric-simulator-gazebo/opt/ros/electric/stacks/simulator_gazebo/gazebo/build/gazebo/server/
#8  0x00007fa2f882941a in gazebo::World::Fini (this=0x1965560)
at /tmp/buildd/ros-electric-simulator-gazebo-1.4.13/debian/ros-electric-simulator-gazebo/opt/ros/electric/stacks/simulator_gazebo/gazebo/build/gazebo/server/
#9  0x00007fa2f885e073 in gazebo::Simulator::Fini (this=0x175e0d0)
at /tmp/buildd/ros-electric-simulator-gazebo-1.4.13/debian/ros-electric-simulator-gazebo/opt/ros/electric/stacks/simulator_gazebo/gazebo/build/gazebo/server/
#10 0x0000000000460725 in main (argc=5, argv=<value optimized out>)
at /tmp/buildd/ros-electric-simulatorgazebo-1.4.13/debian/ros-electric-simulator-gazebo/opt/ros/electric/stacks/simulator_gazebo/gazebo/src/gazeboros.cpp:2630

(gdb) continue
[Thread 0x7fa2e19cd700 (LWP 28191) exited]
[Thread 0x7fa2e0798700 (LWP 28265) exited]
[Thread 0x7fa2b078e700 (LWP 29973) exited]
[Thread 0x7fa29c4fe700 (LWP 30398) exited]
[Thread 0x7fa2de794700 (LWP 28288) exited]

Program terminated ...
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2013-03-18 17:42:01


couple of questions: which nvidia driver are you using? can you get a backtrace of the crash? try gdb -p [pid]. thanks.

hsu gravatar image hsu  ( 2012-04-17 22:50:07 -0600 )edit

Thanks for answering.

Kernel driver in use: nvidia

Kernel modules: nvidia-current, nvidiafb, nouveau

NVIDIA driver version : 195.36.24 (quite old considering current 295.40 version but OS version is 10.04)

I'm gonna try to run the simulator with gdb and post the backtrace.

Erwan R. gravatar image Erwan R.  ( 2012-04-18 00:04:42 -0600 )edit

nouveau is the open source version of nvidia driver, from my experience, it is not very stable for gazebo needs. can you try installing one of the official nvidia drivers? (e.g. 285.05.33)

hsu gravatar image hsu  ( 2012-04-18 07:24:05 -0600 )edit

The most recent driver available from repositories looks to be v195.36.24 . Isn't that "dangerous" to install a more recent version by hand (I mean, making other programs crash - I'm not at ease with drivers stuff) ?

Erwan R. gravatar image Erwan R.  ( 2012-04-18 22:21:56 -0600 )edit

Please ask on about gazebo.

tfoote gravatar image tfoote  ( 2013-03-18 17:41:34 -0600 )edit

I know about answers gazebosim (the topic is quite old). Btw, I didn't update the question/answer, but I didn't encounter this problem again.

Erwan R. gravatar image Erwan R.  ( 2013-03-18 22:32:25 -0600 )edit