Samba hangs (pthread?)

Rainer Weikusat rainer.weikusat at sncag.com
Sun Jun 11 20:56:20 GMT 2006


Steve Langasek <vorlon at debian.org> writes:
> On Sun, Jun 11, 2006 at 06:25:30PM +0200, Rainer Weikusat wrote:
>> >> Now I have a question: Does it hurt samba to have libpthread.so.0
>> >> 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,
>
>> For LinuxThreads (ie not NPTL) it decidedly should (and will), because
>> Samba changes its uid on oaccasion, which may result in some threads
>> running with uid 0 and some other threads with a non-priviledged one,
>> which in turn can cause the pthread sleep/ wakeup-mechanism, which
>> relies on the ability of a thread to send a signal to any other thread
>> within the same process, to fail (the signal isn't delivered to the
>> target thread due to EPERM and the sending thread "hangs", waiting for
>> some action to be taken because of the signal).
>
> Uh, but *linking* against libpthread should not result in additional threads
> being spawned, so this should be a non-issue for samba.

The 'should' basically implies that you don't know if it causes
additional threads to be spawned (and I haven't claimed that it
does). So, instead of trying to start a row with me for providing an
eventually useless piece of information, why don't you check if it
does?

To constructive?






More information about the samba-technical mailing list