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/06/05 15:03:26 UTC

[jira] Updated: (HARMONY-4046) [jdktools][jpda] JDWP test fails on Windows: org.apache.harmony.jpda.tests.jdwp.ThreadReference.InterruptTest

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

Ivan Popov updated HARMONY-4046:
--------------------------------

    Attachment: jpda_test_exclude.patch

I'm attaching patch 'jpda_test_exclude.patch' to exclude this test from CC runs until the problem is identified and fixed.

> [jdktools][jpda] JDWP test fails on Windows: org.apache.harmony.jpda.tests.jdwp.ThreadReference.InterruptTest
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4046
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4046
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>         Environment: Windows/x86, harmony-jdk-r544417
>            Reporter: Ivan Popov
>         Attachments: jpda_test_exclude.patch
>
>
> After HARMONY-3314 was fixed, I noticed that one particular JDWP test
>     org.apache.harmony.jpda.tests.jdwp.ThreadReference.InterruptTest
> intermittently fails on Windows/x86, especially on a slow single-cpu WinXP machine and T41p laptop.
> The failure symptoms are similar to HARMONY-3314 - debuggee VM process hangs on exit and test throws exception:
> org.apache.harmony.jpda.tests.framework.TestErrorException: Debuggee process did not finish during timeout   
>  at org.apache.harmony.jpda.tests.jdwp.share.JDWPUnitDebuggeeWrapper.WaitForProcessExit(JDWPUnitDebuggeeWrapper.java:212)   
>  at org.apache.harmony.jpda.tests.jdwp.share.JDWPUnitDebuggeeWrapper.stop(JDWPUnitDebuggeeWrapper.java:131)   
>  at org.apache.harmony.jpda.tests.jdwp.share.JDWPTestCase.internalTearDown(JDWPTestCase.java:84)   
>  at org.apache.harmony.jpda.tests.jdwp.share.JDWPSyncTestCase.internalTearDown(JDWPSyncTestCase.java:75)   
>  at org.apache.harmony.jpda.tests.jdwp.share.JDWPRawTestCase.tearDown(JDWPRawTestCase.java:110)   
> Caused by: java.lang.IllegalThreadStateException: process has not exited   
>  at java.lang.Runtime$SubProcess.exitValue(Runtime.java:357)   
>  at org.apache.harmony.jpda.tests.jdwp.share.JDWPUnitDebuggeeWrapper.WaitForProcessExit(JDWPUnitDebuggeeWrapper.java:207)   
>  at org.apache.harmony.jpda.tests.jdwp.share.JDWPUnitDebuggeeWrapper.stop(JDWPUnitDebuggeeWrapper.java:131)   
>  ... 13 more 
> However, Java stack is different. I could not to print it with MSVC debugger, but I was able to reconstruct it from interpreter frames (the test fails with both JIT and interpreter). Java stack looks like the following:
>     VMThreadManager.wait()
>     Object.wait()
>     InterruptDebuggee.run()
>     Debuggee.runDebuggee()
>     InterruptDebiggee.main()
> It shows that debuggee VM is actually waiting on a monitor in method run() of the tested class InterruptDebuggee:
>     public void run() {
>         DebuggeeThread thrd = new DebuggeeThread(TESTED_THREAD,
>                 logWriter, synchronizer); 
>         
>         synchronized(waitForStart){
>             thrd.start();
>             try {
>                 waitForStart.wait();
>             } catch (InterruptedException e) {
>             }
>         }
>         synchronized(waitForFinish){
>             logWriter.println("thread is finished");
>         }
>     }
> It's strange result, because waitForStart.wait() should be completed by notification from the started thread in its run() method:
>         public void run() {
>             synchronized(InterruptDebuggee.waitForFinish){
>                 synchronized(InterruptDebuggee.waitForStart){
>                     InterruptDebuggee.waitForStart.notifyAll();
>                     <...>
>                 }
>             }
>         }
> It seems like race condition in implementation of Object.wait().

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