Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 3.4, 3.5
    • Fix Version/s: None
    • Component/s: core/store
    • Environment:

      Mac OS X 10.7, JDK 1.6
      CentOS 5, JDK 1.7u1

    • Lucene Fields:
      New, Patch Available

      Description

      When the NativeFSLock releases, it deletes the lock file after lock release.
      In a concurrent situation, it is possible for another thread or process to acquire the lock before the delete happens. Any other third thread or process will then be able to recreate the lock file and acquire the lock while a lock is already held on the deleted file.

      1. BreakIt.java
        3 kB
        Yaokai Jiang
      2. LUCENE-3673.patch
        0.6 kB
        Yaokai Jiang

        Activity

        Yaokai Jiang created issue -
        Hide
        Yaokai Jiang added a comment -

        This example demonstrate how the locking mechanism in NativeFSLock has a race condition.

        Show
        Yaokai Jiang added a comment - This example demonstrate how the locking mechanism in NativeFSLock has a race condition.
        Yaokai Jiang made changes -
        Field Original Value New Value
        Attachment BreakIt.java [ 12509364 ]
        Hide
        Yaokai Jiang added a comment -

        Suggested patch

        Show
        Yaokai Jiang added a comment - Suggested patch
        Yaokai Jiang made changes -
        Attachment LUCENE-3673.patch [ 12509365 ]
        Yaokai Jiang made changes -
        Lucene Fields New [ 10121 ] New,Patch Available [ 10121,10120 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Yaokai Jiang
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development