13 May
2013
13 May
'13
3:03 p.m.
Hmm... it's not *holding* the mutex, it's *creating* it. Yes, sorry for mis-phrasing that.
That should be allowed, IIRC. Yes, it probably is.
Just for the sake of the archives: This turned out NOT to be a FreeRADIUS bug. After a lot of debugging, it turned out that radiusd, via initgroups() and nsswitch.conf, loaded nss_ldap, which pulled in libldap (the non-reentrant version). Also, radiusd, via rlm_ldap, pulled in libldap_r (the reentrant version). However, nss_ldap had registered a pthread_atfork handler, which intended to call ldap_drop_conenction() from libldap, but, because of PLT load-time-linking, in fact ended up calling ldap_drop_connection() from libldap_r. Boom (inside fork()).