Issue 5583 - slapadd core dumps
Summary: slapadd core dumps
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.10
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-29 18:21 UTC by dieter@dkluenter.de
Modified: 2014-08-01 21:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description dieter@dkluenter.de 2008-06-29 18:21:13 UTC
Full_Name: Dieter Kluenter
Version: 2.4.10
OS: openSUSE
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (84.142.217.87)


Hello,
processor: amd64
my configure flags:

export CFLAGS="-g -march=athlon64"
PREFIX="/opt/openldap"
DATABASE="bdb"
make distclean ;
./configure \
--prefix=${PREFIX} \
--enable-dynamic \
--enable-aci \
--enable-modules \
--enable-rewrite \
--enable-bdb=yes \
--enable-hdb=yes \
--enable-ldap=mod \
--enable-monitor=yes \
--enable-meta=mod \
--enable-perl=mod \
--enable-relay=mod \
--enable-monitor=yes \
--enable-sql=mod \
--enable-overlays=mod
make depend && make && cd tests ; 

running slapadd with following options

 ./slapd -T add -d-1 -qwv -f /opt/openldap/etc/openldap/slapd.conf -F
/opt/openldap/etc/openldap/slapd.d -l /tmp/hdk-init.ldif 

slapadd startup: initiated.
backend_startup_one: starting "o=avci,c=de"
hdb_db_open: "o=avci,c=de"
hdb_db_open: database "o=avci,c=de": dbenv_open(/tmp/ldap).
slapd: ad.c:164: slap_bv2ad: Assertion `*ad == ((void *)0)' failed.
Abgebrochen (core dumped)

output of gdb

(gdb) file /work/openldap/2.4.10/servers/slapd/.libs/slapd
Reading symbols from /work/openldap/2.4.10/servers/slapd/.libs/slapd..done
(gdb) core-file core
warning: Can't read pathname for load map: Input/output error.
Reading symbols from /opt/openldap/lib/libldap_r-2.4.so.2...done.
Loaded symbols for /opt/openldap/lib/libldap_r-2.4.so.2
Reading symbols from /opt/openldap/lib/liblber-2.4.so.2...done.
Loaded symbols for /opt/openldap/lib/liblber-2.4.so.2
Reading symbols from /usr/lib64/libltdl.so.3...done.
Loaded symbols for /usr/lib64/libltdl.so.3
Reading symbols from /usr/lib64/libdb-4.5.so...done.
Loaded symbols for /usr/lib64/libdb-4.5.so
Reading symbols from /usr/lib64/libodbc.so.1...done.
Loaded symbols for /usr/lib64/libodbc.so.1
Reading symbols from /lib64/libpthread.so.0...done.
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /usr/lib64/libsasl2.so.2...done.
Loaded symbols for /usr/lib64/libsasl2.so.2
Reading symbols from /lib64/libdl.so.2...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /usr/lib64/libssl.so.0.9.8...done.
Loaded symbols for /usr/lib64/libssl.so.0.9.8
Reading symbols from /usr/lib64/libcrypto.so.0.9.8...done.
Loaded symbols for /usr/lib64/libcrypto.so.0.9.8
Reading symbols from /lib64/libresolv.so.2...done.
Loaded symbols for /lib64/libresolv.so.2
Reading symbols from /lib64/libc.so.6...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib64/libz.so.1...done.
Loaded symbols for /lib64/libz.so.1
Reading symbols from /usr/lib64/sasl2/liblogin.so...done.
Loaded symbols for /usr/lib64/sasl2/liblogin.so
Reading symbols from /lib64/libcrypt.so.1...done.
Loaded symbols for /lib64/libcrypt.so.1
Reading symbols from /usr/lib64/sasl2/libanonymous.so...done.
Loaded symbols for /usr/lib64/sasl2/libanonymous.so
Reading symbols from /usr/lib64/sasl2/libdigestmd5.so...done.
Loaded symbols for /usr/lib64/sasl2/libdigestmd5.so
Reading symbols from /usr/lib64/sasl2/libcrammd5.so...done.
Loaded symbols for /usr/lib64/sasl2/libcrammd5.so
Reading symbols from /usr/lib64/sasl2/libsasldb.so...done.
Loaded symbols for /usr/lib64/sasl2/libsasldb.so
Reading symbols from /usr/lib64/sasl2/libplain.so...done.
Loaded symbols for /usr/lib64/sasl2/libplain.so
Reading symbols from /opt/openldap/libexec/openldap/dynlist-2.4.so.2...done.
Loaded symbols for /opt/openldap/libexec/openldap/dynlist-2.4.so.2
Reading symbols from /opt/openldap/libexec/openldap/accesslog-2.4.so.2...done.
Loaded symbols for /opt/openldap/libexec/openldap/accesslog-2.4.so.2
Reading symbols from /opt/openldap/libexec/openldap/ppolicy-2.4.so.2...done.
Loaded symbols for /opt/openldap/libexec/openldap/ppolicy-2.4.so.2
Reading symbols from /opt/openldap/libexec/openldap/syncprov-2.4.so.2...done.
Loaded symbols for /opt/openldap/libexec/openldap/syncprov-2.4.so.2
Core was generated by `./slapd -Tadd -d-1 -qwv -f
/opt/openldap/etc/openldap/slapd.conf -F /opt/openld'
Program terminated with signal 6, Aborted.
[New process 16951]
#0  0x00007f39e0ea95c5 in raise () from /lib64/libc.so.6
(gdb) quit

