You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Jiafu Jiang (JIRA)" <ji...@apache.org> on 2019/02/01 01:56:00 UTC

[jira] [Updated] (ZOOKEEPER-3266) ZooKeeper Java client blocks for a very long time.

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-3266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jiafu Jiang updated ZOOKEEPER-3266:
-----------------------------------
    Description: 
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 the SendThread cause the blocking of exist method?? I'm not sure.

  was:
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.


> 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
>            Priority: Major
>
> 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 the SendThread cause the blocking of exist method?? I'm not sure.



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