You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Aleksey Ignatenko (JIRA)" <ji...@apache.org> on 2007/03/15 11:59:09 UTC

[jira] Created: (HARMONY-3402) [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references

[drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references
---------------------------------------------------------------------------------------------

                 Key: HARMONY-3402
                 URL: https://issues.apache.org/jira/browse/HARMONY-3402
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
            Reporter: Aleksey Ignatenko
            Priority: Minor
         Attachments: active_frames_force_strong_enum.patch

j.l.Classloaders for active frames on stack are to be enumerated as strong references.
The current model is:
all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there is some function on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is enumerated this at every frame, but it is not true for JIT mode because in JIT mode this is not specified to be on frame and thus not enumerated (and as a result not reachable).
Therefore the idea of this bug is to enumerate all j.l.Classloaders of functions on stack.

The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function.

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


[jira] Updated: (HARMONY-3402) [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references

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

Aleksey Ignatenko updated HARMONY-3402:
---------------------------------------

    Comment: was deleted

> [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3402
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3402
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Aleksey Ignatenko
>            Priority: Minor
>         Attachments: active_frames_complete_v2.patch, active_frames_force_strong_enum.patch
>
>
> j.l.Classloaders for active frames on stack are to be enumerated as strong references.
> The current model is:
> all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there are some functions on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is "This" enumerated at every frame, but it is not true for JIT mode because in JIT mode "This" is not specified to be save frame and thus not enumerated (and as a result not reachable).
> The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.

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


[jira] Closed: (HARMONY-3402) [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references

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

Gregory Shimansky closed HARMONY-3402.
--------------------------------------


VERIFIED

> [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3402
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3402
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Aleksey Ignatenko
>            Assignee: Gregory Shimansky
>            Priority: Minor
>         Attachments: active_frames_complete_v2.patch, active_frames_complete_v3.patch, active_frames_force_strong_enum.patch
>
>
> j.l.Classloaders for active frames on stack are to be enumerated as strong references.
> The current model is:
> all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there are some functions on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is "This" enumerated at every frame, but it is not true for JIT mode because in JIT mode "This" is not specified to be save frame and thus not enumerated (and as a result not reachable).
> The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.

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


[jira] Assigned: (HARMONY-3402) [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references

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

Gregory Shimansky reassigned HARMONY-3402:
------------------------------------------

    Assignee: Gregory Shimansky

> [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3402
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3402
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Aleksey Ignatenko
>         Assigned To: Gregory Shimansky
>            Priority: Minor
>         Attachments: active_frames_complete_v2.patch, active_frames_force_strong_enum.patch
>
>
> j.l.Classloaders for active frames on stack are to be enumerated as strong references.
> The current model is:
> all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there are some functions on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is "This" enumerated at every frame, but it is not true for JIT mode because in JIT mode "This" is not specified to be save frame and thus not enumerated (and as a result not reachable).
> The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.

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


[jira] Updated: (HARMONY-3402) [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references

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

Aleksey Ignatenko updated HARMONY-3402:
---------------------------------------

    Description: 
j.l.Classloaders for active frames on stack are to be enumerated as strong references.
The current model is:
all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there are some functions on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is "This" enumerated at every frame, but it is not true for JIT mode because in JIT mode "This" is not specified to be save frame and thus not enumerated (and as a result not reachable).
The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.

  was:
j.l.Classloaders for active frames on stack are to be enumerated as strong references.
The current model is:
all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there is some function on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is enumerated this at every frame, but it is not true for JIT mode because in JIT mode this is not specified to be on frame and thus not enumerated (and as a result not reachable).
Therefore the idea of this bug is to enumerate all j.l.Classloaders of functions on stack.

The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.


> [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3402
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3402
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Aleksey Ignatenko
>            Priority: Minor
>         Attachments: active_frames_force_strong_enum.patch
>
>
> j.l.Classloaders for active frames on stack are to be enumerated as strong references.
> The current model is:
> all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there are some functions on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is "This" enumerated at every frame, but it is not true for JIT mode because in JIT mode "This" is not specified to be save frame and thus not enumerated (and as a result not reachable).
> The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.

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


[jira] Commented: (HARMONY-3402) [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references

Posted by "Aleksey Ignatenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489918 ] 

Aleksey Ignatenko commented on HARMONY-3402:
--------------------------------------------

checked, OK.

> [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3402
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3402
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Aleksey Ignatenko
>         Assigned To: Gregory Shimansky
>            Priority: Minor
>         Attachments: active_frames_complete_v2.patch, active_frames_complete_v3.patch, active_frames_force_strong_enum.patch
>
>
> j.l.Classloaders for active frames on stack are to be enumerated as strong references.
> The current model is:
> all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there are some functions on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is "This" enumerated at every frame, but it is not true for JIT mode because in JIT mode "This" is not specified to be save frame and thus not enumerated (and as a result not reachable).
> The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.

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


[jira] Commented: (HARMONY-3402) [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references

Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486360 ] 

Pavel Pervov commented on HARMONY-3402:
---------------------------------------

1) In root_set_enum_common: there is no need to assign class loader to 'const ClassLoader*' and then remove this cast with const_cast.
2) Generally, bootstrap class loader is never unloaded. Is it worth skipping any marking for this loader?

> [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3402
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3402
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Aleksey Ignatenko
>         Assigned To: Gregory Shimansky
>            Priority: Minor
>         Attachments: active_frames_complete_v2.patch, active_frames_force_strong_enum.patch
>
>
> j.l.Classloaders for active frames on stack are to be enumerated as strong references.
> The current model is:
> all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there are some functions on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is "This" enumerated at every frame, but it is not true for JIT mode because in JIT mode "This" is not specified to be save frame and thus not enumerated (and as a result not reachable).
> The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.

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


[jira] Resolved: (HARMONY-3402) [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references

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

Gregory Shimansky resolved HARMONY-3402.
----------------------------------------

    Resolution: Fixed

Patch is applied at 530111. Please check that the patch is applied as expected.

> [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3402
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3402
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Aleksey Ignatenko
>         Assigned To: Gregory Shimansky
>            Priority: Minor
>         Attachments: active_frames_complete_v2.patch, active_frames_complete_v3.patch, active_frames_force_strong_enum.patch
>
>
> j.l.Classloaders for active frames on stack are to be enumerated as strong references.
> The current model is:
> all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there are some functions on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is "This" enumerated at every frame, but it is not true for JIT mode because in JIT mode "This" is not specified to be save frame and thus not enumerated (and as a result not reachable).
> The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.

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


[jira] Commented: (HARMONY-3402) [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references

Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486361 ] 

Pavel Pervov commented on HARMONY-3402:
---------------------------------------

Otherwise, the patch looks ok.

> [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3402
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3402
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Aleksey Ignatenko
>         Assigned To: Gregory Shimansky
>            Priority: Minor
>         Attachments: active_frames_complete_v2.patch, active_frames_force_strong_enum.patch
>
>
> j.l.Classloaders for active frames on stack are to be enumerated as strong references.
> The current model is:
> all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there are some functions on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is "This" enumerated at every frame, but it is not true for JIT mode because in JIT mode "This" is not specified to be save frame and thus not enumerated (and as a result not reachable).
> The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.

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


[jira] Commented: (HARMONY-3402) [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references

Posted by "Aleksey Ignatenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483561 ] 

Aleksey Ignatenko commented on HARMONY-3402:
--------------------------------------------

smoke tests passed on win/lnx IA32

> [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3402
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3402
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Aleksey Ignatenko
>            Priority: Minor
>         Attachments: active_frames_complete_v2.patch, active_frames_force_strong_enum.patch
>
>
> j.l.Classloaders for active frames on stack are to be enumerated as strong references.
> The current model is:
> all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there are some functions on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is "This" enumerated at every frame, but it is not true for JIT mode because in JIT mode "This" is not specified to be save frame and thus not enumerated (and as a result not reachable).
> The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.

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


[jira] Commented: (HARMONY-3402) [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references

Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489729 ] 

Pavel Pervov commented on HARMONY-3402:
---------------------------------------

(1) Thanks.
(2) Agree. No need for additional check.

> [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3402
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3402
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Aleksey Ignatenko
>         Assigned To: Gregory Shimansky
>            Priority: Minor
>         Attachments: active_frames_complete_v2.patch, active_frames_complete_v3.patch, active_frames_force_strong_enum.patch
>
>
> j.l.Classloaders for active frames on stack are to be enumerated as strong references.
> The current model is:
> all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there are some functions on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is "This" enumerated at every frame, but it is not true for JIT mode because in JIT mode "This" is not specified to be save frame and thus not enumerated (and as a result not reachable).
> The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.

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


[jira] Updated: (HARMONY-3402) [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references

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

Aleksey Ignatenko updated HARMONY-3402:
---------------------------------------

    Attachment: active_frames_complete_v3.patch

> [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3402
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3402
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Aleksey Ignatenko
>         Assigned To: Gregory Shimansky
>            Priority: Minor
>         Attachments: active_frames_complete_v2.patch, active_frames_complete_v3.patch, active_frames_force_strong_enum.patch
>
>
> j.l.Classloaders for active frames on stack are to be enumerated as strong references.
> The current model is:
> all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there are some functions on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is "This" enumerated at every frame, but it is not true for JIT mode because in JIT mode "This" is not specified to be save frame and thus not enumerated (and as a result not reachable).
> The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.

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


[jira] Commented: (HARMONY-3402) [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references

Posted by "Aleksey Ignatenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483549 ] 

Aleksey Ignatenko commented on HARMONY-3402:
--------------------------------------------

active_frames_complete_v2.patch: updated patch - added complete strong enumeration support (including flag in classloader m_markBit). Actually this additional functionality was extracted and modified from H-3411. Therefore from now the patch  is to be applied over patch in H-3411. 

> [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3402
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3402
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Aleksey Ignatenko
>            Priority: Minor
>         Attachments: active_frames_complete_v2.patch, active_frames_force_strong_enum.patch
>
>
> j.l.Classloaders for active frames on stack are to be enumerated as strong references.
> The current model is:
> all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there are some functions on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is "This" enumerated at every frame, but it is not true for JIT mode because in JIT mode "This" is not specified to be save frame and thus not enumerated (and as a result not reachable).
> The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.

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


[jira] Updated: (HARMONY-3402) [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references

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

Aleksey Ignatenko updated HARMONY-3402:
---------------------------------------

    Attachment: active_frames_force_strong_enum.patch

> [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3402
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3402
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Aleksey Ignatenko
>            Priority: Minor
>         Attachments: active_frames_force_strong_enum.patch
>
>
> j.l.Classloaders for active frames on stack are to be enumerated as strong references.
> The current model is:
> all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there is some function on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is enumerated this at every frame, but it is not true for JIT mode because in JIT mode this is not specified to be on frame and thus not enumerated (and as a result not reachable).
> Therefore the idea of this bug is to enumerate all j.l.Classloaders of functions on stack.
> The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function.

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


[jira] Commented: (HARMONY-3402) [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references

Posted by "Aleksey Ignatenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487512 ] 

Aleksey Ignatenko commented on HARMONY-3402:
--------------------------------------------

> 1) In root_set_enum_common: there is no need to assign class loader to 'const ClassLoader*' and then remove this cast with const_cast. 
Fixed in active_frames_complete_v3.patch 

>2) Generally, bootstrap class loader is never unloaded. Is it worth skipping any marking for this loader? 
The fix would actually look like (classloader):
-    void Mark() { m_markBit = true; }
+   void Mark() { if (!IsBootstrap()) m_markBit = true;}

BS class loader classes are enumerated as strong references any way w/o considering m_markBit, so for my point of view it does not metter if we skip BS loader or not. I propose to leave Mark function as is.

> [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3402
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3402
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Aleksey Ignatenko
>         Assigned To: Gregory Shimansky
>            Priority: Minor
>         Attachments: active_frames_complete_v2.patch, active_frames_complete_v3.patch, active_frames_force_strong_enum.patch
>
>
> j.l.Classloaders for active frames on stack are to be enumerated as strong references.
> The current model is:
> all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there are some functions on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is "This" enumerated at every frame, but it is not true for JIT mode because in JIT mode "This" is not specified to be save frame and thus not enumerated (and as a result not reachable).
> The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.

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


[jira] Updated: (HARMONY-3402) [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references

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

Aleksey Ignatenko updated HARMONY-3402:
---------------------------------------

    Description: 
j.l.Classloaders for active frames on stack are to be enumerated as strong references.
The current model is:
all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there is some function on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is enumerated this at every frame, but it is not true for JIT mode because in JIT mode this is not specified to be on frame and thus not enumerated (and as a result not reachable).
Therefore the idea of this bug is to enumerate all j.l.Classloaders of functions on stack.

The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.

  was:
j.l.Classloaders for active frames on stack are to be enumerated as strong references.
The current model is:
all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there is some function on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is enumerated this at every frame, but it is not true for JIT mode because in JIT mode this is not specified to be on frame and thus not enumerated (and as a result not reachable).
Therefore the idea of this bug is to enumerate all j.l.Classloaders of functions on stack.

The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function.


> [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3402
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3402
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Aleksey Ignatenko
>            Priority: Minor
>         Attachments: active_frames_force_strong_enum.patch
>
>
> j.l.Classloaders for active frames on stack are to be enumerated as strong references.
> The current model is:
> all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there is some function on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is enumerated this at every frame, but it is not true for JIT mode because in JIT mode this is not specified to be on frame and thus not enumerated (and as a result not reachable).
> Therefore the idea of this bug is to enumerate all j.l.Classloaders of functions on stack.
> The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.

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


[jira] Updated: (HARMONY-3402) [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references

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

Aleksey Ignatenko updated HARMONY-3402:
---------------------------------------

    Attachment: active_frames_complete_v2.patch

Updated patch - added complete strong enumeration support (including flag in classloader m_markBit). Actually this additional functionality was extracted and modified from H-3411. Therefore from now the patch is to be applied over patch in H-3411.

> [drlvm] j.l.Classloaders for active frames on stack are to be enumerated as strong references
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3402
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3402
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Aleksey Ignatenko
>            Priority: Minor
>         Attachments: active_frames_complete_v2.patch, active_frames_force_strong_enum.patch
>
>
> j.l.Classloaders for active frames on stack are to be enumerated as strong references.
> The current model is:
> all j.l.Classloaders and j.l.Classes are enumerated as strong references. According to class unloading discussion in dev list one can see that when there are some functions on stack their j.l.Classes and thus j.l.Classloaders are to be reachable. It is true for interpreter as there is "This" enumerated at every frame, but it is not true for JIT mode because in JIT mode "This" is not specified to be save frame and thus not enumerated (and as a result not reachable).
> The patch attached adds running through functions on stack and forcing j.l.Classloaders (commented for a while) to be enumerated as strong references. The such forcing could be done via boolean flag in class Classloader in drlvm, if some function of class loaded by j.l.Classloader CL1 is on stack then mark it as force to strong enumeration. After that force this CL1 strong enumeration in void ClassLoader::gc_enumerate() function. This issue does not affect class unloading anyhow but it prevents possible serious errors if any class unloading appears at drlvm.

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