Bug 157295

Summary: Connecting to an existing lockspace breaks reference count
Product: [Retired] Red Hat Cluster Suite Reporter: Christine Caulfield <ccaulfie>
Component: dlmAssignee: David Teigland <teigland>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: cluster-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2005-735 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-07 16:54:34 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:

Description Christine Caulfield 2005-05-10 10:25:05 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050504 Fedora/1.0.3-4 Firefox/1.0.3

Description of problem:
If an application opens an already existing lockspace, the DLM ref count is still incremented. This means that when all lockspaces are removed the DLM does not tidy up. Any attempt to rmmod the dlm module results in a kernel panic.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. start clvmd
2. killall -9 clvmd (this leaves the lockspace in place)
3. clvmd
4. killall clvmd (this closes the lockspace)
5. rmmod dlm

  

Actual Results:  "grep dlm /proc/slabinfo" shows the DLM slabs still in place, "ps -ef|grep dlm" shows the DLM processes still running.
modprobe dlm will panic the kernel as it tries to recreate the slab.

Expected Results:  Something much less spectacular!
Deleting the last lockspace should cause the DLM to tidy up.

Additional info:

This patch fixes:

--- lockspace.c 26 Mar 2005 04:43:51 -0000      1.19.2.6
+++ lockspace.c 10 May 2005 09:55:50 -0000
@@ -415,12 +415,18 @@ int dlm_new_lockspace(char *name, int na

        down(&dlmstate_lock);
        error = init_internal();
-       if (error)
+       if (error) {
+               up(&dlmstate_lock);
                goto out;
+       }
        
        error = new_lockspace(name, namelen, lockspace, flags);
- out:  
        up(&dlmstate_lock);
+
+       if (error)
+               dlm_release();
+ out:
+       
        return error;
 }

Comment 1 Christine Caulfield 2005-05-10 13:21:36 UTC
*** Bug 143449 has been marked as a duplicate of this bug. ***

Comment 2 Christine Caulfield 2005-06-28 13:11:38 UTC
Fixed on RHEL4 branch so should turn up in U2

Comment 4 Red Hat Bugzilla 2005-10-07 16:54:34 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-735.html