You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Varlamov (JIRA)" <ji...@apache.org> on 2008/05/13 06:32:55 UTC

[jira] Created: (HARMONY-5822) [drlvm][vmcore] class unloading does not clean JIT recompilation callbacks

[drlvm][vmcore] class unloading does not clean JIT recompilation callbacks
--------------------------------------------------------------------------

                 Key: HARMONY-5822
                 URL: https://issues.apache.org/jira/browse/HARMONY-5822
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
    Affects Versions: 5.0M6
            Reporter: Alexey Varlamov


There is a facility in DRLVM for notifying JIT of method recompilation, see vm_register_jit_recompiled_method_callback(JIT_Handle jit, Method_Handle method, void *callback_data).
Jitrino uses this feature to patch direct calls to methods (within other compiled methods) upon recompilation of a callee method.
However, in case then a caller method is unloaded, corresponding callbacks are not removed and lead to SIGSEGV if a callee method is recompiled.

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


[jira] Updated: (HARMONY-5822) [drlvm][vmcore] class unloading does not clean JIT recompilation callbacks

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov updated HARMONY-5822:
-------------------------------------

    Attachment: HARMONY-5822.patch

To reproduce, run lazy-resolution suite (HARMONY-3874) in server mode.

A dirty POC fix allowing to pass the suite, not for committing. 
Better fix should add an extra cycle iterating on classloaders being unloaded to unregister all callback before dismissing native data.

And ideally all this recompilation stuff should move to EM. 
BTW EM profiles are not unloaded either and may cause crashes if recompilation is triggered concurrently with unloading.

> [drlvm][vmcore] class unloading does not clean JIT recompilation callbacks
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5822
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5822
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>    Affects Versions: 5.0M6
>            Reporter: Alexey Varlamov
>         Attachments: HARMONY-5822.patch
>
>
> There is a facility in DRLVM for notifying JIT of method recompilation, see vm_register_jit_recompiled_method_callback(JIT_Handle jit, Method_Handle method, void *callback_data).
> Jitrino uses this feature to patch direct calls to methods (within other compiled methods) upon recompilation of a callee method.
> However, in case then a caller method is unloaded, corresponding callbacks are not removed and lead to SIGSEGV if a callee method is recompiled.

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


[jira] Commented: (HARMONY-5822) [drlvm][vmcore] class unloading does not clean JIT recompilation callbacks

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596278#action_12596278 ] 

Alexey Varlamov commented on HARMONY-5822:
------------------------------------------

To fix this:
1) the vm_register_jit_recompiled_method_callback() API must be extended to take 1 more parameter, a caller method;
2) vmcore must de-register callbacks for each caller method when unloading their classloader.

> [drlvm][vmcore] class unloading does not clean JIT recompilation callbacks
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5822
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5822
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>    Affects Versions: 5.0M6
>            Reporter: Alexey Varlamov
>
> There is a facility in DRLVM for notifying JIT of method recompilation, see vm_register_jit_recompiled_method_callback(JIT_Handle jit, Method_Handle method, void *callback_data).
> Jitrino uses this feature to patch direct calls to methods (within other compiled methods) upon recompilation of a callee method.
> However, in case then a caller method is unloaded, corresponding callbacks are not removed and lead to SIGSEGV if a callee method is recompiled.

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


[jira] Closed: (HARMONY-5822) [drlvm][vmcore] class unloading does not clean JIT recompilation callbacks

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison closed HARMONY-5822.
--------------------------------


> [drlvm][vmcore] class unloading does not clean JIT recompilation callbacks
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5822
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5822
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>    Affects Versions: 5.0M6
>            Reporter: Alexey Varlamov
>            Assignee: Alexey Varlamov
>             Fix For: 5.0M7
>
>         Attachments: H5822.diff, HARMONY-5822.patch
>
>
> There is a facility in DRLVM for notifying JIT of method recompilation, see vm_register_jit_recompiled_method_callback(JIT_Handle jit, Method_Handle method, void *callback_data).
> Jitrino uses this feature to patch direct calls to methods (within other compiled methods) upon recompilation of a callee method.
> However, in case then a caller method is unloaded, corresponding callbacks are not removed and lead to SIGSEGV if a callee method is recompiled.

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


[jira] Updated: (HARMONY-5822) [drlvm][vmcore] class unloading does not clean JIT recompilation callbacks

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov updated HARMONY-5822:
-------------------------------------

    Attachment: H5822.diff

More accurate fix, adds preliminary loop to notify upon unloading before destroying data.

> [drlvm][vmcore] class unloading does not clean JIT recompilation callbacks
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5822
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5822
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>    Affects Versions: 5.0M6
>            Reporter: Alexey Varlamov
>            Assignee: Alexey Varlamov
>         Attachments: H5822.diff, HARMONY-5822.patch
>
>
> There is a facility in DRLVM for notifying JIT of method recompilation, see vm_register_jit_recompiled_method_callback(JIT_Handle jit, Method_Handle method, void *callback_data).
> Jitrino uses this feature to patch direct calls to methods (within other compiled methods) upon recompilation of a callee method.
> However, in case then a caller method is unloaded, corresponding callbacks are not removed and lead to SIGSEGV if a callee method is recompiled.

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


[jira] Resolved: (HARMONY-5822) [drlvm][vmcore] class unloading does not clean JIT recompilation callbacks

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov resolved HARMONY-5822.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0M7

Committed at revision: 660377  

> [drlvm][vmcore] class unloading does not clean JIT recompilation callbacks
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5822
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5822
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>    Affects Versions: 5.0M6
>            Reporter: Alexey Varlamov
>            Assignee: Alexey Varlamov
>             Fix For: 5.0M7
>
>         Attachments: H5822.diff, HARMONY-5822.patch
>
>
> There is a facility in DRLVM for notifying JIT of method recompilation, see vm_register_jit_recompiled_method_callback(JIT_Handle jit, Method_Handle method, void *callback_data).
> Jitrino uses this feature to patch direct calls to methods (within other compiled methods) upon recompilation of a callee method.
> However, in case then a caller method is unloaded, corresponding callbacks are not removed and lead to SIGSEGV if a callee method is recompiled.

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


[jira] Assigned: (HARMONY-5822) [drlvm][vmcore] class unloading does not clean JIT recompilation callbacks

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov reassigned HARMONY-5822:
----------------------------------------

    Assignee: Alexey Varlamov

> [drlvm][vmcore] class unloading does not clean JIT recompilation callbacks
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5822
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5822
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>    Affects Versions: 5.0M6
>            Reporter: Alexey Varlamov
>            Assignee: Alexey Varlamov
>         Attachments: HARMONY-5822.patch
>
>
> There is a facility in DRLVM for notifying JIT of method recompilation, see vm_register_jit_recompiled_method_callback(JIT_Handle jit, Method_Handle method, void *callback_data).
> Jitrino uses this feature to patch direct calls to methods (within other compiled methods) upon recompilation of a callee method.
> However, in case then a caller method is unloaded, corresponding callbacks are not removed and lead to SIGSEGV if a callee method is recompiled.

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