[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: How do I verify that Openldap is using multiple threads on Freebsd5.2



I can't get slapd with syncrepl to run using KSE threads. I followed Xavier's instructions for enabling KSE. Note: KSE in FreeBSD 5.2.1 is compiled by default so it isn't nessecary to do a make world. However I did do a make world with "WITH_LIBMAP=yes" to eliminate that as a possible cause of this problem. The following is end of the slapd.log with loglevel set at 255. In comparing the log to that of successful startup, without kselib, the error appears to be "daemon: select failed (22): Invalid argument". What does this mean? Do I have to include threading support for db-4.2 somehow? I've also included my libmap.conf and ldd output after slapd.log.

Here is the tail end of the slapd.log

Oct 14 15:25:59 ldap4 slapd[1053]: daemon: select: listen=6 active_threads=0 tvp
=zero
Oct 14 15:25:59 ldap4 slapd[1053]: daemon: select: listen=7 active_threads=0 tvp
=zero
Oct 14 15:25:59 ldap4 slapd[1053]: daemon: select failed (22): Invalid argument
Oct 14 15:25:59 ldap4 slapd[1053]: daemon: abnormal condition, shutdown initiate
d.
Oct 14 15:25:59 ldap4 slapd[1053]: daemon: closing 6
Oct 14 15:25:59 ldap4 slapd[1053]: daemon: closing 7
Oct 14 15:25:59 ldap4 slapd[1053]: =>do_syncrepl
Oct 14 15:25:59 ldap4 slapd[1053]: slapd shutdown: waiting for 1 threads to term
inate
Oct 14 15:25:59 ldap4 slapd[1053]: connection_get(10)
Oct 14 15:25:59 ldap4 slapd[1053]: connection_get(10): got connid=0
Oct 14 15:25:59 ldap4 slapd[1053]: daemon: removing 10r
Oct 14 15:25:59 ldap4 slapd[1053]: slapd shutdown: initiated
Oct 14 15:25:59 ldap4 slapd[1053]: ====> bdb_cache_release_all
Oct 14 15:25:59 ldap4 slapd[1053]: slapd shutdown: freeing system resources.
Oct 14 15:25:59 ldap4 slapd[1053]: slapd stopped.

Here's the shared libs that slapd is using. Notice that "libc_r.so.5 => /usr/lib/libkse.so.1 (0x283e9000)"


root@ldap4 /usr/local/libexec:ldd slapd
slapd:
libldap_r-2.2.so.7 => /usr/local/lib/libldap_r-2.2.so.7 (0x28165000)
liblber-2.2.so.7 => /usr/local/lib/liblber-2.2.so.7 (0x2819f000)
libdb-4.2.so.2 => /usr/local/lib/libdb-4.2.so.2 (0x281ac000)
libssl.so.3 => /usr/local/lib/libssl.so.3 (0x28282000)
libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x282b3000)
libfetch.so.3 => /usr/lib/libfetch.so.3 (0x283b9000)
libcom_err.so.2 => /usr/lib/libcom_err.so.2 (0x283c6000)
libcrypt.so.2 => /lib/libcrypt.so.2 (0x283c8000)
libwrap.so.3 => /usr/lib/libwrap.so.3 (0x283e1000)
libc_r.so.5 => /usr/lib/libkse.so.1 (0x283e9000)
libc.so.5 => /lib/libc.so.5 (0x2840d000)
libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x284e7000)
libssl.so.3 => /usr/lib/libssl.so.3 (0x284fd000)
libcrypto.so.3 => /lib/libcrypto.so.3 (0x2852f000)


Here is my libmap.conf. In addition I've also tried a test making libkse the system default with the same results.

# /etc/libmap.conf
#
# candidate             mapping
#
libc_r.so.5             libthr.so.1     # Everything uses 'libthr'
libc_r.so               libthr.so

[/usr/local/libexec/slapd]
libc_r.so.5             libkse.so.1
libc_r.so               libkse.so

[slapd]
libc_r.so.5             libkse.so.1
libc_r.so               libkse.so


######### rest of the thread

Yes... And verify that :

$ ldd /usr/local/openldap/libexec/slapd
/usr/local/openldap/libexec/slapd:
libldap_r.so.2 => /usr/local/lib/libldap_r.so.2 (0x28139000)
liblber.so.2 => /usr/local/lib/liblber.so.2 (0x2816b000)
libdb41.so.1 => /usr/local/lib/libdb41.so.1 (0x28178000)
libperl.so => /usr/local/lib/perl5/5.8.5/mach/CORE/libperl.so (0x28228000)
libm.so.2 => /lib/libm.so.2 (0x2832f000)
libutil.so.4 => /lib/libutil.so.4 (0x28348000)
libssl.so.3 => /usr/lib/libssl.so.3 (0x28354000)
libcrypto.so.3 => /lib/libcrypto.so.3 (0x28386000)
libfetch.so.3 => /usr/lib/libfetch.so.3 (0x28494000)
libcom_err.so.2 => /usr/lib/libcom_err.so.2 (0x284a1000)
libcrypt.so.2 => /lib/libcrypt.so.2 (0x284a3000)
libwrap.so.3 => /usr/lib/libwrap.so.3 (0x284bc000)
libc_r.so.5 => /usr/lib/libc_r.so.5 (0x284c4000)
libc.so.5 => /lib/libc.so.5 (0x284e8000)


(current standard libc_r slapd)...

If you use kse you should have :

        libc_r.so.5 => /usr/lib/libkse.so.1 (0x284c4000)

/Xavier

Le 12 oct. 04, à 16:10, James Saint-Rossy, Thomas a écrit :

OK. So to get the threading working for Openldap in FreeBSD 5.2.1 I need to do a Make world with "WITH_LIBMAP=yes" and use the "Kernel Scheduled Entities". Is that correct?

James.

Xavier Beaudouin wrote:

On FreeBSD 5.2.1 default threads are same as on 4.x branch... Excepted if you add made a make world with "WITH_LIBMAP=yes" in /etc/make.conf....

Then if you use kse you'll get a system that can use all your processors...

If not... your openldap process will only use on CPU at time what ever number of CPU you have.

/Xavier

Le 8 oct. 04, à 23:45, James Saint-Rossy, Thomas a écrit :

I am trying to verify that my server running "FreeBSD 5.2.1-RELEASE" is actually using multiple threads for Openldap. The system has dual p4's with hyper threading. I've been searching the web and archive with no luck. Any insight would be appreciated.

When I do ps -axH all I get back is one process:
73670 ?? SLs 0:04.19 /usr/local/libexec/slapd -h ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/ -u ldap -g ldap


Top -H is similar and appears to only be using one of the processors at a time
70022 ldap 96 0 182M 62380K select 3 1:09 0.00% 0.00% slapd


The FreeBSD port seems to be passing "--with-threads=posix" to configure so I assume it's compiled with threads

Thanks, James Saint-Rossy.

--
Xavier Beaudouin - Unix System Administrator & Projects Leader.
President of Kazar Organization : http://www.kazar.net/
Please visit http://caudium.net/, home of Caudium & Camas projects



--
Xavier Beaudouin - Unix System Administrator & Projects Leader.
President of Kazar Organization : http://www.kazar.net/
Please visit http://caudium.net/, home of Caudium & Camas projects


James Saint-Rossy