Gazebo crash "void boost::recursive_mutex::lock(): Assertion `!pthread_mutex_lock(&m)' failed."
Hello,
gzserver is crashing apparently at a random time with the following error :
gzserver: /usr/include/boost/thread/pthread/recursive_mutex.hpp:113: void boost::recursive_mutex::lock(): Assertion `!pthread_mutex_lock(&m)' failed.
Aborted (core dumped)
[gazebo-3] process has died [pid 3901, exit code 134
there is no other error message.
This crash occur after running the same simulation several hours straight. Sometimes it crash after 2 hours, sometimes after more than 10 hours.
My gazebo is installed via apt, and I use it with ROS. I added a model plugin and a sensor plugin, but I use only the gazebo API in it, and I'm not using directly any mutex or thread.
How can I set the backtrace to report the crashed gazebo file, and not only the boost library file, which is not very helpful ? Does anyone have an idea on what could cause this crash ?
I have the same problem. It would be a big relief to get a solution for this, as I need to run the simulation for as long as possible for machine learning training and the crashes are a huge setback for that.
I made some tests on an other computer, but this time with gazebo installed from source with the gazebo9 branch, and the problem seems to disappear. So I don't know if this is computer dependent or if there is an issue with the gazebo from apt.
Did you ever rootcause this? I have the same crash message, but in a ROS application that does not use Gazebo. E.g. did you notice if it was related to boost version?
In my case, this bug appears only with gazebo binary from apt. I didn't saw it with other apt binary ros application.