Bug 829432 - Slapd crashes when running modrdn operations for 10000 users with groups.
Slapd crashes when running modrdn operations for 10000 users with groups.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base (Show other bugs)
7.0
All Linux
high Severity high
: rc
: 7.0
Assigned To: Rich Megginson
Sankar Ramalingam
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-06 13:51 EDT by Sankar Ramalingam
Modified: 2014-06-17 22:54 EDT (History)
5 users (show)

See Also:
Fixed In Version: 389-ds-base-1.3.1.2-1.el7
Doc Type: Bug Fix
Doc Text:
Cause: Deleting backend code ldbm_instance_delete_instance_entry_callback had no checking for the ordinary operations accessing the backend instance. Consequence: Even if some operations are still in progress, the backend instance could be deleted and it crashes the server. Fix: Added a reference counter to the backend and if the backend is in use, delete returns 0. Result: Backend deletion fails if the backend is still being used and it does not crash the server.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 06:39:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Complete stack trace for the crash (201.09 KB, text/plain)
2012-06-06 13:51 EDT, Sankar Ramalingam
no flags Details

  None (edit)
Description Sankar Ramalingam 2012-06-06 13:51:40 EDT
Created attachment 589970 [details]
Complete stack trace for the crash

Description of problem: slapd crashes while running subtree renames stress tests.
I observed this crash after successful modrdn operations and ldapsearch command.


Version-Release number of selected component (if applicable): 389-ds-base-1.2.10.2


How reproducible: Consistently.


Steps to Reproduce:
1. Install 389-ds-base 1.2.10.2 or latest.
2. Enable debug repos and run "debuginfo-install 389-ds-base" to install debuginfo packages to analyze the core.PID files.
Refer - http://port389.org/wiki/FAQ#Debugging_Crashes
3. From TET RHEL63 branch, run the stress tests for subtree renames. Choose only stress_03_02 test. Remove the cleanup(ic9) test from iclist.
4. It takes about 2 to 3 hrs to complete the stress test. In the end, you will see the test PASS.
5. Check whether slapd instance is running. If slapd is not running, then the server crashed.
6. Check for the core file under /var/log/dirsrv/slapd-$inst/core.$PID.
  
Actual results: Slapd crashed and core files generated.

Expected results: Slapd shouldn't crash.


Additional info: Stress test report - 
http://hp-z600-01.rhts.eng.bos.redhat.com/qa/archive/ds/90/stress_ds90/Linux/20120605-104757.html
Comment 1 Rich Megginson 2012-06-06 17:25:12 EDT
The stack trace shows that slapd is crashing when an external client sends an operation to remove databases while there are still search and update operations are in progress.  While the server should not crash, this is an uncommon operation and customers are not likely to run into this situation.  Therefore, I'm moving this bug to 6.4.

You said you did not run the cleanup part of the test, yet usually the databases are removed as part of the cleanup?  What's going on here?
Comment 3 Rich Megginson 2012-06-20 16:51:42 EDT
Upstream ticket:
https://fedorahosted.org/389/ticket/391
Comment 6 Rich Megginson 2013-10-01 19:27:11 EDT
moving all ON_QA bugs to MODIFIED in order to add them to the errata (can't add bugs in the ON_QA state to an errata).  When the errata is created, the bugs should be automatically moved back to ON_QA.
Comment 8 Sankar Ramalingam 2013-11-11 07:54:42 EST
To reproduce the problem mentioned, I executed stress tests for subtree renames. There are few error messages in the logs as Cannot allocate memory. However, I didn't encounter any server crash. Please advise.

[11/Nov/2013:07:02:36 -0500] - libdb: BDB2055 Lock table is out of available lock entries
[11/Nov/2013:07:02:36 -0500] id2entry - db error 12 (Cannot allocate memory)
[11/Nov/2013:07:02:36 -0500] - libdb: BDB2055 Lock table is out of available lock entries
[11/Nov/2013:07:02:36 -0500] id2entry - db error 12 (Cannot allocate memory)
[11/Nov/2013:07:02:36 -0500] - libdb: BDB2055 Lock table is out of available lock entries
[11/Nov/2013:07:02:36 -0500] id2entry - db error 12 (Cannot allocate memory)
[11/Nov/2013:07:02:36 -0500] - libdb: BDB2055 Lock table is out of available lock entries
[11/Nov/2013:07:02:36 -0500] id2entry - db error 12 (Cannot allocate memory)
[11/Nov/2013:07:02:36 -0500] - libdb: BDB2055 Lock table is out of available lock entries
[11/Nov/2013:07:02:36 -0500] - modrdn_rename_entry_update_indexes: id2entry_add failed, err=12 Cannot allocate memory
[11/Nov/2013:07:04:02 -0500] - ldbm: Bringing stress_03_02_DBusr offline...
[11/Nov/2013:07:04:02 -0500] - ldbm: removing 'stress_03_02_DBusr'.
[11/Nov/2013:07:04:02 -0500] - Destructor for instance stress_03_02_DBusr called
Comment 9 Noriko Hosoi 2013-11-11 12:54:21 EST
The default lock table size is 10000.

Could you try re-running the test with this config param?
dn: cn=config,cn=ldbm database,cn=plugins,cn=config
nsslapd-db-locks: 20000
Comment 10 Sankar Ramalingam 2013-11-11 13:08:01 EST
(In reply to Noriko Hosoi from comment #9)
> The default lock table size is 10000.
> 
> Could you try re-running the test with this config param?
> dn: cn=config,cn=ldbm database,cn=plugins,cn=config
> nsslapd-db-locks: 20000

I will go ahead and mark the bug as Verified since that original crash issue is fixed. If needed, I will open a new bugzilla.
Comment 11 Sankar Ramalingam 2013-11-18 01:17:59 EST
Testcase is automated in subtree rename stress test suite.
Comment 12 Ludek Smid 2014-06-13 06:39:45 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

Note You need to log in before you can comment on or make changes to this bug.