mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
e84521dc44
Yes, there is one.... I've seen two flaky builds on sn-devel with pthreadpool after the coverity checks went in. They were in the ret = pthread_mutex_unlock(&pool->mutex); assert(ret == 0); in pthreadpool_parent() and pthreadpool_child(). No idea what that was, I could not really reproduce that. A build attempt on FreeBSD also gave an erratic error, this time it was an EINVAL in ret = pthread_mutex_lock(&pool->mutex); assert(ret == 0); pthreadpool_parent(). EINVAL means that the mutex is not a proper mutex. What happened: Someone (a detached thread) does the pthreadpool_free behind our back, while we are in pthreadpool_parent, preparing the fork. Unfortunately the mutex was already destroyed before we came to lock it. The fix is simple: Remove the obsolete struct pthreadpool from the linked list before the mutex is destroyed. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> |
||
---|---|---|
.. | ||
Makefile | ||
pthreadpool_pipe.c | ||
pthreadpool_pipe.h | ||
pthreadpool_sync.c | ||
pthreadpool_tevent.c | ||
pthreadpool_tevent.h | ||
pthreadpool.c | ||
pthreadpool.h | ||
tests.c | ||
wscript_build |