Issue 26 - slapd cache corruption
Summary: slapd cache corruption
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-29 12:41 UTC by fo@hawo.stw.uni-erlangen.de
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 fo@hawo.stw.uni-erlangen.de 1998-12-29 12:41:05 UTC
Full_Name: Christian Forster
Version: 1.1.1
OS: Linux/i386
URL: 
Submission from: (NULL) (131.188.2.7)


Hi again!

I used the same test database (-> ITS#24) and tried to add a new
entry. That time I bound as an unpriviledged user, but have a look...


[fo@absorber bin]$ ./ldapadd -D "cn=normalUser, o=Your Organization Name, c=US"
-w 123
cn=a, o=Your Organization Name, c=US
cn=a

adding new entry cn=a, o=Your Organization Name, c=US
ldap_add: Insufficient access

[fo@absorber bin]$ ./ldapadd -D "cn=normalUser, o=Your Organization Name, c=US"
-w 123
cn=a, o=Your Organization Name, c=US
cn=a

adding new entry cn=a, o=Your Organization Name, c=US
ldap_add: Already exists


Oups... Seems like the slapd cache failed:

do_bind
do_bind: version 2 dn (cn=normalUser,o=Your Organization Name,c=US) method 128
dn2entry_r: dn: cn=normalUser,o=Your Organization Name,c=US
=> dn2id( "cn=normalUser,o=Your Organization Name,c=US" )
=> ldbm_cache_open( "/var/ldap/test/dn2id.dbb", 7, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 3
=> id2entry_r( 3 )
====> cache_find_entry_dn2id: found id: 3 rw: 0
<= id2entry_r 0x80b33f8 (cache)
====> cache_return_entry_r
send_ldap_result 0::
do_add
=> dn2id( "cn=a,o=Your Organization Name,c=US" )
=> ldbm_cache_open( "/var/ldap/test/dn2id.dbb", 7, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id NOID
====> cache_add_entry lock: entry cn=a, o=Your Organization Name, c=US id 6
already in dn cache
cache_add_entry_lock failed
send_ldap_result 68::
do_unbind

Sorry for the inconvenience,
Christian Forster
Comment 1 Kurt Zeilenga 1998-12-29 16:55:55 UTC
moved from Incoming to Software
Comment 2 Kurt Zeilenga 1998-12-29 16:58:58 UTC
Can you reply with a log containing messages both ldapadd?
Can you ldapsearch the entry?  when bound as root?

Thanks. Kurt
Comment 3 fo@hawo.stw.uni-erlangen.de 1998-12-29 17:53:59 UTC
> 
> Can you reply with a log containing messages both ldapadd?
> Can you ldapsearch the entry?  when bound as root?
> 
> Thanks. Kurt
> 

Ok, I placed a tar ball in your incoming directory of your
ftp server:

	ftp://ftp.openldap.org/incoming/cache_bug.tar.gz

Inside the archive you'll find logs generated by slapd, 
ldapadd and ldapsearch. cmd.txt shows the corresponding
command line.

Btw: It's possible to ldapsearch the new entry (anonymously and 
as root). And after a slapd restart everything is clean again.

Chrstian
Comment 4 Kurt Zeilenga 1998-12-29 21:30:37 UTC
changed notes
changed state Open to Feedback
Comment 5 Kurt Zeilenga 1998-12-30 04:35:49 UTC
I committed the patch with a minor fix to group.c (r1.11).
I must admit that the solution is a hack and could stand
some improvement.  However, it does pass our test suite
and your test cases (ITS24 & ITS26)...

If there is no objection, I will apply the changes to
REL_ENG_1_1 tomorrow.

Kurt
Comment 6 fo@hawo.stw.uni-erlangen.de 1998-12-30 16:52:18 UTC
> 
> I committed the patch with a minor fix to group.c (r1.11).
> I must admit that the solution is a hack and could stand
> some improvement.  However, it does pass our test suite
> and your test cases (ITS24 & ITS26)...
> 
> If there is no objection, I will apply the changes to
> REL_ENG_1_1 tomorrow.

Yeah! This patch seems to work. (at least in my case).

:-))
Thanks!

Christian
Comment 7 Kurt Zeilenga 1998-12-30 17:34:23 UTC
changed notes
changed state Feedback to Test
Comment 8 Kurt Zeilenga 1998-12-30 19:52:14 UTC
changed notes
changed state Test to Release
Comment 9 Kurt Zeilenga 1998-12-30 19:54:05 UTC
changed notes
Comment 10 Kurt Zeilenga 1998-12-31 20:26:09 UTC
changed notes
Comment 11 Kurt Zeilenga 1998-12-31 20:47:05 UTC
marked public
Comment 12 Kurt Zeilenga 1998-12-31 20:48:39 UTC
changed state Release to Closed
Comment 13 Kurt Zeilenga 1999-01-13 17:55:10 UTC
moved from Software to Software Bugs
Comment 14 OpenLDAP project 2014-08-01 21:06:51 UTC
Released with 1.1.2 and made public