hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-13146) Race Condition in ScheduledChore and ChoreService
Date Tue, 03 Mar 2015 16:47:05 GMT

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

Hadoop QA commented on HBASE-13146:
-----------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12702174/HBASE-13146.patch
  against master branch at commit 5dfcee0871f13b2657e815aca08416b4bd9d7881.
  ATTACHMENT ID: 12702174

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include any new or modified
tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.
    {color:green}+1 hadoop versions{color}. The patch compiles with all supported hadoop versions
(2.4.1 2.5.2 2.6.0)

    {color:green}+1 javac{color}.  The applied patch does not increase the total number of
javac compiler warnings.

    {color:green}+1 javac{color}.  The applied patch does not increase the total number of
javac compiler warnings.

    {color:green}+1 javadoc{color}.  The javadoc tool did not generate any warning messages.

    {color:green}+1 checkstyle{color}.  The applied patch does not increase the total number
of checkstyle errors

    {color:green}+1 findbugs{color}.  The patch does not introduce any new Findbugs (version
2.0.3) warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase the total number
of release audit warnings.

    {color:green}+1 lineLengths{color}.  The patch does not introduce lines longer than 100

  {color:green}+1 site{color}.  The mvn site goal succeeds with this patch.

     {color:red}-1 core tests{color}.  The patch failed these unit tests:
     

     {color:red}-1 core zombie tests{color}.  There are 1 zombie test(s): 	at org.apache.hadoop.hbase.namespace.TestNamespaceAuditor.testRegionMerge(TestNamespaceAuditor.java:308)

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/13064//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13064//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13064//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13064//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13064//artifact/patchprocess/newPatchFindbugsWarningshbase-annotations.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13064//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13064//artifact/patchprocess/newPatchFindbugsWarningshbase-rest.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13064//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13064//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13064//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13064//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13064//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Checkstyle Errors: https://builds.apache.org/job/PreCommit-HBASE-Build/13064//artifact/patchprocess/checkstyle-aggregate.html

  Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/13064//console

This message is automatically generated.

> Race Condition in ScheduledChore and ChoreService
> -------------------------------------------------
>
>                 Key: HBASE-13146
>                 URL: https://issues.apache.org/jira/browse/HBASE-13146
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 2.0.0, 1.1.0
>            Reporter: zhangduo
>            Assignee: zhangduo
>             Fix For: 2.0.0, 1.1.0
>
>         Attachments: HBASE-13146.patch
>
>
> Here is my findings when addressing HBASE-13145.
> {code:title=ChoreService.java}
>   public synchronized boolean scheduleChore(ScheduledChore chore) {
>       ...
>       ScheduledFuture<?> future =
>           scheduler.scheduleAtFixedRate(chore, chore.getInitialDelay(), chore.getPeriod(),
>             chore.getTimeUnit());
>       chore.setChoreServicer(this);
>       ...
>   }
> {code}
> So we schedule the chore first, and then set chore servicer. And for CompactionChecker,
the initialDelay is 0, so it is possible that the chore is run before we set chore servicer
for it. And see this
> {code:title=ScheduledChore.java}
>   public void run() {
>     ...
>     else if (stopper.isStopped() || !isScheduled()) {
>       cancel(false);
>       cleanup();
>       if (LOG.isInfoEnabled()) LOG.info("Chore: " + getName() + " was stopped");
>     }
>     ...
>   }
>     ...
>   public synchronized boolean isScheduled() {
>     return choreServicer != null && choreServicer.isChoreScheduled(this);
>   }
> {code}
> So it is possible that isScheduled() returns false and we start to cancel the chore.
You can insert a sleep between scheduled chore and set chore servicer, then you can always
get the log ' Chore: CompactionChecker was stopped'. But it does not always actually cancel
the chore because the cancel method's implementation.
> {code:title=ScheduledChore.java}
>   public synchronized void cancel(boolean mayInterruptIfRunning) {
>     if (isScheduled()) choreServicer.cancelChore(this, mayInterruptIfRunning);
>     choreServicer = null;
>   }
> {code}
> So if you insert a sleep before cancel(remember to set a larger sleep time here), then
you can make the test always fail.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message