You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Yaokai Jiang (Updated) (JIRA)" <ji...@apache.org> on 2012/01/04 02:00:47 UTC
[jira] [Updated] (LUCENE-3673) NativeFSLockFactory Race Condition
[ https://issues.apache.org/jira/browse/LUCENE-3673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yaokai Jiang updated LUCENE-3673:
---------------------------------
Attachment: BreakIt.java
This example demonstrate how the locking mechanism in NativeFSLock has a race condition.
> NativeFSLockFactory Race Condition
> ----------------------------------
>
> Key: LUCENE-3673
> URL: https://issues.apache.org/jira/browse/LUCENE-3673
> Project: Lucene - Java
> Issue Type: Bug
> Components: core/store
> Affects Versions: 3.4, 3.5
> Environment: Mac OS X 10.7, JDK 1.6
> CentOS 5, JDK 1.7u1
> Reporter: Yaokai Jiang
> Priority: Critical
> Labels: concurrency, locking
> Attachments: BreakIt.java, LUCENE-3673.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org