harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Yakushev (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-3377) [jdktools][jpda] JDWP test org.apache.harmony.jpda.tests.jdwp.MultiSession.ListenConnectorTest intermittently fails with connection timeout
Date Tue, 22 May 2007 15:54:16 GMT

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

Andrey Yakushev updated HARMONY-3377:
-------------------------------------

    Attachment: ClassObjectIDTest_cleanup.patch

For me the source of the problem is in presiding running test ClassObjectIDTest which sets
jpda.settings.transportAddress property and doesn't cleaning it. ListenConnectorTest uses
this property, but socket is still in TIME_WAIT mode and listening fails. 

ClassObjectIDTest_cleanup.patch provides cleanup of the property. ListenConnectorTest after
that patch goes without the fail in a batch running.

Probably such cleanup should be added to several other tests. Another possibility is adding
cleanup or setting the properties in the beginning of each test or waiting the socket availability.
.

> [jdktools][jpda] JDWP test org.apache.harmony.jpda.tests.jdwp.MultiSession.ListenConnectorTest
intermittently fails with connection timeout
> -------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3377
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3377
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>         Environment: Windows/ia32, Harmony-jdk-r517567
>            Reporter: Ivan Popov
>         Attachments: ClassObjectIDTest_cleanup.patch
>
>
> The following JDWP unit test
>   org.apache.harmony.jpda.tests.jdwp.MultiSession.ListenConnectorTest
> fails with connection timeout error on Windows platform only when it runs together with
other JDWP tests.
> Rerunning it as a separate test case always pass. This test also never fail on Linux
platform.
> Here is typical output of the test failure:
> =====================================>>>
> Run: org.apache.harmony.jpda.tests.jdwp.MultiSession.ListenConnectorTest.testListenConnector
> ----------------------------------------
> LISTEN connector kind
> [SYNC] Binding socket on port: 0
> [SYNC] Bound socket on port: 2814
> TEST NAME: testListenConnector
> Listening on: NSTDRLXW13.ccr.corp.intel.com:9898
> Launch: ...\working_jdktools\deploy\jdk/jre/bin/java -cp ...\working_jdktools\build\tests\classes;...\common_resources\depends\jars\junit_3.8.2\junit.jar;Y:\temp\software\apache-ant-1.6.5\lib\ant-launcher.jar;Y:\temp\software\apache-ant-1.6.5\lib\ant.jar;Y:\temp\software\apache-ant-1.6.5\lib\ant-junit.jar
-agentlib:jdwp=transport=dt_socket,address=NSTDRLXW13.ccr.corp.intel.com:9898,server=n  -Djpda.settings.verbose=true
-Djpda.settings.syncPort=2814 org.apache.harmony.jpda.tests.jdwp.MultiSession.ConnectorKindDebuggee
> Start redirectors
> Redirector started: STDERR
> Redirector started: STDOUT
> Accepting JDWP connection
> Redirector completed: STDOUT
> STDERR> ERROR: [PacketDispatcher.cpp:109] TransportException [510/202]: connection
failed (error code: 10061)
> Redirector completed: STDERR
> java.net.SocketTimeoutException: The operation timed out
> 	at org.apache.harmony.luni.net.PlainSocketImpl.accept(PlainSocketImpl.java:121)
> 	at java.net.ServerSocket.implAccept(ServerSocket.java)
> 	at java.net.ServerSocket.accept(ServerSocket.java:146)
> 	at org.apache.harmony.jpda.tests.framework.jdwp.SocketTransportWrapper.accept(SocketTransportWrapper.java:116)
> 	at org.apache.harmony.jpda.tests.jdwp.share.JDWPUnitDebuggeeWrapper.openConnection(JDWPUnitDebuggeeWrapper.java:222)
> 	at org.apache.harmony.jpda.tests.jdwp.share.JDWPUnitDebuggeeWrapper.start(JDWPUnitDebuggeeWrapper.java:110)
> 	at org.apache.harmony.jpda.tests.jdwp.share.JDWPTestCase.internalSetUp(JDWPTestCase.java:65)
> 	at org.apache.harmony.jpda.tests.jdwp.share.JDWPSyncTestCase.internalSetUp(JDWPSyncTestCase.java)
> 	at org.apache.harmony.jpda.tests.jdwp.share.JDWPRawTestCase.setUp(JDWPRawTestCase.java:91)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java)
> 	at junit.framework.TestResult.runProtected(TestResult.java)
> 	at junit.framework.TestResult.run(TestResult.java:104)
> 	at junit.framework.TestCase.run(TestCase.java)
> 	at junit.framework.TestSuite.runTest(TestSuite.java)
> 	at junit.framework.TestSuite.run(TestSuite.java:224)
> 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:294)
> 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:670)
> 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:545)
> org.apache.harmony.jpda.tests.framework.TestErrorException: org.apache.harmony.jpda.tests.framework.TestErrorException:
java.net.SocketTimeoutException: The operation timed out
> 	at org.apache.harmony.jpda.tests.jdwp.share.JDWPUnitDebuggeeWrapper.start(JDWPUnitDebuggeeWrapper.java:117)
> 	at org.apache.harmony.jpda.tests.jdwp.share.JDWPTestCase.internalSetUp(JDWPTestCase.java:65)
> 	at org.apache.harmony.jpda.tests.jdwp.share.JDWPSyncTestCase.internalSetUp(JDWPSyncTestCase.java)
> 	at org.apache.harmony.jpda.tests.jdwp.share.JDWPRawTestCase.setUp(JDWPRawTestCase.java:91)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java)
> 	at junit.framework.TestResult.runProtected(TestResult.java)
> 	at junit.framework.TestResult.run(TestResult.java:104)
> 	at junit.framework.TestCase.run(TestCase.java)
> 	at junit.framework.TestSuite.runTest(TestSuite.java)
> 	at junit.framework.TestSuite.run(TestSuite.java:224)
> 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:294)
> 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:670)
> 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:545)
> Caused by: org.apache.harmony.jpda.tests.framework.TestErrorException: java.net.SocketTimeoutException:
The operation timed out
> 	at org.apache.harmony.jpda.tests.jdwp.share.JDWPUnitDebuggeeWrapper.openConnection(JDWPUnitDebuggeeWrapper.java:232)
> 	at org.apache.harmony.jpda.tests.jdwp.share.JDWPUnitDebuggeeWrapper.start(JDWPUnitDebuggeeWrapper.java:110)
> 	at org.apache.harmony.jpda.tests.jdwp.share.JDWPTestCase.internalSetUp(JDWPTestCase.java:65)
> 	... 12 more
> Caused by: java.net.SocketTimeoutException: The operation timed out
> 	at org.apache.harmony.luni.net.PlainSocketImpl.accept(PlainSocketImpl.java:121)
> 	at java.net.ServerSocket.implAccept(ServerSocket.java)
> 	at java.net.ServerSocket.accept(ServerSocket.java:146)
> 	at org.apache.harmony.jpda.tests.framework.jdwp.SocketTransportWrapper.accept(SocketTransportWrapper.java:116)
> 	at org.apache.harmony.jpda.tests.jdwp.share.JDWPUnitDebuggeeWrapper.openConnection(JDWPUnitDebuggeeWrapper.java:222)
> 	at org.apache.harmony.jpda.tests.jdwp.share.JDWPUnitDebuggeeWrapper.start(JDWPUnitDebuggeeWrapper.java:110)
> 	... 13 more
> ----------------------------------------
> [SYNC] Closed socket
> Completed sync connection
> Ignoring exception in disposing debuggee VM: java.lang.NullPointerException
> Waiting for debuggee exit
> Finished debuggee with exit code: 1
> Waiting for redirectors
> Finished debuggee VM process and closed connection
> To reproduce this failure:
> 1. create Harmony JDK with federated build:
>     svn checkout https://svn.apache.org/repos/asf/harmony/enhanced/trunk
>     cd trunk
>     ant
> 2. goto jdktools directory, add junit to classpath, and start all JPDA tests:
>     cd working_jdktools
>     export CLASSPATH=<...>/trunk/common_resources/depends/jars/junit_3.8.2/junit.jar
>     ant test -Dbuild.module=jpda
> 3. see results in <...>/trunk/working_jdktools/build/test_report/html/index.html
> Rerunning it as a separate test case leads produces correct output:
> =====================================>>>
> Run: org.apache.harmony.jpda.tests.jdwp.MultiSession.ListenConnectorTest.testListenConnector
> ----------------------------------------
> LISTEN connector kind
> [SYNC] Binding socket on port: 0
> [SYNC] Bound socket on port: 2202
> TEST NAME: testListenConnector
> Listening on: NSTDRLXW13:2203
> Launch: ...\working_jdktools\deploy\jdk\jre/bin/java -cp ...\working_jdktools\build\tests\classes;...\working_jdktools\deploy\jdk\lib\tools.jar;...\common_resources\depends\jars\junit_3.8.2\junit.jar;Y:\temp\software\apache-ant-1.6.5\lib\ant-launcher.jar;Y:\temp\software\apache-ant-1.6.5\lib\ant.jar;Y:\temp\software\apache-ant-1.6.5\lib\ant-junit.jar
-agentlib:jdwp=transport=dt_socket,address=NSTDRLXW13:2203,server=n  -Djpda.settings.verbose=true
-Djpda.settings.syncPort=2202 org.apache.harmony.jpda.tests.jdwp.MultiSession.ConnectorKindDebuggee
> Start redirectors
> Redirector started: STDERR
> Accepting JDWP connection
> Redirector started: STDOUT
> Established connection
> Launched debuggee VM process and established connection
> Received VM_START event
> Adjusted VM-dependent type lengths
> Resumed debuggee VM
> [SYNC] Accepting socket connection
> STDOUT> [SYNC] Attaching socket to: localhost:2202
> [SYNC] Accepted socket connection
> Established sync connection
> ----------------------------------------
> STDOUT> [SYNC] Attached socket
> [SYNC] Waiting for message: ready
> [SYNC] Received message: ready
> STDOUT> [SYNC] Message sent: ready
> description	= JVM version 1.5.0 (DRLVM, no info, 11.2.0)
> jdwpMajor	= 1
> jdwpMinor	= 5
> STDOUT> Hello World ---- 0
> vmVersion	= 1.5.0
> vmName		= DRLVM
> CHECK PASSED
> STDOUT> [SYNC] Waiting...
> System property: null
> [SYNC] Message sent: stop
> [SYNC] Waiting for message: END
> STDOUT> [SYNC] received message: stop
> [SYNC] Received message: END
> ==> testListenConnector001 PASSED!
> ----------------------------------------
> [SYNC] Closed socket
> STDOUT> [SYNC] Message sent: END
> Completed sync connection
> Waiting for debuggee exit
> STDOUT> Debuggee ended
> STDOUT> [SYNC] Closed socket
> Redirector completed: STDOUT
> Redirector completed: STDERR
> Finished debuggee with exit code: 0
> Waiting for redirectors
> Finished debuggee VM process and closed connection
> <<<=====================================
> To reproduce this:
> 2. Run separate test case:
>     cd working_jdktools
>     export CLASSPATH=<...>/trunk/common_resources/depends/jars/junit_3.8.2/junit.jar
>     ant test -Dbuild.module=jpda -Dtest.case=org.apache.harmony.jpda.tests.jdwp.MultiSession.ListenConnectorTest
> 3. see results in <...>/trunk/working_jdktools/build/test_report/html/index.html
> It is possible also to run test directly from command line:
>    cd working_jdktools
>    deploy/jdk/bin/java -classpath ../common_resources/depends/jars/junit_3.8.2/junit.jar:build/tests/classes
\
>    org.apache.harmony.jpda.tests.jdwp.MultiSession.ListenConnectorTest

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message