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?

> when killing the process
>
> daemon: shutdown requested and initiated
> daemon: closing 9
> daemon: closing 10
> slapd shutdown: waiting for 2 threads to terminate
> >>> slapd_listener(@Fn)
> daemon: accept(10) failed errno=9 (Bad file descriptor)
>
> The core didn't show much in gdb and attaching strace to slapd pid
> didn't show much either:
>
> 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.

> 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.

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).

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...

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
OpenPKG                                             http://openpkg.org
User Communication List                      openpkg-users@openpkg.org

Reply via email to