On December 31, 2007 06:59:06 am Vijay Sankar wrote:
> On December 30, 2007 08:03:09 pm Stuart Henderson wrote:
> > > > > On December 29, 2007 11:23:19 am Daniel wrote:
> > > > > > Hi (again, sorry, now with Subject)!
> > > > > >
> > > > > > Anyone experiencing or experienced segfaults with openldap using
> > > > > > the bdb backed? I'm using -current ports tree, and built the
> > > > > > openldap-{client,server}, dbv4 and cyrus-sasl2 packages from
> > > > > > there.
> >
> > openldap 2.3 doesn't support newer db 4.6 versions (should fail the
> > regression tests).
> >
> > there's support in 2.4 but iirc it's not a simple thing to backport.
>
> Thanks very much for this information. Not sure how to help, but I am not
> seeing any seg faults so far. If there is something helpful for me to do,
> please advise. It is not clear from Daniel's message as to whether there is
> any specific thing that causes the seg fault or whether slapd just simply
> does not start.
>
> To verify I restarted slapd with a -d -1 and here is some of the output.
>
> /usr/local/libexec/slapd -d -1
> @(#) $OpenLDAP: slapd 2.3.33 (Dec 12 2007 04:19:57) $
>
> @i386new.ports.openbsd.org:/usr/obj/i386/openldap-2.3.33-bdb/build-i386-bdb
>/servers/slapd daemon_init: <null>
> daemon_init: listen on ldap:///
> daemon_init: 1 listeners to open...
> ldap_url_parse_ext(ldap:///)
> daemon: listener initialized ldap:///
> daemon_init: 2 listeners opened
> slapd init: initiated server.
> slap_sasl_init: initialized!
> bdb_back_initialize: initialize BDB backend
> bdb_back_initialize: Berkeley DB 4.6.21: (September 27, 2007)
> hdb_back_initialize: initialize HDB backend
> hdb_back_initialize: Berkeley DB 4.6.21: (September 27, 2007)
> perl backend open
> reading config file /etc/openldap/slapd.conf
> line 5 (include         /etc/openldap/schema/core.schema)
> reading config file /etc/openldap/schema/core.schema
> .
> .
> .
> ..
> line 87 (database       bdb)
> bdb_db_init: Initializing BDB database
> line 88 (suffix         "dc=sankars,dc=local")
>
> >>> dnPrettyNormal: <dc=sankars,dc=local>
>
> => ldap_bv2dn(dc=sankars,dc=local,0)
> <= ldap_bv2dn(dc=sankars,dc=local)=0
> => ldap_dn2bv(272)
> <= ldap_dn2bv(dc=sankars,dc=local)=0
> => ldap_dn2bv(272)
> <= ldap_dn2bv(dc=sankars,dc=local)=0
> <<< dnPrettyNormal: <dc=sankars,dc=local>, <dc=sankars,dc=local>
> line 89 (rootdn         "cn=ldapadmin,dc=sankars,dc=local")
>
> >>> dnPrettyNormal: <cn=ldapadmin,dc=sankars,dc=local>
>
> => ldap_bv2dn(cn=ldapadmin,dc=sankars,dc=local,0)
> <= ldap_bv2dn(cn=ldapadmin,dc=sankars,dc=local)=0
> => ldap_dn2bv(272)
> <= ldap_dn2bv(cn=ldapadmin,dc=sankars,dc=local)=0
> => ldap_dn2bv(272)
> <= ldap_dn2bv(cn=ldapadmin,dc=sankars,dc=local)=0
> <<< dnPrettyNormal: <cn=ldapadmin,dc=sankars,dc=local>,
> <cn=ldapadmin,dc=sankars,dc=local>
> line 93 (rootpw ***)
> line 97 (directory      /var/sankars.local)
> line 104 (access to attrs=userPassword        by
> dn="cn=sambaadmin,dc=sankars,dc=local" read        by
> dn="cn=syncuser,dc=sankars,dc=local" write        by * auth)
>
> >>> dnNormalize: <cn=sambaadmin,dc=sankars,dc=local>
>
> => ldap_bv2dn(cn=sambaadmin,dc=sankars,dc=local,0)
> <= ldap_bv2dn(cn=sambaadmin,dc=sankars,dc=local)=0
> => ldap_dn2bv(272)
> <= ldap_dn2bv(cn=sambaadmin,dc=sankars,dc=local)=0
>
> Normally I use packages. But some time ago, I was able to use syncrepl with
> OpenLDAP 2.3.33 and used the following ./configure command to build from
> source.
>
> env CPPFLAGS="-I/usr/local/include/db4 -I/usr/local/include/sasl" \
> LDFLAGS="-L/usr/local/lib/db4 -L/usr/local/share/libtool/libltdl
> -L/usr/local/lib/sasl2 -L/usr/local/lib"\ ./configure \
> --prefix=/usr/local \
> --enable-slapd \
> --enable-cleartext \
> --enable-crypt \
> --enable-rewrite \
> --enable-wrapper \
> --with-cyrus-sasl=yes \
> --enable-spasswd \
> --enable-dnssrv \
> --enable-ldap \
> --enable-ldbm \
> --enable-bdb \
> --enable-meta \
> --enable-null \
> --enable-passwd \
> --disable-ipv6 \
> --disable-shell \
> --enable-slurpd \
> --enable-overlays=mod \
> --with-tls \
> --disable-sql
>
> Is this correct? Should I make any changes? Please let me know.
>
> Thanks very much,
>
> Vijay

I hate to waste developer and port maintainer time, so apologize in advance 
for this long message. Anyways, if there is anything useful I can do to help, 
please let me know.

I am puzzled about why I don't seem to have any problems with OpenLDAP 
2.3.33p2 on

kern.version=OpenBSD 4.2-current (GENERIC.MP) #0: Thu Dec 27 13:53:57 CST 2007
    [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC.MP

with 

db-4.6.21                                       Berkeley DB package, revision 4
openldap-server-2.3.33p2-bdb    Open source LDAP software (server)

The OP said that his ./configure command was almost the same as what I did 
above but did not bother to say what the difference was. I followed the 
settings that Marc Balmer had in ports and so I wonder whether that is why I 
haven't seen any problems yet.

Usually, I have problems even when no one else has any issues so I am 
surprised to not have had a crash or any problems at all when I should have 
had seg faults! I am using all the samba-related schemas PLUS slurpd and I am 
still not seeing segfaults with OpenLDAP 2.3.33p2 and DB 4.6.  I am not new 
to OpenBSD (have used it since 2.8 and have the CD's to prove it :) but don't 
know whether I have somehow made a mistake in compiling userland or whether 
there is some other issue involved that is making use of older versions of 
DB4. But don't see any traces of it on this server. This is on one of my test 
servers and I have followed -current on it on an ongoing basis.

I ran it with a standard reboot on my test server with slapd starting as 
follows.

Dec 31 06:54:11 web1 slapd[16122]: slapd stopped.
Dec 31 06:54:19 web1 slapd[2920]: @(#) $OpenLDAP: slapd 2.3.33 (Dec 12 2007 
04:19:57) $         
@i386new.ports.openbsd.org:/usr/obj/i386/openldap-2.3.33-bdb/build-i386-bdb/servers/slapd
Dec 31 06:54:19 web1 slapd[2920]: slapd starting
.
.

Dec 31 17:29:30 web1 slapd[2920]: daemon: shutdown requested and initiated.
Dec 31 17:29:30 web1 slapd[2920]: slapd shutdown: waiting for 0 threads to 
terminate
Dec 31 17:29:30 web1 slapd[2920]: slapd stopped.

Then on December 31st evening, I started slapd with

/usr/local/libexec/slapd -h "ldap://127.0.0.1 ldaps:///" -d -1

and it ran till this morning -- no seg faults.

I rebooted the server again

Jan  2 09:56:59 web1 slapd[20923]: @(#) $OpenLDAP: slapd 2.3.33 (Dec 12 2007 
04:19:57) $        
@i386new.ports.openbsd.org:/usr/obj/i386/openldap-2.3.33-bdb/build-i386-bdb/servers/slapd
Jan  2 09:56:59 web1 slapd[27144]: slapd starting

Thanks again for all the great ports/packages.

Vijay

-- 
Vijay Sankar, M.Eng., P.Eng.
President & CEO
ForeTell Technologies Limited
59 Flamingo Avenue, Winnipeg, MB Canada R3J 0X6
Phone: +1 204 885 9535, E-Mail: [EMAIL PROTECTED]

Reply via email to