You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Geir Magnusson Jr (JIRA)" <ji...@apache.org> on 2006/09/23 15:05:24 UTC

[jira] Resolved: (HARMONY-1541) [drlvm] [jvmti] JVMTI breakpoint handler should exit exception/signal handler before calling agent callbacks

     [ http://issues.apache.org/jira/browse/HARMONY-1541?page=all ]

Geir Magnusson Jr resolved HARMONY-1541.
----------------------------------------

    Resolution: Fixed

r449228

Ubuntu 6 - smoke, c-unit

> [drlvm] [jvmti] JVMTI breakpoint handler should exit exception/signal handler before calling agent callbacks
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1541
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1541
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Gregory Shimansky
>         Assigned To: Geir Magnusson Jr
>         Attachments: Fix-JVMTI-breakpoint-handler.patch
>
>
> The current implementation of JVMTI breakpoints invokes agent from inside of exception (on Windows) or signal (on Linux) handler. This usually works but may cause problems if for example agent decides to stop the thread with breakpoint for some long time. On Windows exception handler cannot be invoked by another thread until other exception handler is running. This may cause dead locks with any exception happening in other threads, e.g. C++ exceptions on windows are done through the same mechanism. On Linux calling arbitrary functions from inside of signal handler may not work as well.
> The solution for this problem is if JVMTI sees that happened breakpoint is actually set by JVMTI, for processing it it should exit the handler. In order to start breakpoint processing the handler exit IP is changed from the IP pointing to the interrupted location to the JVMTI processing handler. Then exception/signal handler exits and makes the kernel happy while execution is transferred to JVMTI breakpoints handler. This also is done while holding breakpoints list lock so that no intermittent modification, like removing the breakpoin which caused exception is possible.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira