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] Closed: (HARMONY-4046) [jdktools][jpda] JDWP test fails on Windows: org.apache.harmony.jpda.tests.jdwp.ThreadReference.InterruptTest
Date Wed, 20 Jun 2007 12:52:26 GMT

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

Ivan Popov closed HARMONY-4046.
-------------------------------


Thanks, Andrey, Gregory.
Verified in harmony-jdk-r548946, closing this issue.

> [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
>            Assignee: Gregory Shimansky
>         Attachments: 4046.patch, 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.


Mime
View raw message