harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Popov (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 Fri, 29 Jun 2007 13:10:04 GMT

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

Ivan Popov updated HARMONY-3377:
--------------------------------

    Attachment: H3377_jpda_test_options.patch

Better way is to modify TestOptions class in JPDA tests framework to store all local modifications
of test options inside instance of TestOptions class which is created for each test case.
With this approach different test cases cannot affect each other through modification of system
properties.

I'm attaching patch 'H3377_jpda_test_options.patch' for TestOptions class, which follows this
approach and solves the problem. This patch also removes affected JDWP test from exclude list.
I've tested it on both Windows and Linux and all JDWP tests passed for me (except known failures).

I suggest to apply this patch after passing M2 milestone.


> [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, ClassObjectIDTest_cleanup.patch,
H3377_jpda_test_options.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