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

ramkrishna.s.vasudevan commented on HBASE-4951:
-----------------------------------------------

The problem is stopped variable is checked in HMaster.run()
{code}
      // We are either the active master or we were asked to shutdown
      if (!this.stopped) {
        finishInitialization(startupStatus);
        loop();
      }
{code}
But in finishInitialization we wait for ROOT to assign and it is a timed wait 
in that.  So though the master is stopped we dont get the chance to check the 
status of the stopped variable in master.

The same happens with splitLogAfterStartup also.

Attaching the thread dumps
{code}
"master-linux76,60000,1323444760834" prio=10 tid=0x085cdc00 nid=0x593d in 
Object.wait() [0x6fa6f000..0x6fa6ff50]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x74112e28> (a 
org.apache.hadoop.hbase.zookeeper.RootRegionTracker)
        at 
org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.blockUntilAvailable(ZooKeeperNodeTracker.java:132)
        - locked <0x74112e28> (a 
org.apache.hadoop.hbase.zookeeper.RootRegionTracker)
        at 
org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.blockUntilAvailable(ZooKeeperNodeTracker.java:104)
        - locked <0x74112e28> (a 
org.apache.hadoop.hbase.zookeeper.RootRegionTracker)
        at 
org.apache.hadoop.hbase.catalog.CatalogTracker.waitForRoot(CatalogTracker.java:292)
        at 
org.apache.hadoop.hbase.master.HMaster.assignRootAndMeta(HMaster.java:573)
        at 
org.apache.hadoop.hbase.master.HMaster.finishInitialization(HMaster.java:506)
        at org.apache.hadoop.hbase.master.HMaster.run(HMaster.java:336)
        at java.lang.Thread.run(Thread.java:619)
{code}

{code}
"master-C3S31,20000,1323415196055" prio=10 tid=0x000000004036a000 nid=0x60dd 
waiting on condition [0x00007f708b6f5000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(Native Method)
        at 
org.apache.hadoop.hbase.master.MasterFileSystem.splitLogAfterStartup(MasterFileSystem.java:226)
        at 
org.apache.hadoop.hbase.master.HMaster.finishInitialization(HMaster.java:474)
        at org.apache.hadoop.hbase.master.HMaster.run(HMaster.java:314)
        at java.lang.Thread.run(Thread.java:662)
{code}
                
> master process can not be stopped when it is initializing
> ---------------------------------------------------------
>
>                 Key: HBASE-4951
>                 URL: https://issues.apache.org/jira/browse/HBASE-4951
>             Project: HBase
>          Issue Type: Bug
>          Components: master
>    Affects Versions: 0.90.3
>            Reporter: xufeng
>            Assignee: ramkrishna.s.vasudevan
>            Priority: Critical
>             Fix For: 0.92.0, 0.90.5
>
>
> It is easy to reproduce by following step:
> step1:start master process.(do not start regionserver process in the cluster).
> the master will wait the regionserver to check in:
> org.apache.hadoop.hbase.master.ServerManager: Waiting on regionserver(s) to 
> checkin
> step2:stop the master by sh command bin/hbase master stop
> result:the master process will never die because catalogTracker.waitForRoot() 
> method will block unitl the root region assigned.

--
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

        

Reply via email to