You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2017/02/15 04:41:42 UTC
[jira] [Resolved] (OAK-5649) Error in RefreshPolicy can lead to
IndexNode lock leak
[ https://issues.apache.org/jira/browse/OAK-5649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chetan Mehrotra resolved OAK-5649.
----------------------------------
Resolution: Fixed
> Error in RefreshPolicy can lead to IndexNode lock leak
> ------------------------------------------------------
>
> Key: OAK-5649
> URL: https://issues.apache.org/jira/browse/OAK-5649
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: lucene
> Affects Versions: 1.6.0
> Reporter: Chetan Mehrotra
> Assignee: Chetan Mehrotra
> Fix For: 1.7.0, 1.8, 1.6.1
>
> Attachments: OAK-5649-v1.patch
>
>
> {{IndexNode}} uses a ReadWriteLock which is "acquired" and "released".
> {code}
> boolean acquire() {
> lock.readLock().lock();
> if (closed) {
> lock.readLock().unlock();
> return false;
> } else {
> refreshPolicy.refreshOnReadIfRequired(refreshCallback);
> return true;
> }
> }
> {code}
> Its possible that any exception thrown in {{RefreshPolicy#refreshOnReadIfRequired}} can lead to lock being acquired but not released causing the lock to be lost and any further attempt to close such IndexNode instance would block indefinitely.
> As a fix the {{acquire}} call should account for any potential exception thrown in any call made from within that method call
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)