hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enis Soztutar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-14977) ChoreService.shutdown may result in ConcurrentModificationException
Date Wed, 16 Dec 2015 19:58:46 GMT

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

Enis Soztutar commented on HBASE-14977:

bq. That is because of a deadlock. ScheduledChore is heavily synchronized, even getName()
is synchronized and toString(). I attached small addendum which fixes this issue.
Yeah, I was afraid of a possible deadlock in introducing an extra condition. But it seemed
(from my brief look at the code) that we do not hold any locks in the thread calling shutdown().

ScheduledChore.getName() is synchronized? That does not make sense. 
Is the deadlock between ScheduledChore.cancel() calling choreService.cancel() while holding
chore lock, and ChoreService.shutdown() calling toString() while holding lock for the service.

I think a better addendum would be to declared name, period, etc final, and un-synchronize
the getName() and getPeriod() methods. 

> ChoreService.shutdown may result in ConcurrentModificationException
> -------------------------------------------------------------------
>                 Key: HBASE-14977
>                 URL: https://issues.apache.org/jira/browse/HBASE-14977
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Vladimir Rodionov
>            Assignee: Vladimir Rodionov
>            Priority: Minor
>             Fix For: 2.0.0, 1.2.0, 1.3.0, 1.1.4
>         Attachments: HBASE-14977-add.patch, HBASE-14977-v1.patch
> As seen in this test:
> https://builds.apache.org/job/HBase-1.3/jdk=latest1.8,label=Hadoop/425/artifact/hbase-server/target/surefire-reports/org.apache.hadoop.hbase.regionserver.compactions.TestFIFOCompactionPolicy-output.txt
> We need to make  shutdown method synchronized to avoid this issue. 

This message was sent by Atlassian JIRA

View raw message