harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Yakushev (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-4046) [jdktools][jpda] JDWP test fails on Windows: org.apache.harmony.jpda.tests.jdwp.ThreadReference.InterruptTest
Date Fri, 15 Jun 2007 14:22:39 GMT

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

Andrey Yakushev updated HARMONY-4046:
-------------------------------------

    Attachment: 4046.patch

This test uses one lock object waitForStart for two purposes: threads synchronization and
interrupt waiting. If two different objects are used (see the 4046.patch file attached), the
hang disappear in my long testing run.

Of course the bug in drlvm remains. It seems like problems with handling the combination of
notify and interrupt.

If suggested patch is applied, I will open the new bug for drlvm. Also I'm going to write
simpler bug reproducer.


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