Issue 29 - pls help: "Operations error" from ldapdelete
Summary: pls help: "Operations error" from ldapdelete
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1998-12-30 09:07 UTC by st-wong@cuhk.edu.hk
Modified: 2014-08-01 21:06 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 st-wong@cuhk.edu.hk 1998-12-30 09:07:11 UTC
Full_Name: ST Wong
Version: 1.1.1
OS: Solaris 2.6
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (137.189.4.5)




Hi,

We upgraded our LDAP server to 1.1.1 recently, which runs on Solaris 2.6.
I got this error when deleting an entry:


# ldapdelete -v -D 'cn=root,dc=cuhk,dc=edu,dc=hk' -w xxx
'uid=130002,dc=cuhk,dc=edu,dc=hk'
deleting entry uid=130002,dc=cuhk,dc=edu,dc=hk
ldap_delete: Operations error


I did the same command on 1.03 with the same database without problem.  
If the base dn (dc=cuhk,dc=edu,dc=hk) is omitted :


# ldapdelete -v -D 'cn=root,dc=cuhk,dc=edu,dc=hk' -w xxx 'uid=130002'
deleting entry uid=0000016a-4f5c-21d1-a000-08000945cdd0
entry removed


However ldapsearch still returns this entry.

Would anyone please help ?  

Thanks a lot.

Regards,
ST Wong


-- 
S.T. Wong                           | Email: st-wong@cuhk.edu.hk
Comment 1 Kurt Zeilenga 1998-12-30 18:39:19 UTC
At 09:07 AM 12/30/98 GMT, st-wong@cuhk.edu.hk wrote:
>We upgraded our LDAP server to 1.1.1 recently, which runs on Solaris 2.6.
>I got this error when deleting an entry:
>
>
># ldapdelete -v -D 'cn=root,dc=cuhk,dc=edu,dc=hk' -w xxx
>'uid=130002,dc=cuhk,dc=edu,dc=hk'
>deleting entry uid=130002,dc=cuhk,dc=edu,dc=hk
>ldap_delete: Operations error

Operation errors are generated by the server.  You should run slapd
with '-d 1' to track down why it generated that error code.  Specific
to delete operations, that error is generated when:
  1) the id of the entry to be deleted cannot be deleted from its
     parent's list of children ids,
  2) the id cannot be deleted from the dn2id map, or
  3) the entry itself cannot be deleted from the cache/disk.

>I did the same command on 1.03 with the same database without problem.  
>If the base dn (dc=cuhk,dc=edu,dc=hk) is omitted :
># ldapdelete -v -D 'cn=root,dc=cuhk,dc=edu,dc=hk' -w xxx 'uid=130002'
>deleting entry uid=0000016a-4f5c-21d1-a000-08000945cdd0
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is odd.  This should be 'uid=130002'.  Looks like you should do a
'make clean; make depend; make' or something.

>entry removed
>However ldapsearch still returns this entry.

NOTE: if you are using an preexisting database make sure 'configure'
uses the appropriate ldbm settings.  What 'configure' auto-selects
may be quite different than was used in 1.0.x releases.


Comment 2 Kurt Zeilenga 1998-12-30 18:42:12 UTC
changed state Open to Feedback
Comment 3 Kurt Zeilenga 1998-12-31 17:04:43 UTC
changed notes
Comment 4 Kurt Zeilenga 1999-01-01 16:43:41 UTC
 
Comment 5 Kurt Zeilenga 1999-01-01 16:43:41 UTC
Hello,

> >We upgraded our LDAP server to 1.1.1 recently, which runs on Solaris 2.6.
> >I got this error when deleting an entry:
> >
> >
> ># ldapdelete -v -D 'cn=root,dc=cuhk,dc=edu,dc=hk' -w xxx
> >'uid=130002,dc=cuhk,dc=edu,dc=hk'
> >deleting entry uid=130002,dc=cuhk,dc=edu,dc=hk
> >ldap_delete: Operations error
> 
> Operation errors are generated by the server.  You should run slapd
> with '-d 1' to track down why it generated that error code.  Specific
> to delete operations, that error is generated when:
>   1) the id of the entry to be deleted cannot be deleted from its
>      parent's list of children ids,
>   2) the id cannot be deleted from the dn2id map, or
>   3) the entry itself cannot be deleted from the cache/disk.

Here comes the '-d 1' output:


