You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ivan Popov (JIRA)" <ji...@apache.org> on 2007/03/22 14:57:32 UTC

[jira] Created: (HARMONY-3472) [jdktools][jpda] improve JDWP agent reset procedure for multiple sessions

[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: Bug
          Components: JDK
         Environment: Windows/ia32, Linux/ia32, Harmony-jdk-r521141
            Reporter: Ivan Popov
            Priority: Minor


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.


[jira] Assigned: (HARMONY-3472) [jdktools][jpda] improve JDWP agent reset procedure for multiple sessions

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky reassigned HARMONY-3472:
------------------------------------------

    Assignee: Gregory Shimansky

> [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
>            Assignee: Gregory Shimansky
>            Priority: Minor
>         Attachments: H3472_jdwp_agent.patch, H3472_jdwp_agent_additional.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.


[jira] Closed: (HARMONY-3472) [jdktools][jpda] improve JDWP agent reset procedure for multiple sessions

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky closed HARMONY-3472.
--------------------------------------


No response, assuming ok.

> [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
>            Assignee: Gregory Shimansky
>            Priority: Minor
>         Attachments: H3472_jdwp_agent.patch, H3472_jdwp_agent_additional.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.


[jira] Resolved: (HARMONY-3472) [jdktools][jpda] improve JDWP agent reset procedure for multiple sessions

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky resolved HARMONY-3472.
----------------------------------------

    Resolution: Fixed

Patches are applied at 559138. Please check that they were applied as expected. Tests work ok for me.

> [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
>            Assignee: Gregory Shimansky
>            Priority: Minor
>         Attachments: H3472_jdwp_agent.patch, H3472_jdwp_agent_additional.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.


[jira] Updated: (HARMONY-3472) [jdktools][jpda] improve JDWP agent reset procedure for multiple sessions

Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Popov updated HARMONY-3472:
--------------------------------

    Attachment: H3472_jdwp_agent_additional.patch

Additional patch 'H3472_jdwp_agent_additional.patch' for JDWP agent (to be applied after 'H3472_jdwp_agent.patch') avoids compilation warnings in release mode due to removed trace messages (HARMONY-4391).

> [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, H3472_jdwp_agent_additional.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.


[jira] Updated: (HARMONY-3472) [jdktools][jpda] improve JDWP agent reset procedure for multiple sessions

Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (HARMONY-3472) [jdktools][jpda] improve JDWP agent reset procedure for multiple sessions

Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Popov updated HARMONY-3472:
--------------------------------

    Issue Type: Improvement  (was: Bug)

> [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
>
> 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.


[jira] Updated: (HARMONY-3472) [jdktools][jpda] improve JDWP agent reset procedure for multiple sessions

Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Popov updated HARMONY-3472:
--------------------------------

    Attachment: H3472_jdwp_agent.patch

A simple workaround is to clean m_resetFlag when a new session started. Attached patch 'H3472_jdwp_agent.patch' does that. With this patch all affected JDWP unit tests passed against harmony-jdk-r554146 on both Windows and Linux platforms. This patch also removes tests from exclude list.


> [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.