Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-4152

layout locks can cause deadlock

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: Lustre 2.5.0, Lustre 2.6.0
    • Fix Version/s: Lustre 2.6.0, Lustre 2.5.1
    • Labels:
    • Environment:
      le
    • Severity:
      3
    • Rank (Obsolete):
      11269

      Description

      LU-1876 adds mdt_object_open_lock() which acquires lock in 2 steps for layout locks.
      A deadlock is possible since it isn't atomic and ibits locks are reprocessed until first blocking lock found.

      Such situation was hit with mdt_reint_open() & mdt_intent_getattr()

      mdt_reint_open()->mdt_open_by_fid_lock() takes first part of the lock (ibits=5),
      mdt_intent_getattr() tries to obtain lock (ibits=17)
      mdt_open_by_fid_lock() tries to obtain second part but fails due to some conflict with another layout lock2. During cancellation of lock2 only getattr lock is reprocessed.
      http://review.whamcloud.com/#/c/7148/1 can help, but it is better to fix mdt_open_by_fid_lock()

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                green Oleg Drokin
                Reporter:
                askulysh Andriy Skulysh
              • Votes:
                0 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: