zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jiafu Jiang (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ZOOKEEPER-3266) ZooKeeper Java client blocks for a very long time.
Date Fri, 01 Feb 2019 01:55:00 GMT
Jiafu Jiang created ZOOKEEPER-3266:
--------------------------------------

             Summary: ZooKeeper Java client blocks for a very long time.
                 Key: ZOOKEEPER-3266
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3266
             Project: ZooKeeper
          Issue Type: Bug
          Components: java client
    Affects Versions: 3.4.13
            Reporter: Jiafu Jiang


I found that ZooKeeper java client blocked, and the related call stack was showing below:

"Election thread-20" #20 prio=5 os_prio=0 tid=0x00007f7deeadfd80 nid=0x5ec3 in Object.wait()
[0x00007f7ddd5d8000]
 java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 at java.lang.Object.wait(Object.java:502)
 at org.apache.zookeeper.ClientCnxn.submitRequest(ClientCnxn.java:1411)
 - locked <0x00000000e04b63b0> (a org.apache.zookeeper.ClientCnxn$Packet)
 at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1177)
 at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1210)
 at com.sugon.parastor.zookeeper.ZooKeeperClient.exists(ZooKeeperClient.java:643)
........

 

And I also found that the block process did not have the SendThread. It seems like a normal
process that have ZooKeeper java client should have a SendThread, like below:


"Thread-0-SendThread(ofs_zk1:2181)" #23 daemon prio=5 os_prio=0 tid=0x00007f8c540379c0 nid=0x739
runnable [0x00007f8c5ad71000]
 java.lang.Thread.State: RUNNABLE
 at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
 at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93)
 at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
 - locked <0x00000000e00287a8> (a sun.nio.ch.Util$3)
 - locked <0x00000000e0028798> (a java.util.Collections$UnmodifiableSet)
 - locked <0x00000000e0028750> (a sun.nio.ch.EPollSelectorImpl)
 at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
 at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:349)
 at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1145)

 

So, will the missing of SendThread cause the blocking of exist method?? I'm not sure.



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

Mime
View raw message