"Ralf S. Engelschall" <[EMAIL PROTECTED]> writes:

> On Sat, Dec 22, 2007, Dieter Klünter wrote:
>
>> Hi,
>> my system: x86_64 opensuse-10.3
>>
>> I have built db and sasl without additional flags and openldap with
>> with_pth=no with_pthreads=yes with_sasl=yes with_slurpd=no
>>
>> slapd started in debugging modus shows that the initializing process
>> hangs with
>>
>> daemon: epoll: listen=9 active_threads=0 tvp=zero
>> daemon: epoll: listen=10 busy
>
> I don't think the daemon "hangs", it is just waiting for connections,
> right?

No, the process really hangs, it is running in an endless loop, id 10
was my first connenction request.

>> write(2, "daemon: epoll: listen=10 busy\n", 30) = 30
>> epoll_wait(8, <unfinished ...>
>
> Yes, I've seen this segfault since a longer time in OpenLDAP. It always
> happended on shutdown. I guess the shutdown procedure of OpenLDAP is
> buggy.

No, defenitly not. I'm running several openldap versions in my test
environment with up to a some million entries with no problem.
For further information, shutdown is handled by servers/slapd/init.c
and servers/slapd/back-bdb/init.c

>> I presume this is due to the fact that BerkeleyDB and slapd have been
>> build with different mutexes.
>> What are the correct arguments to build db with pthread instead of
>> libthread_db?
>
> It might be related to this, but I personally think it is
> more a bug in the OpenLDAP shutdown procedure. But for using
> "openldap::with_pthreads=yes" you *HAVE* to use "db::with_pthreads=yes".
> There is already an explicit dependency, but I guess you installed
> "openldap" with --force and hence have not noticed.

No I did not use --force, I just built db first without any addional
arguments and openldap afterwards.

> But please be aware that db::with_pthreads=yes easily breaks mostly
> everything in OpenPKG, because other packages which are also "db"
> consumers do not know how to correctly build a thread-enabled
> Berkeley-DB (no use of "db.pc", etc).

I'm just building a openldap evironment as a sandbox for one of my
customers, so I don't build any additional packages.
>
> PS: I've now forced OpenLDAP to not use epoll(2) or /dev/poll
>     if GNU Pth is used for threading. This should fix your
>     issues under Linux. Just try it out...

This will cause problems with openldap. There has been a discussion
on openldap-developers 2 years ago about select() vs poll(), decision
was made in favour of epoll and /dev/poll.



-- 
Dieter Klünter | Systemberatung
Mobil: +49.176.51126864
Fax: +49.40.64891521
Key ID:8EF7B6C6
______________________________________________________________________
OpenPKG                                             http://openpkg.org
User Communication List                      openpkg-users@openpkg.org

Reply via email to