Bug 148861 - converting locks can deadlock
Summary: converting locks can deadlock
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Cluster Suite
Classification: Retired
Component: dlm
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Teigland
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-02-16 13:32 UTC by David Teigland
Modified: 2009-04-16 20:30 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-02-22 06:55:43 UTC
Embargoed:


Attachments (Terms of Use)

Description David Teigland 2005-02-16 13:32:12 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041111 Firefox/1.0

Description of problem:
We handle "normal" conversion deadlocks fine, e.g. two locks
on the conversion queue doing PR->EX.

There's another kind of conversion deadlock we don't resolve,
though, that arises from the granting rules (that we copy from
VMS) that state that locks on the conversion queue are granted
in order.  e.g.

granted queue: empty
convert queue: NL->EX (first lock)
               PR->EX (second lock)

The first lock can't be granted because of the granted mode of
the second lock and the second lock can't be granted because it's
not at the head of the queue.

We'll resolve this the same way we resolve other conversion
deadlocks, by demoting the granted mode of the second lock to NL.
(Prior to making can_be_granted() conform to VMS rules, we had
a function that handled this case, but slightly differently.)


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


How reproducible:
Didn't try

Steps to Reproduce:
1. run make_panic
2.
3.
    

Additional info:

Comment 1 David Teigland 2005-02-22 06:55:43 UTC
Changes by:     teigland 2005-02-22 06:51:43

Modified files:
        dlm-kernel/src : locking.c

Log message:
        Recognize and resolve a second form of conversion deadlock.
        When it happens, you'll see the following in dlm_locks output:
        grant queue: empty
        convert queue: NL->EX, PR->EX

        Fixes bz 148861



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