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

Knut Anders Hatlen commented on DERBY-5194:
-------------------------------------------

On a closer look, DERBY-3869 only changed the behaviour of ping commands that 
set up a new connection to the server. shutdown() uses a lightweight variant of 
ping that reuses an existing connection, and therefore doesn't go through the 
code path changed in DERBY-3869. But I think the root cause of the failure is 
as suggested, that shutdown() returns before the socket has been closed and 
associated resources released, and starting the next network server instance 
fails.

> AutoloadTest timed out waiting for network server to start
> ----------------------------------------------------------
>
>                 Key: DERBY-5194
>                 URL: https://issues.apache.org/jira/browse/DERBY-5194
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.8.1.1
>            Reporter: Knut Anders Hatlen
>         Attachments: sleep-repro.diff
>
>
> Seen when testing the 10.8.1.1 release candidate on Windows Vista:
> http://dbtg.foundry.sun.com/derby/test/10.8.1.1_RC/logs/jvm1.6/vista/JDBCDriversEmbedded/report.txt
> 1) AutoloadTest: clientjunit.framework.AssertionFailedError: Timed out 
> waiting for network server to start
>       at 
> org.apache.derbyTesting.junit.NetworkServerTestSetup.setUp(NetworkServerTestSetup.java:205)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
>       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.extensions.TestSetup.run(TestSetup.java:25)
> The following exception was printed to the console while the test was running:
> 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:567)
>       at 
> org.apache.derbyTesting.junit.NetworkServerTestSetup.pingForServerStart(NetworkServerTestSetup.java:636)
>       at 
> org.apache.derbyTesting.junit.NetworkServerTestSetup.setUp(NetworkServerTestSetup.java:196)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
>       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.framework.TestSuite.runTest(TestSuite.java:230)
>       at junit.framework.TestSuite.run(TestSuite.java:225)
>       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)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to