[ 
https://issues.apache.org/jira/browse/HBASE-21292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16656182#comment-16656182
 ] 

Hudson commented on HBASE-21292:
--------------------------------

Results for branch branch-2.0
        [build #971 on 
builds.a.o|https://builds.apache.org/job/HBase%20Nightly/job/branch-2.0/971/]: 
(x) *{color:red}-1 overall{color}*
----
details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general 
report|https://builds.apache.org/job/HBase%20Nightly/job/branch-2.0/971//General_Nightly_Build_Report/]




(x) {color:red}-1 jdk8 hadoop2 checks{color}
-- For more information [see jdk8 (hadoop2) 
report|https://builds.apache.org/job/HBase%20Nightly/job/branch-2.0/971//JDK8_Nightly_Build_Report_(Hadoop2)/]


(x) {color:red}-1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3) 
report|https://builds.apache.org/job/HBase%20Nightly/job/branch-2.0/971//JDK8_Nightly_Build_Report_(Hadoop3)/]


(/) {color:green}+1 source release artifact{color}
-- See build output for details.


> IdLock.getLockEntry() may hang if interrupted
> ---------------------------------------------
>
>                 Key: HBASE-21292
>                 URL: https://issues.apache.org/jira/browse/HBASE-21292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Allan Yang
>            Assignee: Allan Yang
>            Priority: Major
>             Fix For: 3.0.0, 2.2.0, 2.1.1, 2.0.3
>
>         Attachments: HBASE-21292.branch-2.0.001.patch, 
> HBASE-21292.branch-2.0.002.patch
>
>
> This is a rare case found by my colleague which really happened on our 
> production env. 
> Thread may hang(or enter a infinite loop ) when try to call 
> IdLock.getLockEntry(). Here is the case:
> 1. Thread1 owned the IdLock, while Thread2(the only one waiting) was waiting 
> for it.
> 2. Thread1 called releaseLockEntry, it will set IdLock.locked = false, but 
> since Thread2 was waiting, it won't call map.remove(entry.id)
> 3. While Thread1 was calling releaseLockEntry, Thread2 was interrupted. So no 
> one will remove this IdLock from the map.
> 4. If another thread try to call getLockEntry on this IdLock, it will end up 
> in a infinite loop. Since existing = map.putIfAbsent(entry.id, entry)) != 
> null and existing.locked=false
> It is hard to write a UT since it is a very rare race condition.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to