@pthread_mutexattr_setrobust@ or @pthread_mutexattr_setrobust_np@ is a pthread mutex attribute which makes the mutex immune to stale locks from deceased processes. When a process dies, one of the other threads waiting for the lock will get @EOWNERDEAD@, and are expected to clean up the mess before continuing. Cleaning up might be hard, but at least the processes are allowed to continue with an error, which is better than to hang. If you don't clean up, all subsequent attempts to lock will result in an error. When the last process has closed the DB, LMDB will reinitialize the mutex on the next open, at which point we should be back in business.
The change will need to be made inside LMDB itself, and is worth discussing with the author, if we decide to do this.
@pthread_mutexattr_setrobust@ is available on:
Not available on: