harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory Shimansky (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-5019) [jdktools][jpda] Agent has to ensure that all of its threads are terminated when Agent_OnUnload exits
Date Fri, 26 Oct 2007 16:55:50 GMT

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

Gregory Shimansky reassigned HARMONY-5019:

    Assignee: Gregory Shimansky

> [jdktools][jpda] Agent has to ensure that all of its threads are terminated when Agent_OnUnload
> -----------------------------------------------------------------------------------------------------
>                 Key: HARMONY-5019
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5019
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>         Environment: Linux x86_64
>            Reporter: Gregory Shimansky
>            Assignee: Gregory Shimansky
>            Priority: Critical
> In the current version of harmony agent doesn't join its EventDispatcher and PacketDispatcher
threads when Agent_OnUnload completes. It in fact just deletes monitors that are held by these
threads, but threads may still be running when Agent_OnUnload exits. The bad thing is immediately
after that agent's library is unloaded from address space of the process. The good thing (for
agent) is that in most cases it is executing VM's code of exiting monitors, so it doesn't
execute unmapped memory and the crash doesn't happen right away. Also unmapped memory doesn't
always mean unexecutable. On x86 architectures unmapped memory may still be executable because
NX (no execution) bit is usually disabled by OSes on this architecture.
> The bad things happen on Linux x86_64 because it enables NX bit for user applications
by default. Crashes happen on shutdown almost in 100% of runs. There are several different
scenarios but all of them relate to accessing agent's address space where its library once
was loaded. This happens because agent's threads are still running when agent's library is
> I found some code that is commented in agent that could join in EventDispatcher and PacketDispatcher
threads on VM_DEATH phase change. The code is commented since revision 544123 that was a workaround
for VM's inability to join threads correctly on shutdown. I uncommented Join calls but still
I get a dead lock on shutdown. Investigation continues. Without fix for this bug enabling
debugging on Linux x86_64 isn't possible.

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

View raw message