-Dieter


Comment 1 Howard Chu 2008-06-29 18:37:07 UTC
dieter@dkluenter.de wrote:
> Full_Name: Dieter Kluenter
> Version: 2.4.10
> OS: openSUSE
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (84.142.217.87)

> running slapadd with following options
>
>   ./slapd -T add -d-1 -qwv -f /opt/openldap/etc/openldap/slapd.conf -F
> /opt/openldap/etc/openldap/slapd.d -l /tmp/hdk-init.ldif
>
> slapadd startup: initiated.
> backend_startup_one: starting "o=avci,c=de"
> hdb_db_open: "o=avci,c=de"
> hdb_db_open: database "o=avci,c=de": dbenv_open(/tmp/ldap).
> slapd: ad.c:164: slap_bv2ad: Assertion `*ad == ((void *)0)' failed.
> Abgebrochen (core dumped)
>
> output of gdb

Where is the backtrace?

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 2 dieter@dkluenter.de 2008-06-29 19:41:21 UTC
Howard Chu <hyc@symas.com> writes:

> dieter@dkluenter.de wrote:
>> Full_Name: Dieter Kluenter
>> Version: 2.4.10
>> OS: openSUSE
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (84.142.217.87)
[...]
>
> Where is the backtrace?

Sorry, forgot it,

#0  0x00007f07d3c6a5c5 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x00007f07d3c6a5c5 in raise () from /lib64/libc.so.6
#1  0x00007f07d3c6bbb3 in abort () from /lib64/libc.so.6
#2  0x00007f07d3c631e9 in __assert_fail () from /lib64/libc.so.6
#3  0x00000000004894a1 in slap_bv2ad (bv=0x7fffddbd3c30, ad=0x7f07d2bbc4f0, 
    text=0x7fffddbd3c70) at ad.c:164
#4  0x00000000004893a3 in slap_str2ad (str=0x7f07d29bad62 "dgIdentity", 
    ad=0x7f07d2bbc4f0, text=0x7fffddbd3c70) at ad.c:123
#5  0x00007f07d29ba0bc in dynlist_db_open (be=0x7fffddbd3ce0, 
    cr=0x7fffddbd3f20) at dynlist.c:1560
#6  0x00000000004bae67 in over_db_open (be=0x8b9a90, cr=0x7fffddbd3f20)
    at backover.c:153
#7  0x0000000000449819 in backend_startup_one (be=0x8b9a90, cr=0x7fffddbd3f20)
    at backend.c:224
#8  0x0000000000449ad2 in backend_startup (be=0x8b9a90) at backend.c:267
#9  0x000000000047366f in slap_startup (be=0x8b9a90) at init.c:225
#10 0x00000000004c1853 in slap_tool_init (progname=0x55a728 "slapadd", tool=1, 
    argc=10, argv=0x7fffddbe4a08) at slapcommon.c:725
#11 0x00000000004beff0 in slapadd (argc=10, argv=0x7fffddbe4a08)
    at slapadd.c:73
#12 0x00000000004190ef in main (argc=10, argv=0x7fffddbe4a08) at main.c:636
(gdb) 

-Dieter

-- 
Dieter Klünter | Systemberatung
http://www.dkluenter.de
GPG Key ID:8EF7B6C6

Comment 3 ando@openldap.org 2008-06-29 19:51:53 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 4 ando@openldap.org 2008-06-29 19:52:27 UTC
dieter@dkluenter.de wrote:

> Sorry, forgot it,

Should be fixed in HEAD, please test.  I infer you're using multiple 
instances of slapo-dynlist(5) in your slapd.conf, aren't you?

p.


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   ando@sys-net.it
-----------------------------------

Comment 5 dieter@dkluenter.de 2008-06-29 20:40:13 UTC
Pierangelo Masarati <ando@sys-net.it> writes:

> dieter@dkluenter.de wrote:
>
>> Sorry, forgot it,
>
> Should be fixed in HEAD, please test.  I infer you're using multiple
> instances of slapo-dynlist(5) in your slapd.conf, aren't you?

No, just one instance.

-Dieter

-- 
Dieter Klünter | Systemberatung
http://www.dkluenter.de
GPG Key ID:8EF7B6C6

Comment 6 ando@openldap.org 2008-06-29 20:44:44 UTC
Dieter Kluenter wrote:
> Pierangelo Masarati <ando@sys-net.it> writes:
> 
>> dieter@dkluenter.de wrote:
>>
>>> Sorry, forgot it,
>> Should be fixed in HEAD, please test.  I infer you're using multiple
>> instances of slapo-dynlist(5) in your slapd.conf, aren't you?
> 
> No, just one instance.

Sounds odd, because the error was related to executing slapo-dynlist's 
db_open() function while the static vars holding the dgIdentity (and the 
dgAuthz) attrs being already initialized.  Can you test the fix to 
overlays/dynlist.c 1.51->1.52?  It is for HEAD, but should apply 
straightforwardly to 2.4.

p.


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   ando@sys-net.it
-----------------------------------

Comment 7 dieter@dkluenter.de 2008-06-29 21:18:30 UTC
Pierangelo Masarati <ando@sys-net.it> writes:

> Dieter Kluenter wrote:
>> Pierangelo Masarati <ando@sys-net.it> writes:
>>
>>> dieter@dkluenter.de wrote:
>>>
>>>> Sorry, forgot it,
>>> Should be fixed in HEAD, please test.  I infer you're using multiple
>>> instances of slapo-dynlist(5) in your slapd.conf, aren't you?
>> No, just one instance.
>
> Sounds odd, because the error was related to executing slapo-dynlist's
> db_open() function while the static vars holding the dgIdentity (and
> the dgAuthz) attrs being already initialized.  Can you test the fix to
> overlays/dynlist.c 1.51->1.52?  It is for HEAD, but should apply
> straightforwardly to 2.4.

I just compiled HEAD and slapadd added the ldif file as expected. But
a second error occured, test failed with test001, but I will check
this tomorrow, same as the dynlist patch.

-Dieter


-- 
Dieter Klünter | Systemberatung
http://www.dkluenter.de
GPG Key ID:8EF7B6C6

Comment 8 Ralf 2008-06-30 08:42:09 UTC
On Sonntag, 29. Juni 2008, you wrote:
> Pierangelo Masarati <ando@sys-net.it> writes:
> > Dieter Kluenter wrote:
> >> Pierangelo Masarati <ando@sys-net.it> writes:
> >>> dieter@dkluenter.de wrote:
> >>>> Sorry, forgot it,
> >>>
> >>> Should be fixed in HEAD, please test.  I infer you're using
> >>> multiple instances of slapo-dynlist(5) in your slapd.conf, aren't
> >>> you?
> >>
> >> No, just one instance.
> >
> > Sounds odd, because the error was related to executing
> > slapo-dynlist's db_open() function while the static vars holding
> > the dgIdentity (and the dgAuthz) attrs being already initialized. 
> > Can you test the fix to overlays/dynlist.c 1.51->1.52?  It is for
> > HEAD, but should apply straightforwardly to 2.4.
>
> I just compiled HEAD and slapadd added the ldif file as expected. But
> a second error occured, test failed with test001
Is this on openSUSE 11.0? Then you might have hit  
http://sourceware.org/bugzilla/show_bug.cgi?id=4980 (or ITS#5251). We 
have patched around that glibc bug in our openldap packages. A possible 
workaround that doesn't require patching is to remove the "localhost" 
entry from the "::1" line in /etc/hosts.

> , but I will check 
> this tomorrow, same as the dynlist patch.

-- 
Ralf

Comment 9 dieter@dkluenter.de 2008-07-01 16:22:47 UTC
Pierangelo Masarati <ando@sys-net.it> writes:

> Dieter Kluenter wrote:
>> Pierangelo Masarati <ando@sys-net.it> writes:
>>
>>> dieter@dkluenter.de wrote:
>>>
>>>> Sorry, forgot it,
>>> Should be fixed in HEAD, please test.  I infer you're using multiple
>>> instances of slapo-dynlist(5) in your slapd.conf, aren't you?
>> No, just one instance.
>
> Sounds odd, because the error was related to executing slapo-dynlist's
> db_open() function while the static vars holding the dgIdentity (and
> the dgAuthz) attrs being already initialized.  Can you test the fix to
> overlays/dynlist.c 1.51->1.52?  It is for HEAD, but should apply
> straightforwardly to 2.4.

patch applied, compiled, succesfully installed.

-Dieter

-- 
Dieter Klünter | Systemberatung
http://www.dkluenter.de
GPG Key ID:8EF7B6C6

Comment 10 Quanah Gibson-Mount 2008-07-09 23:39:36 UTC
changed notes
changed state Test to Release
Comment 11 Howard Chu 2008-07-20 18:29:27 UTC
changed state Release to Closed
Comment 12 OpenLDAP project 2014-08-01 21:04:16 UTC
fixed in HEAD/RE24