Expressmimo2 driver : __pthread_mutex_lock failed
On ExpressMimo2 configuration, oai exit on the following error:
../nptl/pthread_mutex_lock.c:80: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
This append because the watchdog thread try to release the 'watchdog_mutex' but it didn't get it previously due to a timeout condition (pthread_mutex_timedlock).
This condition append not on a regular basis. Sometime after a few minutes, sometimes after one or two hours. This is due (my hypothesis), that timed pthread system calls are using CLOCK_REALTIME internally that is not monotonic. So if the clock is updated by the system the timeout can be fired and we get the condition.
Resolution : protect mutex_unlock
Edited by Robert Schmidt