Red Hat Bugzilla – Bug 61117
Race condition between nss/dlopen/thread
Last modified: 2016-11-24 09:56:28 EST
There is a race condition between nss/dlopen/thread. The problem is
1. Thread A has called dlopen, and the global static initialiser inside
the shared object that's being dlopened is trying to call getservbyname
It's holding the dlopen lock, and trying to acquire the NSS lock.
2. Thread B also calls getservbyname, so we're holding the NSS lock
(which thread A is trying to acquire), and NSS is trying to dlopen a
Now. We're deadlocked, because we're trying to acquire the dlopen lock,
which is held by thread A. This is obviously quite sensitive to timing.
Since NSS also does dlopen, I think it should share locks with dlopen.
Created attachment 48424 [details]
I agree with Ulrich here, so WONTFIX.