15 May
2013
15 May
'13
9:33 a.m.
Edgar Fuß wrote:
Just for the sake of the archives: This turned out NOT to be a FreeRADIUS bug.
That's nice.
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()).
Ah. The simple answer is "don't do that". Having layers of competing library dependencies is wrong. Alan DeKok.