ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I've seen errors like this a few times; they usually happen when you attempt to lock the mutex after it has been destructed. I suggest you run your code in gdb, and look at the contents of the mutex and the stack trace when your program crashes.

If you have more than one thread, you may want to look at all of the threads to see what they're doing when your program crashes. You can use the thread apply all backtrace command in gdb to get a back trace from every thread at the time of the crash.

If you can, I also suggest that you set your system to produce core dumps (change the core dump size limit), collect several core dumps, and try to determine what they have in common (maybe crashes in the same function, or crashes on the same mutex but different functions, etc)

Errors in threading code can be very tricky to spot and debug. Keep at it, and you'll eventually figure it out.