[
https://issues.apache.org/jira/browse/DERBY-6337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13976364#comment-13976364
]
Mamta A. Satoor commented on DERBY-6337:
----------------------------------------
I was able to reproduce the problem on my machine. Took lots of iterations
before it failed. It actually failed two times so far intermittently. I had put
some debug code and need to put some more before I fire the tests again. With
my current debug code, I have found that the problem area of the test where it
fails is after we shutdown the server using Java executable, the test pings it
to see if the server is down as expected. The test uses pingForServerUp()
method in helper class junit.NetworkServerTestSetup to see if the server is
down. pingForServerUp() method keeps pinging the server for upto 60 seconds to
see if the server is down. In that 60 seconds time period, ping to server may
indicate the server is still up since ping won't throw any exception. But as
soon as ping to server gets an exception "DRDA_NoIO.S:Could not connect to
Derby Network Server on host ... : Connection refused: ", the method will
return saying the server is down. But if the ping gets any other exception,
method will print that exception's stack trace on the console and it will
return saying the server is down. In the intermittent case, ping rather than
getting exception "DRDA_NoIO.S:Could not connect to Derby Network Server on
host ... : Connection refused: ", it gets "java.lang.Exception:
DRDA_InvalidReplyTooShort.S:Invalid reply from network server: Insufficient
data.". So, in either exception case, I guess the test is assuming that the
server is down, its just that it expected to get "DRDA_NoIO.S:Could not connect
to Derby Network Server on host ... : Connection refused: " rather than
"java.lang.Exception: DRDA_InvalidReplyTooShort.S:Invalid reply from network
server: Insufficient data.". I will put more debugging info on the server side
when the server is shutting down to see if it can show any light on why client
might be getting insufficient data exception rather than connection refused
exception.
> derbynet.ServerPropertiesTest.ttestSetPortPriority prints exception
> java.lang.Exception: DRDA_InvalidReplyTooShort.S:Invalid reply f rom network
> server: Insufficient data. but test passes
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-6337
> URL: https://issues.apache.org/jira/browse/DERBY-6337
> Project: Derby
> Issue Type: Bug
> Environment: Windows 7, IBM java 7
> java version "1.7.0"
> Java(TM) SE Runtime Environment (build pwi3270sr5-20130619_01(SR5))
> IBM J9 VM (build 2.6, JRE 1.7.0 Windows 7 x86-32 20130617_152572 (JIT
> enabled, AOT enabled)
> J9VM - R26_Java726_SR5_20130617_1436_B152572
> JIT - r11.b04_20130528_38954ifx1
> GC - R26_Java726_SR5_20130617_1436_B152572
> J9CL - 20130617_152572)
> JCL - 20130616_01 based on Oracle 7u25-b12
> With IBM_JAVA_OPTIONS=-Xgcpolicy:optthruput -Xjit:count=0 -Xnocompressedrefs
> Reporter: Kathey Marsden
> Attachments: DERBY6337_patch1_diff.txt
>
>
> On Windows on IBM JVM with
> IBM_JAVA_OPTIONS=-Xgcpolicy:optthruput -Xjit:count=0 -Xnocompressedrefs
> derbynet.ServerPropertiesTest prints the exception:
> (net)derbynet.ServerPropertiesTest.ttestSetPortPriority java.lang.Exception:
> DRDA_InvalidReplyTooShort.S:Invalid reply f
> rom network server: Insufficient data.
> at
> org.apache.derby.impl.drda.NetworkServerControlImpl.consolePropertyMessageWork(Unknown
> Source)
> at
> org.apache.derby.impl.drda.NetworkServerControlImpl.consolePropertyMessage(Unknown
> Source)
> at
> org.apache.derby.impl.drda.NetworkServerControlImpl.fillReplyBuffer(Unknown
> Source)
> at
> org.apache.derby.impl.drda.NetworkServerControlImpl.readResult(Unknown Source)
> at
> org.apache.derby.impl.drda.NetworkServerControlImpl.pingWithNoOpen(Unknown
> Source)
> at org.apache.derby.impl.drda.NetworkServerControlImpl.ping(Unknown
> Source)
> at org.apache.derby.drda.NetworkServerControl.ping(Unknown Source)
> at
> org.apache.derbyTesting.junit.NetworkServerTestSetup.pingForServerUp(NetworkServerTestSetup.java:613)
> at
> org.apache.derbyTesting.functionTests.tests.derbynet.ServerPropertiesTest.canPingServer(ServerPropertiesTest.
> java:280)
> at
> org.apache.derbyTesting.functionTests.tests.derbynet.ServerPropertiesTest.ttestSetPortPriority(ServerProperti
> esTest.java:476)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:607)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:117)
> at
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:442)
> at
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:459)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at junit.textui.TestRunner.doRun(TestRunner.java:121)
> at junit.textui.TestRunner.start(TestRunner.java:185)
> at junit.textui.TestRunner.main(TestRunner.java:143)
> java.lang.Exception: DRDA_InvalidReplyTooShort.S:Invalid reply from network
> server: Insufficient data.
> at
> org.apache.derby.impl.drda.NetworkServerControlImpl.consolePropertyMessageWork(Unknown
> Source)
> at
> org.apache.derby.impl.drda.NetworkServerControlImpl.consolePropertyMessage(Unknown
> Source)
> at
> org.apache.derby.impl.drda.NetworkServerControlImpl.fillReplyBuffer(Unknown
> Source)
> at
> org.apache.derby.impl.drda.NetworkServerControlImpl.readResult(Unknown Source)
> at
> org.apache.derby.impl.drda.NetworkServerControlImpl.pingWithNoOpen(Unknown
> Source)
> at org.apache.derby.impl.drda.NetworkServerControlImpl.ping(Unknown
> Source)
> at org.apache.derby.drda.NetworkServerControl.ping(Unknown Source)
> at
> org.apache.derbyTesting.junit.NetworkServerTestSetup.pingForServerUp(NetworkServerTestSetup.java:613)
> at
> org.apache.derbyTesting.functionTests.tests.derbynet.ServerPropertiesTest.canPingServer(ServerPropertiesTest.
> java:280)
> at
> org.apache.derbyTesting.functionTests.tests.derbynet.ServerPropertiesTest.shutdownServer(ServerPropertiesTest
> .java:309)
> at
> org.apache.derbyTesting.functionTests.tests.derbynet.ServerPropertiesTest.ttestSetPortPriority(ServerProperti
> esTest.java:483)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:607)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:117)
> at
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:442)
> at
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:459)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at junit.textui.TestRunner.doRun(TestRunner.java:121)
> at junit.textui.TestRunner.start(TestRunner.java:185)
> at junit.textui.TestRunner.main(TestRunner.java:143)
> used 53367 ms .
> (net)derbynet.ServerPropertiesTest.ttestDefaultProperties used 387 ms .
> (net)derbynet.ServerPropertiesTest.testToggleTrace used 34428 ms .
> (net)derbynet.ServerPropertiesTest.testToggleLogConnections used 34064 ms
> Time: 157.034
> OK (4 tests)
> but the test passes.
--
This message was sent by Atlassian JIRA
(v6.2#6252)