do_bind
do_bind: version 2 dn (cn=root,dc=cuhk,dc=edu,dc=hk) method 128
dn2entry_r: dn: cn=root,dc=cuhk,dc=edu,dc=hk
=> dn2id( "cn=root,dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (opened 0)
<= dn2id NOID
dn2entry_r: dn: dc=cuhk,dc=edu,dc=hk
=> dn2id( "dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 1
=> id2entry_r( 1 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2entry.gdbm", 2, 600 )
<= ldbm_cache_open (opened 1)
=> str2entry
<= str2entry 0x807cba0
<= id2entry_r( 1 ) (disk)
====> cache_return_entry_r
send_ldap_result 0::
do_delete
dn2entry_w: dn: uid=1002,dc=cuhk,dc=edu,dc=hk
=> dn2id( "uid=1002,dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 3
=> id2entry_w( 3 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2entry.gdbm", 2, 600 )
<= ldbm_cache_open (cache 1)
=> str2entry
<= str2entry 0x807d2a8
<= id2entry_w( 3 ) (disk)
rdwr_Xchk: readers_reading: 0 writer_writing: 1
=> has_children( 3 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2children.gdbm", 2, 600 )
<= ldbm_cache_open (opened 2)
<= has_children 0
rdwr_Xchk: readers_reading: 0 writer_writing: 1
dn2entry_r: dn: dc=cuhk,dc=edu,dc=hk
=> dn2id( "dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 1
=> id2entry_r( 1 )
====> cache_find_entry_dn2id: found id: 1 rw: 0
<= id2entry_r 0x807cba0 (cache)
=> id2children_remove( 1, 3 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2children.gdbm", 2, 600 )
<= ldbm_cache_open (cache 2)
<= id2children_remove -1 (idl_insert)
send_ldap_result 1::
====> cache_return_entry_w
====> cache_return_entry_r
do_unbind

I'm trying to analyse the output, but would you please advise also ?
Is it useful to use gdb to debug ?

> NOTE: if you are using an preexisting database make sure 'configure'
> uses the appropriate ldbm settings.  What 'configure' auto-selects
> may be quite different than was used in 1.0.x releases.

The ldbm setting is okay.

Thanks again.
Regards,
ST Wong

Comment 6 Kurt Zeilenga 1999-01-03 22:18:27 UTC
Please review fix for ITS#31 (followup 1) to see if this as any
impact upon the problem you reported. 
Comment 7 S.T. Wong 1999-01-04 16:08:49 UTC
> Please review fix for ITS#31 (followup 1) to see if this as any
> impact upon the problem you reported. 

The same ldapdelete error (operation error) is obtained after applying the 
patch:

do_bind
do_bind: version 2 dn (cn=root,dc=cuhk,dc=edu,dc=hk) method 128
dn2entry_r: dn: cn=root,dc=cuhk,dc=edu,dc=hk
=> dn2id( "cn=root,dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (opened 0)
<= dn2id NOID
dn2entry_r: dn: dc=cuhk,dc=edu,dc=hk
=> dn2id( "dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 1
=> id2entry_r( 1 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2entry.gdbm", 2, 600 )
<= ldbm_cache_open (opened 1)
=> str2entry
<= str2entry 0x807d088
<= id2entry_r( 1 ) (disk)
====> cache_return_entry_r
send_ldap_result 0::
do_delete
dn2entry_w: dn: uid=1002,dc=cuhk,dc=edu,dc=hk
=> dn2id( "uid=1002,dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 17159
=> id2entry_w( 17159 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2entry.gdbm", 2, 600 )
<= ldbm_cache_open (cache 1)
=> str2entry
<= str2entry 0x807d360
<= id2entry_w( 17159 ) (disk)
rdwr_Xchk: readers_reading: 0 writer_writing: 1
=> has_children( 17159 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2children.gdbm", 2, 600 )
<= ldbm_cache_open (opened 2)
<= has_children 0
rdwr_Xchk: readers_reading: 0 writer_writing: 1
dn2entry_r: dn: dc=cuhk,dc=edu,dc=hk
=> dn2id( "dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 1
=> id2entry_r( 1 )
====> cache_find_entry_dn2id: found id: 1 rw: 0
<= id2entry_r 0x807d088 (cache)
=> id2children_remove( 1, 17159 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2children.gdbm", 2, 600 )
<= ldbm_cache_open (cache 2)
<= id2children_remove -1 (idl_insert)
send_ldap_result 1::
do_unbind
====> cache_return_entry_w
====> cache_return_entry_r

Would anyone pls help ?  Thanks again.

Regards,
ST Wong (st-wong@cuhk.edu.hk)
Comment 8 Kurt Zeilenga 1999-01-04 18:23:22 UTC
ST,

I believe you are getting an "Operations Error" as a result of
a corrupt backend database.  From the logs you have provided,
it appears that the id of the entry being deleted does not exist
in the its parent's list of children ids.

You might try poking about in the database with ldbmtest.
However, I recommend you rebuild it using ldbmcat/ldif2ldbm.

Kurt
Comment 9 S.T. Wong 1999-01-05 17:09:58 UTC
Kurt,

> I believe you are getting an "Operations Error" as a result of
> a corrupt backend database.  From the logs you have provided,
> it appears that the id of the entry being deleted does not exist
> in the its parent's list of children ids.

Shall I refer to the source code in order to interpret the debug trace ?
I'll dig into it if necessary.

> You might try poking about in the database with ldbmtest.
> However, I recommend you rebuild it using ldbmcat/ldif2ldbm.

I rebuilt the database but the problem is still not solved although 
add/modify work properly.  I tried to test with ldbmtest but there is no
man page for it.  Here comes my config file, for your information :

------------------------------ cut here ----------------------------
include		/usr/local/openldap/etc/openldap/slapd.at.conf
#include		/usr/local/openldap/etc/openldap/slapd.oc.conf
include		/usr/local/openldap/etc/cu.slapd.oc.conf
schemacheck	off
#referral	ldap://ldap.itd.umich.edu
#referral	ldap://ldap1.csc.cuhk.edu.hk

#######################################################################
# ldbm database definitions
#######################################################################

database	ldbm
suffix		"dc=cuhk, dc=edu, dc=hk"
directory	/usr/local/openldap/var/db
rootdn		"cn=root, dc=cuhk, dc=edu, dc=hk"
rootpw		???

sizelimit       25000

access          to dn=".*,dc=cuhk,dc=edu,dc=hk" 
		by dn="uid=1001,dc=cuhk,dc=edu,dc=hk" read 
		by dn="uid=1002,dc=cuhk,dc=edu,dc=hk" read 
		by self write 
		by * none 

# No. of entries in cache
cachesize	5000
# DB cache size in bytes 
# ~50Mb for index creation
#dbcachesize	50000000
# ~5Mb for production run
dbcachesize	5000000

loglevel	256
#loglevel	65535

index           cn,sn,uid       pres,eq,approx,sub
index		mail,maildrop	pres,eq,approx,sub
index           universityID,computingID	pres,eq,approx,sub
index           default         none

------------------------------ cut here -----------------------------

Would you please help?  Thanks !

ST
Comment 10 Kurt Zeilenga 1999-01-05 18:00:11 UTC
Here are a few things to try:
1) enable schema checking
  rebuild with ldif2ldbm
2) add/modify/delete
  with -d 1 -d 128

Also, to aid in our duplication of this, please upload a tarball
with copies of:
  test cases with exact commands used and expected output.
    all commands should be ran with -v -d 1 and server -d 1 -d 128.
  schema (your slapd.oc.conf, slapd.ac.conf files)
  small ldif (with minimal entries needed for test cases)
    please change all passwords to simple cleartext strings
    matching the rdn of the entry.

The tarball should be upload to ftp://ftp.openldap.org/pub/
and named its-29-test-cases.tgz (gzipped tar file).   Please
reply to this message when the tarball is available and provide
a brief summary of the contents of the tarball, hints, etc.

Thanks, Kurt
  
Comment 11 S.T. Wong 1999-01-05 18:20:15 UTC
Kurt,

> Here are a few things to try:
> 1) enable schema checking
>   rebuild with ldif2ldbm

I tried a much smaller ldif with schema checking enabled.  The delete operation
succeeded.  I'm building the complete database and test it again.  Will keep
you informed.

Thanks.  /ST


> 2) add/modify/delete
>   with -d 1 -d 128
> 
> Also, to aid in our duplication of this, please upload a tarball
> with copies of:
>   test cases with exact commands used and expected output.
>     all commands should be ran with -v -d 1 and server -d 1 -d 128.
>   schema (your slapd.oc.conf, slapd.ac.conf files)
>   small ldif (with minimal entries needed for test cases)
>     please change all passwords to simple cleartext strings
>     matching the rdn of the entry.
> 
> The tarball should be upload to ftp://ftp.openldap.org/pub/
> and named its-29-test-cases.tgz (gzipped tar file).   Please
> reply to this message when the tarball is available and provide
> a brief summary of the contents of the tarball, hints, etc.
Comment 12 Kurt Zeilenga 1999-01-06 06:36:47 UTC
changed notes
Comment 13 S.T. Wong 1999-01-06 06:56:38 UTC
Kurt,

> Here are a few things to try:
> 1) enable schema checking
>   rebuild with ldif2ldbm
> 2) add/modify/delete
>   with -d 1 -d 128

I had following setting tested:
- original database, rebuild with schema check off : same problem
- original database, rebuild with schema check on  : segmentation fault on
  ldapdelete (patch applied, its #31 ?).
- database with less than 10 entries, rebuild with schema check on/off :
  no problem at all.

> Also, to aid in our duplication of this, please upload a tarball
> with copies of:
>   test cases with exact commands used and expected output.
>     all commands should be ran with -v -d 1 and server -d 1 -d 128.
>   schema (your slapd.oc.conf, slapd.ac.conf files)
>   small ldif (with minimal entries needed for test cases)
>     please change all passwords to simple cleartext strings
>     matching the rdn of the entry.
> 
> The tarball should be upload to ftp://ftp.openldap.org/pub/
> and named its-29-test-cases.tgz (gzipped tar file).   Please
> reply to this message when the tarball is available and provide
> a brief summary of the contents of the tarball, hints, etc.

I put the tar ball its-29-test-cases.tgz in ftp.openldap.org/incoming.  The tar 
ball contains :

cu.slapd.oc.conf : our slapd.oc.conf
schema_off.log   : command used and debug output of slapd (ldapdelete gives 
				   "Operation Error")
schema_on.log    : command used and debug output of slapd (ldapdelete gives
				   "Segmentation Fault")
test.conf		 : testing slapd configuration file
test.ldif		 : testing ldif contains several entries (original one contains
				   18,000+ entries, maybe the size is the cause of the problem)

Thanks a lot! /ST
Comment 14 Kurt Zeilenga 1999-01-12 20:01:29 UTC
changed notes
moved from Incoming to Software
Comment 15 Kurt Zeilenga 1999-01-13 17:55:10 UTC
moved from Software to Software Bugs
Comment 16 Kurt Zeilenga 1999-01-14 20:37:21 UTC
changed notes
Comment 17 Kurt Zeilenga 1999-01-14 20:39:04 UTC
I've committed changes to OPENLDAP_REL_ENG_1_1 branch that may
have an impact on this issue.  The version is only available
via AnonCVS.  Would appreciate any testing you might be able to
accomplish.
Comment 18 Kurt Zeilenga 1999-01-14 20:43:04 UTC
changed notes
changed state Feedback to Test
Comment 19 S.T. Wong 1999-01-15 16:15:32 UTC
> I've committed changes to OPENLDAP_REL_ENG_1_1 branch that may
> have an impact on this issue.  The version is only available
> via AnonCVS.  Would appreciate any testing you might be able to
> accomplish.

Thanks.  I'm searching for a testing machine.  Will let you know the result.

/ST
Comment 20 S.T. Wong 1999-01-18 02:52:13 UTC
> I've committed changes to OPENLDAP_REL_ENG_1_1 branch that may
> have an impact on this issue.  The version is only available
> via AnonCVS.  Would appreciate any testing you might be able to
> accomplish.

I installed the OPENLDAP_REL_ENG_1_1 branch on Solaris 2.6 (with gdbm).  The
same error was obtained ::::

# ldapdelete -D 'cn=root,dc=cuhk,dc=edu,dc=hk' -w xxxx 'uid=1002,dc=cuhk,dc=edu,dc=hk'
ldap_delete: Operations error


with debug output :

do_bind
do_bind: version 2 dn (cn=root,dc=cuhk,dc=edu,dc=hk) method 128
dn2entry_r: dn: cn=root,dc=cuhk,dc=edu,dc=hk
=> dn2id( "cn=root,dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id NOID
dn2entry_r: dn: dc=cuhk,dc=edu,dc=hk
=> dn2id( "dc=cuhk,dc=edu,dc=hk" )
====> cache_find_entry_dn2id: found dn: DC=CUHK,DC=EDU,DC=HK
<= dn2id 4373 (in cache)
=> id2entry_r( 4373 )
====> cache_find_entry_dn2id: found id: 4373 rw: 0
<= id2entry_r 0x60648 (cache)
====> cache_return_entry_r
send_ldap_result 0::
do_delete
dn2entry_w: dn: uid=1002,dc=cuhk,dc=edu,dc=hk
=> dn2id( "uid=1002,dc=cuhk,dc=edu,dc=hk" )
====> cache_find_entry_dn2id: found dn: UID=1002,DC=CUHK,DC=EDU,DC=HK
<= dn2id 17159 (in cache)
=> id2entry_w( 17159 )
====> cache_find_entry_dn2id: found id: 17159 rw: 1
<= id2entry_w 0x61358 (cache)
rdwr_Xchk: readers_reading: 0 writer_writing: 1
=> has_children( 17159 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2children.gdbm", 2, 600 )
<= ldbm_cache_open (opened 4)
<= has_children 0
rdwr_Xchk: readers_reading: 0 writer_writing: 1
dn2entry_w: dn: dc=cuhk,dc=edu,dc=hk
=> dn2id( "dc=cuhk,dc=edu,dc=hk" )
====> cache_find_entry_dn2id: found dn: DC=CUHK,DC=EDU,DC=HK
<= dn2id 4373 (in cache)
=> id2entry_w( 4373 )
====> cache_find_entry_dn2id: found id: 4373 rw: 1
<= id2entry_w 0x60648 (cache)
=> id2children_remove( 4373, 17159 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2children.gdbm", 2, 600 )
<= ldbm_cache_open (cache 4)
<= id2children_remove -1 (idl_insert)
send_ldap_result 1::
====> cache_return_entry_w
====> cache_return_entry_w
do_unbind
ber_get_next on fd 5 failed errno 0 (Error 0)
*** got 0 of 0 so far


Any idea ?  Thanks a lot!

ST
Comment 21 Kurt Zeilenga 1999-01-18 17:48:07 UTC
changed notes
Comment 22 Kurt Zeilenga 1999-01-20 06:24:02 UTC
You might try the latest changes on OPENDLAP_REL_ENG_1_1 branch.
Also, I've made more extensive changes on the new OPENLDAP_REL_ENG_1_2 branch.

Both of these versions differ have alias dereferencing disabled
which is problematic.  If you are using alias dereferencing, additional
changes may be needed.

Please let reply with results of any testing you might be able to do.
Comment 23 S.T. Wong 1999-01-20 14:05:19 UTC
> You might try the latest changes on OPENDLAP_REL_ENG_1_1 branch.
> Also, I've made more extensive changes on the new OPENLDAP_REL_ENG_1_2 branch.
> 
> Both of these versions differ have alias dereferencing disabled
> which is problematic.  If you are using alias dereferencing, additional
> changes may be needed.
> 
> Please let reply with results of any testing you might be able to do.

I'm out of office till weekend.  Will test the 1_2 branch asap.

Thanks a lot !
Comment 24 Kurt Zeilenga 1999-01-22 21:07:19 UTC
changed notes
Comment 25 S.T. Wong 1999-01-23 16:25:13 UTC
> You might try the latest changes on OPENDLAP_REL_ENG_1_1 branch.
> Also, I've made more extensive changes on the new OPENLDAP_REL_ENG_1_2 branch.
> 
> Both of these versions differ have alias dereferencing disabled
> which is problematic.  If you are using alias dereferencing, additional
> changes may be needed.
> 
> Please let reply with results of any testing you might be able to do.

I tried OPENLDAP_REL_ENG_1_1 but the problem ("Operation error" on ldapdelete)
still occurred.  When the first operation after daemon start up is ldapdelete,
the daemon dies with segmentation fault :

# /usr/local/openldap/libexec/slapd -f /usr/local/openldap/etc/cu.conf -d 1 -d 2
slapd 1.1.4-Engineering (Sat Jan 23 12:01:14 HKT 1999)
root@spsdev2.csc.cuhk.edu.hk:/usr/local/src/test/ldap/servers/slapd
slapd starting
do_bind
do_bind: version 2 dn (cn=root,dc=cuhk,dc=edu,dc=hk) method 128
dn2entry_r: dn: "cn=root,dc=cuhk,dc=edu,dc=hk"
=> dn2id( "cn=root,dc=cuhk,dc=edu,dc=hk" )
=> dn2id( "cn=root,dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (opened 0)
<= dn2id NOID
dn2entry_r: dn: "dc=cuhk,dc=edu,dc=hk"
=> dn2id( "dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 14226
=> id2entry_r( 14226 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2entry.gdbm", 2, 600 )
<= ldbm_cache_open (opened 1)
=> str2entry
<= str2entry 0x5f2a0
<= id2entry_r( 14226 ) (disk)
====> cache_return_entry_r
send_ldap_result 0::
do_delete
dn2entry_w: dn: "uid=1002,dc=cuhk,dc=edu,dc=hk"
=> dn2id( "uid=1002,dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 5271
=> id2entry_w( 5271 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2entry.gdbm", 2, 600 )
<= ldbm_cache_open (cache 1)
=> str2entry
<= str2entry 0x5efd8
<= id2entry_w( 5271 ) (disk)
rdwr_Xchk: readers_reading: 0 writer_writing: 1
=> has_children( 5271 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2children.gdbm", 2, 600 )
<= ldbm_cache_open (opened 2)
<= has_children 0
rdwr_Xchk: readers_reading: 0 writer_writing: 1
dn2entry_w: dn: "dc=cuhk,dc=edu,dc=hk"
=> dn2id( "dc=cuhk,dc=edu,dc=hk" )
====> cache_find_entry_dn2id: found dn: DC=CUHK,DC=EDU,DC=HK
<= dn2id 14226 (in cache)
=> id2entry_w( 14226 )
====> cache_find_entry_dn2id: found id: 14226 rw: 1
<= id2entry_w 0x5f2a0 (cache)
=> id2children_remove( 14226, 5271 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2children.gdbm", 2, 600 )
<= ldbm_cache_open (cache 2)
Segmentation Fault - core dumped

Then I tried the 1_2 branch, but compilation fails on error 
(Solaris 2.6 + gdbm):

...
gcc -g -O2 -I../../include -I../../include   -I/usr/local/include -DHAVE_CONFIG_H   -c  bind.c
bind.c: In function `do_bind':
bind.c:140: structure has no member named `c_protocol'
bind.c:173: structure has no member named `c_protocol'
*** Error code 1
make: Fatal error: Command failed for target `bind.o'
Current working directory /usr/local/src/test/ldap.1.2/servers/slapd
*** Error code 1
make: Fatal error: Command failed for target `all-local-srv'
Current working directory /usr/local/src/test/ldap.1.2/servers/slapd
*** Error code 1
make: Fatal error: Command failed for target `all-common'
Current working directory /usr/local/src/test/ldap.1.2/servers/slapd
*** Error code 1
make: Fatal error: Command failed for target `all-common'
Current working directory /usr/local/src/test/ldap.1.2/servers
*** Error code 1
make: Fatal error: Command failed for target `all-common'


Any idea ?  Thanks again.
ST Wong
Comment 26 Kurt Zeilenga 1999-01-23 18:20:25 UTC
At 04:31 PM 1/23/99 GMT, st@hp735c.csc.cuhk.edu.hk wrote:
>> You might try the latest changes on OPENDLAP_REL_ENG_1_1 branch.
>> Also, I've made more extensive changes on the new OPENLDAP_REL_ENG_1_2 branch.
>> 
>> Both of these versions differ have alias dereferencing disabled
>> which is problematic.  If you are using alias dereferencing, additional
>> changes may be needed.
>> 
>> Please let reply with results of any testing you might be able to do.
>
>I tried OPENLDAP_REL_ENG_1_1 but the problem ("Operation error" on ldapdelete)
>still occurred.  When the first operation after daemon start up is ldapdelete,
>the daemon dies with segmentation fault :
>
># /usr/local/openldap/libexec/slapd -f /usr/local/openldap/etc/cu.conf -d 1 -d 2
>slapd 1.1.4-Engineering (Sat Jan 23 12:01:14 HKT 1999)

I'll try to did through your dog when I get chance.... however, would
be easier with args logging (-d 4) in addition to trace (-d 1).

>Segmentation Fault - core dumped

A debugger backtrace ('bt'/'where') are also very useful.

>Then I tried the 1_2 branch, but compilation fails on error 
>(Solaris 2.6 + gdbm):
>...
>gcc -g -O2 -I../../include -I../../include   -I/usr/local/include -DHAVE_CONFIG_H   -c  bind.c

fixed.  try a 'cvs update'
Comment 27 Kurt Zeilenga 1999-01-25 19:17:03 UTC
Sent directly to me...

-------- Original Message --------
Subject: Re: pls help: "Operations error" from ldapdelete (ITS#29)
Date: Tue, 26 Jan 1999 01:10:44 +0800 (EAT)
From: "S.T. Wong" <st@hp735c.csc.cuhk.edu.hk>
To: Kurt@openldap.org (Kurt D. Zeilenga)

hi,

> >I tried OPENLDAP_REL_ENG_1_1 but the problem ("Operation error" on ldapdelete)
> >still occurred.  When the first operation after daemon start up is ldapdelete,
> >the daemon dies with segmentation fault :
> >
> ># /usr/local/openldap/libexec/slapd -f /usr/local/openldap/etc/cu.conf -d 1 -d 2
> >slapd 1.1.4-Engineering (Sat Jan 23 12:01:14 HKT 1999)
> 
> I'll try to did through your dog when I get chance.... however, would
> be easier with args logging (-d 4) in addition to trace (-d 1).

I tried several times with -d 4.  Sometimes I got segmentation fault and 
sometimes operation error, when I issue ldapdelete at the first command after
slapd started up:

-------------------------- Segmentation Fault -------------------------------
slapd 1.1.4-Engineering (Sat Jan 23 12:01:14 HKT 1999)
        root@spsdev2.csc.cuhk.edu.hk:/usr/local/src/test/ldap/servers/slapd
slapd starting
do_bind
do_bind: version 2 dn (cn=root,dc=cuhk,dc=edu,dc=hk) method 128
==> ldbm_back_bind: dn: cn=root,dc=cuhk,dc=edu,dc=hk
dn2entry_r: dn: "cn=root,dc=cuhk,dc=edu,dc=hk"
=> dn2id( "cn=root,dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
ldbm_cache_open (blksize 8192) (maxids 2046) (maxindirect 2)
<= ldbm_cache_open (opened 0)
<= dn2id NOID
dn2entry_r: dn: "dc=cuhk,dc=edu,dc=hk"
=> dn2id( "dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 14226
=> id2entry_r( 14226 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2entry.gdbm", 2, 600 )ldbm_cache_open (blksize 8192) (maxids 2046) (maxindirect 2)
<= ldbm_cache_open (opened 1)
=> str2entry
<= str2entry 0xa084a8
entry_rdwr_rlock: ID: 14226
<= id2entry_r( 14226 ) (disk)
====> cache_return_entry_r
entry_rdwr_runlock: ID: 14226
send_ldap_result 0::
do_delete
do_delete: dn (uid=1002,dc=cuhk,dc=edu,dc=hk)
==> ldbm_back_delete: uid=1002,dc=cuhk,dc=edu,dc=hk
dn2entry_w: dn: "uid=1002,dc=cuhk,dc=edu,dc=hk"
=> dn2id( "uid=1002,dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 5271
=> id2entry_w( 5271 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2entry.gdbm", 2, 600 )
<= ldbm_cache_open (cache 1)
=> str2entry
<= str2entry 0x6b8e0
entry_rdwr_wlock: ID: 5271
<= id2entry_w( 5271 ) (disk)
rdwr_Xchk: readers_reading: 0 writer_writing: 1
=> has_children( 5271 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2children.gdbm", 2, 600 )
ldbm_cache_open (blksize 8192) (maxids 2046) (maxindirect 2)
<= ldbm_cache_open (opened 2)
<= has_children 0
rdwr_Xchk: readers_reading: 0 writer_writing: 1
dn2entry_w: dn: "dc=cuhk,dc=edu,dc=hk"
=> dn2id( "dc=cuhk,dc=edu,dc=hk" )
====> cache_find_entry_dn2id: found dn: DC=CUHK,DC=EDU,DC=HK
entry_rdwr_rlock: ID: 14226
entry_rdwr_runlock: ID: 14226
<= dn2id 14226 (in cache)
=> id2entry_w( 14226 )
====> cache_find_entry_dn2id: found id: 14226 rw: 1
entry_rdwr_rlock: ID: 14226
entry_rdwr_runlock: ID: 14226
entry_rdwr_wlock: ID: 14226
<= id2entry_w 0xa084a8 (cache)
=> id2children_remove( 14226, 5271 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2children.gdbm", 2, 600 )
<= ldbm_cache_open (cache 2)
<= id2children_remove 0
=> dn2id_delete( "1002, dc=cuhk, dc=edu, dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
Segmentation Fault - core dumped

----------------------------- Operations Error ----------------------------
# ./slapd -f ../etc/cu.conf -d 1 -d 4
slapd 1.1.4-Engineering (Sat Jan 23 12:01:14 HKT 1999)
        root@spsdev2.csc.cuhk.edu.hk:/usr/local/src/test/ldap/servers/slapd
slapd starting
do_bind
do_bind: version 2 dn (cn=root,dc=cuhk,dc=edu,dc=hk) method 128
==> ldbm_back_bind: dn: cn=root,dc=cuhk,dc=edu,dc=hk
dn2entry_r: dn: "cn=root,dc=cuhk,dc=edu,dc=hk"
=> dn2id( "cn=root,dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
ldbm_cache_open (blksize 8192) (maxids 2046) (maxindirect 2)
<= ldbm_cache_open (opened 0)
<= dn2id NOID
dn2entry_r: dn: "dc=cuhk,dc=edu,dc=hk"
=> dn2id( "dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 14226
=> id2entry_r( 14226 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2entry.gdbm", 2, 600 )
ldbm_cache_open (blksize 8192) (maxids 2046) (maxindirect 2)
<= ldbm_cache_open (opened 1)
=> str2entry
<= str2entry 0xa084a8
entry_rdwr_rlock: ID: 14226
<= id2entry_r( 14226 ) (disk)
====> cache_return_entry_r
entry_rdwr_runlock: ID: 14226
send_ldap_result 0::
do_delete
do_delete: dn (uid=1002,dc=cuhk,dc=edu,dc=hk)
==> ldbm_back_delete: uid=1002,dc=cuhk,dc=edu,dc=hk
dn2entry_w: dn: "uid=1002,dc=cuhk,dc=edu,dc=hk"
=> dn2id( "uid=1002,dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 5271
=> id2entry_w( 5271 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2entry.gdbm", 2, 600 )
<= ldbm_cache_open (cache 1)
=> str2entry
<= str2entry 0xa08700
entry_rdwr_wlock: ID: 5271
<= id2entry_w( 5271 ) (disk)
rdwr_Xchk: readers_reading: 0 writer_writing: 1
=> has_children( 5271 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2children.gdbm", 2, 600 )
ldbm_cache_open (blksize 8192) (maxids 2046) (maxindirect 2)
<= ldbm_cache_open (opened 2)
<= has_children 0
rdwr_Xchk: readers_reading: 0 writer_writing: 1
dn2entry_w: dn: "dc=cuhk,dc=edu,dc=hk"
=> dn2id( "dc=cuhk,dc=edu,dc=hk" )
====> cache_find_entry_dn2id: found dn: DC=CUHK,DC=EDU,DC=HK
entry_rdwr_rlock: ID: 14226
entry_rdwr_runlock: ID: 14226
<= dn2id 14226 (in cache)
=> id2entry_w( 14226 )
====> cache_find_entry_dn2id: found id: 14226 rw: 1
entry_rdwr_rlock: ID: 14226
entry_rdwr_runlock: ID: 14226
entry_rdwr_wlock: ID: 14226
<= id2entry_w 0xa084a8 (cache)
=> id2children_remove( 14226, 5271 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2children.gdbm", 2, 600 )
<= ldbm_cache_open (cache 2)
<= id2children_remove -1 (idl_delete)
<=- ldbm_back_delete: operations error uid=1002,dc=cuhk,dc=edu,dc=hk
send_ldap_result 1::
====> cache_return_entry_w
entry_rdwr_wunlock: ID: 14226
do_unbind
ber_get_next on fd 5 failed errno 0 (Error 0)
*** got 0 of 0 so far
====> cache_return_entry_w
entry_rdwr_wunlock: ID: 5271
------------------------------ cut here ----------------------------------


> >Segmentation Fault - core dumped
> 
> A debugger backtrace ('bt'/'where') are also very useful.

I then tried to get backtrace for ldapdelete, again, there're segmentation
fault and operation errors.  Is that sufficient ?

----------------------------- Operations Error ----------------------------
(gdb) file slapd
Load new symbol table from "slapd"? (y or n) y
Reading symbols from slapd...done.
(gdb) set args -f ../etc/cu.conf -d 1 -d 4
(gdb) run
Starting program: /disks/openldap/libexec/slapd -f ../etc/cu.conf -d 1 -d 4
[New LWP    2        ]
[New LWP    3        ]
slapd 1.1.4-Engineering (Sat Jan 23 12:01:14 HKT 1999)
root@spsdev2.csc.cuhk.edu.hk:/usr/local/src/test/ldap/servers/slapd
slapd starting
[New LWP    4        ]
do_bind
do_bind: version 2 dn (cn=root,dc=cuhk,dc=edu,dc=hk) method 128
==> ldbm_back_bind: dn: cn=root,dc=cuhk,dc=edu,dc=hk
dn2entry_r: dn: "cn=root,dc=cuhk,dc=edu,dc=hk"
=> dn2id( "cn=root,dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
[New LWP    5        ]
ldbm_cache_open (blksize 8192) (maxids 2046) (maxindirect 2)
<= ldbm_cache_open (opened 0)
<= dn2id NOID
dn2entry_r: dn: "dc=cuhk,dc=edu,dc=hk"
=> dn2id( "dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 14226
=> id2entry_r( 14226 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2entry.gdbm", 2, 600 )
ldbm_cache_open (blksize 8192) (maxids 2046) (maxindirect 2)
<= ldbm_cache_open (opened 1)
=> str2entry
<= str2entry 0xa084a8
entry_rdwr_rlock: ID: 14226
<= id2entry_r( 14226 ) (disk)
====> cache_return_entry_r
entry_rdwr_runlock: ID: 14226
send_ldap_result 0::
do_delete
do_delete: dn (uid=1002,dc=cuhk,dc=edu,dc=hk)
==> ldbm_back_delete: uid=1002,dc=cuhk,dc=edu,dc=hk
dn2entry_w: dn: "uid=1002,dc=cuhk,dc=edu,dc=hk"
=> dn2id( "uid=1002,dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 5271
=> id2entry_w( 5271 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2entry.gdbm", 2, 600 )
<= ldbm_cache_open (cache 1)
=> str2entry
<= str2entry 0xa08790
entry_rdwr_wlock: ID: 5271
<= id2entry_w( 5271 ) (disk)
rdwr_Xchk: readers_reading: 0 writer_writing: 1
=> has_children( 5271 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2children.gdbm", 2, 600 )
ldbm_cache_open (blksize 8192) (maxids 2046) (maxindirect 2)
<= ldbm_cache_open (opened 2)
<= has_children 0
rdwr_Xchk: readers_reading: 0 writer_writing: 1
dn2entry_w: dn: "dc=cuhk,dc=edu,dc=hk"
=> dn2id( "dc=cuhk,dc=edu,dc=hk" )
====> cache_find_entry_dn2id: found dn: DC=CUHK,DC=EDU,DC=HK
entry_rdwr_rlock: ID: 14226
entry_rdwr_runlock: ID: 14226
<= dn2id 14226 (in cache)
=> id2entry_w( 14226 )
====> cache_find_entry_dn2id: found id: 14226 rw: 1
entry_rdwr_rlock: ID: 14226
entry_rdwr_runlock: ID: 14226
entry_rdwr_wlock: ID: 14226
<= id2entry_w 0xa084a8 (cache)
=> id2children_remove( 14226, 5271 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2children.gdbm", 2, 600 )
<= ldbm_cache_open (cache 2)
<= id2children_remove -1 (idl_delete)
<=- ldbm_back_delete: operations error uid=1002,dc=cuhk,dc=edu,dc=hk
send_ldap_result 1::
====> cache_return_entry_w
entry_rdwr_wunlock: ID: 14226
do_unbind
ber_get_next on fd 8 failed errno 0 (Error 0)
*** got 0 of 0 so far

Program received signal SIGLWP, Signal LWP.
[Switching to LWP    4        ]

Program received signal SIGLWP, Signal LWP.
0xdf5f98a8 in _lwp_mutex_unlock ()
(gdb)
(gdb) bt
#0  0xdf5f98a8 in _lwp_mutex_unlock ()
#1  0xdf539958 in _sched_unlock ()
#2  0xdf538938 in _mutex_adaptive_unlock ()
#3  0xdf538678 in _mutex_wakeup ()
#4  0xdf545294 in __wrds ()
#5  0xdf6463cc in _rmutex_unlock ()
#6  0xdf623550 in _fprintf ()
#7  0x1d26c in entry_rdwr_unlock (e=0xa084a8, rw=1) at entry.c:266
#8  0x29d4c in cache_return_entry_rw (cache=0x606f8, e=0xa084a8, rw=1)
	at cache.c:79
	#9  0x29d90 in cache_return_entry_w (cache=0x606f8, e=0xa084a8) at cache.c:92
	#10 0x2b7b4 in ldbm_back_delete (be=0x60210, conn=0x687d8, op=0xa08538,
		dn=0x6ba00 "uid=1002,dc=cuhk,dc=edu,dc=hk") at delete.c:142
		#11 0x21b34 in do_delete (conn=0x687d8, op=0xa08538) at delete.c:77
		#12 0x195ac in connection_operation (arg_v=0x61ea8) at connection.c:58
(gdb)
---------------------------- Segmentation Fault --------------------------------
(gdb) set args -f ../etc/cu.conf -d 1 -d 4
(gdb) run
Starting program: /disks/openldap/libexec/slapd -f ../etc/cu.conf -d 1 -d 4
[New LWP    2        ]
[New LWP    3        ]
slapd 1.1.4-Engineering (Sat Jan 23 12:01:14 HKT 1999)
        root@spsdev2.csc.cuhk.edu.hk:/usr/local/src/test/ldap/servers/slapd
slapd starting
[New LWP    4        ]
do_bind
do_bind: version 2 dn (cn=root,dc=cuhk,dc=edu,dc=hk) method 128
==> ldbm_back_bind: dn: cn=root,dc=cuhk,dc=edu,dc=hk
dn2entry_r: dn: "cn=root,dc=cuhk,dc=edu,dc=hk"
[=> dn2id( "Ncn=root,dc=cuhk,dc=edu,dc=hk" )
ew L=> ldbm_cache_open( "WP  /usr/local/openldap/var/db/dn2id.gdbm  5 ", 2  , 60
0  )
    ]
ldbm_cache_open (blksize 8192) (maxids 2046) (maxindirect 2)
<= ldbm_cache_open (opened 0)
<= dn2id NOID
dn2entry_r: dn: "dc=cuhk,dc=edu,dc=hk"
=> dn2id( "dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 14226
=> id2entry_r( 14226 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2entry.gdbm", 2, 600 )
ldbm_cache_open (blksize 8192) (maxids 2046) (maxindirect 2)
<= ldbm_cache_open (opened 1)
=> str2entry
<= str2entry 0xa084a8
entry_rdwr_rlock: ID: 14226
<= id2entry_r( 14226 ) (disk)
====> cache_return_entry_r
entry_rdwr_runlock: ID: 14226
send_ldap_result 0::
do_delete
do_delete: dn (uid=1002,dc=cuhk,dc=edu,dc=hk)
==> ldbm_back_delete: uid=1002,dc=cuhk,dc=edu,dc=hk
dn2entry_w: dn: "uid=1002,dc=cuhk,dc=edu,dc=hk"
=> dn2id( "uid=1002,dc=cuhk,dc=edu,dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)
[<= dn2id 5271New
 LW=> id2entry_P  w( 5271   )
6 => ldbm_cache_open( "  /usr/local/openldap/var/db/id2entry.gdbm   ", 2 ,  600]
 )
<= ldbm_cache_open (cache 1)
=> str2entry
<= str2entry 0x6b8e0
entry_rdwr_wlock: ID: 5271
<= id2entry_w( 5271 ) (disk)
rdwr_Xchk: readers_reading: 0 writer_writing: 1
=> has_children( 5271 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2children.gdbm", 2, 600 )
ldbm_cache_open (blksize 8192) (maxids 2046) (maxindirect 2)
<= ldbm_cache_open (opened 2)
<= has_children 0
rdwr_Xchk: readers_reading: 0 writer_writing: 1
dn2entry_w: dn: "dc=cuhk,dc=edu,dc=hk"
=> dn2id( "dc=cuhk,dc=edu,dc=hk" )
====> cache_find_entry_dn2id: found dn: DC=CUHK,DC=EDU,DC=HK
entry_rdwr_rlock: ID: 14226
entry_rdwr_runlock: ID: 14226
<= dn2id 14226 (in cache)
=> id2entry_w( 14226 )
====> cache_find_entry_dn2id: found id: 14226 rw: 1
entry_rdwr_rlock: ID: 14226
entry_rdwr_runlock: ID: 14226
entry_rdwr_wlock: ID: 14226
<= id2entry_w 0xa084a8 (cache)
=> id2children_remove( 14226, 5271 )
=> ldbm_cache_open( "/usr/local/openldap/var/db/id2children.gdbm", 2, 600 )
<= ldbm_cache_open (cache 2)
<= id2children_remove 0
=> dn2id_delete( "1002, dc=cuhk, dc=edu, dc=hk" )
=> ldbm_cache_open( "/usr/local/openldap/var/db/dn2id.gdbm", 2, 600 )
<= ldbm_cache_open (cache 0)

Program received signal SIGSEGV, Segmentation fault.
0x41968 in _gdbm_get_bucket ()
(gdb) bt
#0  0x41968 in _gdbm_get_bucket ()
#1  0x42bb8 in _gdbm_findkey ()
#2  0x40ec0 in gdbm_delete ()
#3  0x3579c in ldbm_delete (ldbm=0x6c388, key={
	  dptr = 0x6baa0 "1002,DC=CUHK,DC=EDU,DC=HK", dsize = 26}) at ldbm.c:356
#4  0x2b28c in ldbm_cache_delete (db=0x60738, key={
      dptr = 0x6baa0 "1002,DC=CUHK,DC=EDU,DC=HK", dsize = 26}) at dbcache.c:261
#5  0x2bde8 in dn2id_delete (be=0x60210,
	  dn=0x6baa0 "1002,DC=CUHK,DC=EDU,DC=HK") at dn2id.c:141
#6  0x2b6c8 in ldbm_back_delete (be=0x60210, conn=0x687d8, op=0xa08538,
	  dn=0x6ba00 "1002,dc=cuhk,dc=edu,dc=hk") at delete.c:117
#7  0x21b34 in do_delete (conn=0x687d8, op=0xa08538) at delete.c:77
#8  0x195ac in connection_operation (arg_v=0x61ea8) at connection.c:58
(gdb)
-------------------------------- cut here ----------------------------------

> >Then I tried the 1_2 branch, but compilation fails on error 
> >(Solaris 2.6 + gdbm):
> >...
> >gcc -g -O2 -I../../include -I../../include   -I/usr/local/include -DHAVE_CONFIG_H   -c  bind.c
> 
> fixed.  try a 'cvs update'

Thanks, but I got another compilation error when linking libbackends.a:

Undefined                       first referenced
 symbol                             in file
dbEnvInit_mutex                     libbackends.a(ldbminit.o)
ld: fatal: Symbol referencing errors. No output written to slapd
*** Error code 1
make: Fatal error: Command failed for target `slapd'
Current working directory /usr/local/src/test/ldap/servers/slapd
*** Error code 1


Any advice ?  Thanks a lot!

Best Regards,
ST
Comment 28 Kurt Zeilenga 1999-01-27 00:47:05 UTC
What is you ldbm suffix as defined in slapd.conf?
Comment 29 S.T. Wong 1999-01-27 02:20:38 UTC
> What is you ldbm suffix as defined in slapd.conf?

I've something like this in slapd.conf :

database        ldbm
suffix          "dc=cuhk, dc=edu, dc=hk"

Thanks.
ST
Comment 30 Kurt Zeilenga 1999-02-02 02:50:47 UTC
Please test --without-threads using latest 1.2 via AnonCVS.
(--without-threads should now work out of the box)
Comment 31 S.T. Wong 1999-02-02 06:32:26 UTC
Hi,

> Please test --without-threads using latest 1.2 via AnonCVS.
> (--without-threads should now work out of the box)

I got error when compiling latest 1.2 with the "--without-threads" flag :

make  libback-shell.a
gcc -g -O2 -I../../../include -I../../../include -I.. -I./..  -I/usr/local/include -DHAVE_CONFIG_H   -c  init.c
gcc -g -O2 -I../../../include -I../../../include -I.. -I./..  -I/usr/local/include -DHAVE_CONFIG_H   -c  config.c
gcc -g -O2 -I../../../include -I../../../include -I.. -I./..  -I/usr/local/include -DHAVE_CONFIG_H   -c  fork.c
fork.c:20: conflicting types for `forkandexec'
shell.h:25: previous declaration of `forkandexec'
*** Error code 1
make: Fatal error: Command failed for target `fork.o'
Current working directory /usr/local/src/ldap-1.2/ldap/servers/slapd/back-shell
*** Error code 1

Pls advise.  Thanks.

ST

Comment 32 Kurt Zeilenga 1999-02-02 13:21:53 UTC
I fixed the old prototype in shell.h.  cvs update and try
again.

	Kurt
Comment 33 Kurt Zeilenga 1999-02-03 23:28:00 UTC
changed notes
Comment 34 Kurt Zeilenga 1999-02-03 23:29:02 UTC
Please try the latest 1.2 release engineering sources available
via AnonCVS.  Others have reports good results with latest set
of changes.
Comment 35 S.T. Wong 1999-02-04 02:46:43 UTC
> Please try the latest 1.2 release engineering sources available
> via AnonCVS.  Others have reports good results with latest set
> of changes.

I got the sources (tag : OPENLDAP_REL_ENG_1_2) via AnonCVS but the file 
ldap_features.h is missing.  Did I do anything wrong ?  Thanks a lot.
Comment 36 Kurt Zeilenga 1999-02-04 18:34:49 UTC
changed notes
Comment 37 Kurt Zeilenga 1999-02-04 18:35:26 UTC
changed notes
changed state Test to Release
Comment 38 Kurt Zeilenga 1999-02-11 23:07:27 UTC
changed notes
changed state Release to Closed
Comment 39 OpenLDAP project 2014-08-01 21:06:51 UTC
Same as ITS#53.
Fix released with 1.2beta2