You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Rakesh R (JIRA)" <ji...@apache.org> on 2014/03/25 10:02:44 UTC

[jira] [Commented] (ZOOKEEPER-1904) WatcherTest#testWatchAutoResetWithPending is failing

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

Rakesh R commented on ZOOKEEPER-1904:
-------------------------------------

I've seen the failure reason is due to the thread scheduling. TestableZooKeeper#pauseCnxn is scheduling a thread to pause the cnxn and not exactly waiting for its execution. On the otherside main thread is proceeding with next steps and is resulting in test case failure.
Please see the below stack trace :
{code}
    [junit] 2014-03-19 09:27:55,008 [myid:] - INFO  [main:ClientBase@490] - STOPPING server
    [junit] 2014-03-19 09:27:55,008 [myid:] - INFO  [main:NettyServerCnxnFactory@340] - shutdown called 0.0.0.0/0.0.0.0:11278
    [junit] 2014-03-19 09:27:55,008 [myid:] - INFO  [main:NettyServerCnxnFactory@340] - shutdown called 0.0.0.0/0.0.0.0:11278
    [junit] 2014-03-19 09:27:55,009 [myid:] - INFO  [main-SendThread(127.0.0.1:11278):ClientCnxn$SendThread@1098] - Unable to read additional data from server sessionid 0x144d9ab1f9e0000, likely server has closed socket, closing socket connection and attempting reconnect
    [junit] 2014-03-19 09:27:55,009 [myid:] - INFO  [main-EventThread:ClientCnxn$EventThread@512] - EventThread shut down
    [junit] 2014-03-19 09:27:55,010 [myid:] - INFO  [main:ZooKeeperServer@441] - shutting down
    [junit] 2014-03-19 09:27:55,010 [myid:] - INFO  [main:SessionTrackerImpl@225] - Shutting down
    [junit] 2014-03-19 09:27:55,010 [myid:] - INFO  [main:PrepRequestProcessor@761] - Shutting down
    [junit] 2014-03-19 09:27:55,011 [myid:] - INFO  [main:SyncRequestProcessor@209] - Shutting down
    [junit] Exception in thread "Thread-57" java.lang.NullPointerException
    [junit] 	at org.apache.zookeeper.ClientCnxnSocketNIO.testableCloseSocket(ClientCnxnSocketNIO.java:384)
    [junit] 	at org.apache.zookeeper.ClientCnxn$SendThread.testableCloseSocket(ClientCnxn.java:1253)
    [junit] 	at org.apache.zookeeper.TestableZooKeeper$1.run(TestableZooKeeper.java:74){code}

> WatcherTest#testWatchAutoResetWithPending is failing
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-1904
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1904
>             Project: ZooKeeper
>          Issue Type: Sub-task
>          Components: tests
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.4.7
>
>
> Following is the stacktrace taken from [Build : ZooKeeper-3.4-WinVS2008_java/465|https://builds.apache.org/job/ZooKeeper-3.4-WinVS2008_java/465/]
> {code}
>     [junit] 2014-03-19 09:28:50,020 [myid:] - INFO  [main-SendThread(127.0.0.1:11278):ClientCnxn$SendThread@975] - Opening socket connection to server 127.0.0.1/127.0.0.1:11278. Will not attempt to authenticate using SASL (unknown error)
>     [junit] 2014-03-19 09:28:51,025 [myid:] - WARN  [main-SendThread(127.0.0.1:11278):ClientCnxn$SendThread@1102] - Session 0x144d9ab1f9e0000 for server null, unexpected error, closing socket connection and attempting reconnect
>     [junit] java.net.ConnectException: Connection refused: no further information
>     [junit] 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
>     [junit] 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:701)
>     [junit] 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
>     [junit] 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
>     [junit] 2014-03-19 09:28:52,661 [myid:] - INFO  [main-SendThread(127.0.0.1:11278):ClientCnxn$SendThread@975] - Opening socket connection to server 127.0.0.1/127.0.0.1:11278. Will not attempt to authenticate using SASL (unknown error)
>     [junit] 2014-03-19 09:28:53,640 [myid:] - WARN  [main-SendThread(127.0.0.1:11278):ClientCnxn$SendThread@1102] - Session 0x144d9ab1f9e0000 for server null, unexpected error, closing socket connection and attempting reconnect
>     [junit] java.net.ConnectException: Connection refused: no further information
>     [junit] 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
>     [junit] 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:701)
>     [junit] 	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
>     [junit] 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
>     [junit] 2014-03-19 09:28:55,435 [myid:] - INFO  [main-SendThread(127.0.0.1:11278):ClientCnxn$SendThread@975] - Opening socket connection to server 127.0.0.1/127.0.0.1:11278. Will not attempt to authenticate using SASL (unknown error)
>     [junit] 2014-03-19 09:28:56,111 [myid:] - INFO  [main:JUnit4ZKTestRunner$LoggedInvokeMethod@62] - TEST METHOD FAILED testWatchAutoResetWithPending
>     [junit] java.util.concurrent.TimeoutException: Did not disconnect
>     [junit] 	at org.apache.zookeeper.test.ClientBase$CountdownWatcher.waitForDisconnected(ClientBase.java:145)
>     [junit] 	at org.apache.zookeeper.test.WatcherTest.testWatchAutoResetWithPending(WatcherTest.java:202)
>     [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)