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] Commented: (HARMONY-3314) [jdktools][jpda] DRLVM hangs on exit while detaching thread
Date Fri, 01 Jun 2007 16:18:16 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-3314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500750

Ivan Popov commented on HARMONY-3314:

Rana, HARMONY-3269 will not help in this case, it will make this hang to occur more often.
That JIRA suggests not to wait for agent daemon threads to finish, but let them finish during
VM shutdown. However, if VM kills these daemon threads during their shutdown, they may left
monitors locked.

There is alternative idea proposed by Andrey: never let agent daemon threads to finish until
VM kills them at shutdown. In this case these threads wont lock monitors in ThreadGroup class
and thus wont prevent main thread from detaching. I experimented with this approach and it
appeared working quite well. I ran JPDA tests and don't see debugged VM hangs at exit so far.
I just have to check it more carefully. If it  works, we can use this workaround until the
general problem with safe terminating daemon threads is resolved.

> [jdktools][jpda] DRLVM hangs on exit while detaching thread
> -----------------------------------------------------------
>                 Key: HARMONY-3314
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3314
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>         Environment: Linux/ia32, Windows/ia32, Harmony-jdk-r514598, Harmony-jdk-r533073
>            Reporter: Ivan Popov
>            Assignee: Gregory Shimansky
>         Attachments: 3314.patch, jpda_tests.patch
> Many JDWP tests run long time on Linux because DRLVM intermittently crashed at exit.
> For example, the following test
>   org.apache.harmony.jpda.tests.jdwp.Events.VMDeathTest
> Here is typical diagnostics in the test output:
> Waiting for debuggee exit
> STDERR> Stack trace:
> STDERR> 	1: ?? (??:-1)
> STDERR> addr2line: '[heap]': No such file
> Ignoring exception in ProcessWaiter thread interrupted: java.lang.InterruptedException
> # ERROR: Enforced debuggee termination
> 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.Events.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.Events.VMDeathTest

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

View raw message