Bug#419222: [Pkg-openldap-devel]

Quanah Gibson-Mount quanah at stanford.edu
Wed Apr 18 14:28:36 UTC 2007


--On Wednesday, April 18, 2007 1:45 PM +0200 Gyuris Szabolcs 
<szimszon at oregpreshaz.eu> wrote:

> Hi Quanah!
>
> I'm again :(
>
> Gyuris Szabolcs wrote:
>>> If things freeze again, can you please get the output of:
>>>
>>> db_stat -h /var/lib/ldap -c
>> I'll keep an eye on it.
>
> Now it goes weirded :(
>
> Today the symptoms was:
>
>  - suddenly I can't found a user with the command "id" 'No such user'
>  - if I exec ldapsearch like in ldap.conf, with the same filter settings
> then I got a hit
>  - after a while I go with my "gq" tool to see what my ldap database
> look like but the database didn't have an initial dc record - according
> to gq :(
>  - I'd run ldapsearch next and it found only one record - before that
> and after I realized that there is something wrong there was many records.
>
> I can't find the program "db_stat" but I copied the faulty database
> files so I could run the db_stat any time.
>
> That's not all...
> After all I rebooted the virtual machine and set the mem limit to 256MB...
>
> After I started the machine I run ldapsearch - I didn't do anything with
> slapd - and there was a fragment of entrys (about 17, the full database
> now is about ~220 entry). So I dropped the whole db (stoped slapd and rm
> all the files DB_CONFIG - excluded). I started slapd and added all the
> enrtys from the master slapd (ldapadd).
>
> I can't imagine what that could be :(
> Isn't it possible that all this happens because we use the "backend hdb"?


I don't think so (I've been using back-hdb for over a year now) but you 
could always try back-bdb.  I've noted you say you are running OpenLDAP 
under a VM.  I've personally not tried that, but I do have another product 
(slamd) which uses the Java edition of BDB to store data, running on a VM, 
and I've had a number of problems with that scenario that I haven't had 
running slamd outside of a VM.  I'm not sure that BDB gets handled properly 
inside a VM. :/

When (if :/) this re-occurs, rather than deleting the *.bdb files, can you:

(a) stop slapd
(b) restart slapd
(c) slapcat -l db.ldif
(d) more db.ldif

See if you can find the entire contents of your database in the resulting 
LDIF file.  Stopping and restarting slapd will force db recovery 
(essentially the BDB db_recover command) if slapd detects that corruption 
has occurred.

db_stat is one of the utilities that comes with BDB.  It may be called 
something like "db_stat4.2" with Debian, to differentiate it from other 
versions of BDB.


Thanks,
Quanah


--
Quanah Gibson-Mount
Senior Systems Software Developer
ITS/Shared Application Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html




More information about the Pkg-openldap-devel mailing list