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-3472) [jdktools][jpda] improve JDWP agent reset procedure for multiple sessions
Date Sun, 08 Jul 2007 09:32:04 GMT

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

Ivan Popov updated HARMONY-3472:

    Patch Info: [Patch Available]

Patches for this issue should be applied after patches for HARMONY-2891, otherwise it may
break other pending JDWP patches.

> [jdktools][jpda] improve JDWP agent reset procedure for multiple sessions
> -------------------------------------------------------------------------
>                 Key: HARMONY-3472
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3472
>             Project: Harmony
>          Issue Type: Improvement
>          Components: JDK
>         Environment: Windows/ia32, Linux/ia32, Harmony-jdk-r521141
>            Reporter: Ivan Popov
>            Priority: Minor
>         Attachments: H3472_jdwp_agent.patch
> The following JDWP unit tests for multiple debugger sessions fail on both Windows and
Linux HDK bulds:
> org.apache.harmony.jpda.tests.jdwp.MultiSession.ClassPrepareTest
> org.apache.harmony.jpda.tests.jdwp.MultiSession.FieldAccessTest
> org.apache.harmony.jpda.tests.jdwp.MultiSession.FieldModificationTest
> org.apache.harmony.jpda.tests.jdwp.MultiSession.SingleStepTest
> org.apache.harmony.jpda.tests.jdwp.MultiSession.VMDeathTest
> They usually fail on a single-cpu machine and often pass on a multi-cpu machine. 
> The problems is in the reset procedure in JDWP agent implementation. Angent resets all
its component after debugger session is closed. In the first reset EventDispatcher sets internal
flag m_resetFlag (to release all threads waiting on events), but does not clear it when the
next session starts. This breaks further events handling algorithm. Since this affects only
multiple debugger sessions, which are not often used, I'm marking this issue as minor.
> In these particular tests this problem results in VM_DEATH event is not sent to debugger
and tests fail with the following output:
> <...>
> => Wait for event..
> <...>
> org.apache.harmony.jpda.tests.framework.TestErrorException: org.apache.harmony.jpda.tests.framework.jdwp.exceptions.TimeoutException:
Timeout was exceeded
> 	at org.apache.harmony.jpda.tests.framework.jdwp.VmMirror.receiveEvent(VmMirror.java:1693)
> 	at org.apache.harmony.jpda.tests.jdwp.MultiSession.VMDeathTest.testVMDeathRequest(VMDeathTest.java:103)
> 	at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
> Caused by: org.apache.harmony.jpda.tests.framework.jdwp.exceptions.TimeoutException:
Timeout was exceeded
> 	at org.apache.harmony.jpda.tests.framework.jdwp.PacketDispatcher$EventsSynchronyzer.waitForNextEvent(PacketDispatcher.java:173)
> 	at org.apache.harmony.jpda.tests.framework.jdwp.PacketDispatcher.receiveEvent(PacketDispatcher.java:639)
> 	at org.apache.harmony.jpda.tests.framework.jdwp.VmMirror.receiveEvent(VmMirror.java:1712)
> 	at org.apache.harmony.jpda.tests.framework.jdwp.VmMirror.receiveEvent(VmMirror.java:1691)
> 	at org.apache.harmony.jpda.tests.jdwp.MultiSession.VMDeathTest.testVMDeathRequest(VMDeathTest.java:103)
> 	... 13 more
> 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 run particular test:
>     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.VMDeathTest
> 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.VMDeathTest

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

View raw message