Samba hangs (pthread?)

Steve Langasek vorlon at
Sun Jun 11 08:06:53 GMT 2006

On Sun, Jun 11, 2006 at 05:30:02PM +1000, James Peach wrote:

> > Now I have a question: Does it hurt samba to have
> > linked into it?

> The problem is, no-one really knows. Linking with pthread causes certain
> libc internals to change in behaviour. There has been one such case on
> the list recently that involved sigaction. Now, linking with pthreads
> *shouldn't* cause a problem, but Samba isn't thoroughly tested with
> pthreads, and different versions of pthreads+libc have different bugs,
> so YMMV.

FWIW, the backtrace I was directed to showed a hang in libpthreads *after*
there had been a malloc-related failure in glibc, so it's fairly
inconclusive as to pthreads being to blame.

As far as why non-pthreaded libldap is a problem, we need to support LDAP
not just for Samba, but also for things like nss_ldap and pam_ldap which
need to be thread-safe -- having both threadsafe and non-threadsafe libldaps
loaded in memory causes random failures, having non-threadsafe-only libldap
loaded breaks threaded apps, having nss_ldap enabled means at least some
samba users are going to have libpthread loaded no matter what... there's
really just no winning here, short of somebody replacing NSS with a better

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon at                         
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url :

More information about the samba-technical mailing list