Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-139

Deadlock in LocalFileSystem lock/release

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.2.0
    • Component/s: fs
    • Labels:
      None

      Description

      LocalFileSystem lock/release methods marked synchronized and inside they lock file channel - this produces deadlock situation. Let's see how it happens:
      1. First thread locks the file and starts some long-running process.
      2. Second thread tries to lock the file and it blocks inside channel lock method. It keeps LocalFileSystem instance "locked" as well.
      3. First thread finished it's processing and tries to release lock - it blocks because LocalFileSystem instance is "locked" by second thread - both threads are waiting to each other.

        Attachments

        1. deadlock.patch
          3 kB
          Igor Bolotin

          Activity

            People

            • Assignee:
              cutting Doug Cutting
              Reporter:
              ibolotin Igor Bolotin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: