Bug 196754

Summary: OpenLDAP database becomes corrupt, possibly after hard reset
Product: [Fedora] Fedora Reporter: W. Michael Petullo <redhat>
Component: openldapAssignee: Jan Safranek <jsafrane>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openldap-servers-2.3.30-2.fc6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-23 12:06:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Corrupt LDAP database none

Description W. Michael Petullo 2006-06-26 21:59:44 UTC
Description of problem:
I have a system that runs slapd to provide LDAP to my network.  Occasionally, I
find that the LDAP database becomes corrupt.  This seems to happen after a hard
reset (i.e., a power failure.)  The system has SELinux enforcing its targeted
policy.

Version-Release number of selected component (if applicable):
openldap-servers-2.3.19-4

How reproducible:
Sometimes

Steps to Reproduce:
Perform a hard reset with the LDAP server running
  
Actual results:
# /etc/init.d/ldap start
Checking configuration files for slapd: bdb_db_open: unclean shutdown detected:
attempting recovery.
bdb_db_open: Warning - No DB_CONFIG file found in directory /var/lib/ldap: (2)
Expect poor performance for suffix dc=flyn,dc=org.
bdb_db_open: Recovery skipped in read-only mode. Run manual recovery if errors
are encountered.
bdb(dc=flyn,dc=org): PANIC: fatal region error detected; run recovery
bdb_db_open: Database cannot be opened, err -30974. Restore from backup!
bdb(dc=flyn,dc=org): DB_ENV->lock_id_free interface requires an environment
configured for the locking subsystem
backend_startup_one: bi_db_open failed! (-30974)
slap_startup failed (test would succeed using the -u switch)

[FAILED]
stale lock file may be present in /var/lib/ldap [WARNING]

Expected results:


Additional info:

Comment 1 W. Michael Petullo 2006-06-26 22:03:48 UTC
Created attachment 131573 [details]
Corrupt LDAP database

This is the corrupt database.  Restoring a previous, known good database allow
slapd to run.

Comment 2 Jan Safranek 2007-05-23 12:06:32 UTC
openldap-servers-2.3.30-2.fc6 has improved startup checks and recovery, but
sometimes it's simply not possible to fully recover the database automatically -
manual attention is needed.