You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Gregory Shimansky (JIRA)" <ji...@apache.org> on 2007/06/19 15:02:26 UTC
[jira] Resolved: (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 ]
Gregory Shimansky resolved HARMONY-4046.
----------------------------------------
Resolution: Fixed
I've applied test improvement at 548714. I think we can resolve this particular issue because Andrey has opened a separate bug on VM with a test to reproduce it.
> [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.