You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Ilya Leviev <il...@gmail.com> on 2007/10/31 14:25:46 UTC

[drlvm]Class unloading failure due to threading issue

Hi,
Recently I have profiled EIOffice on Harmony using BoundsChecker that
detected memory leaks related to incomplete class unloading support,
namely, leaking Method_Signature structures. Here is a call stack that
shows a pass that should result in Method_Signature disposing. However
it doesn't work as expected because vm_destroy() function terminates
abnormally during executing jthread_wait_for_all_nondaemon_threads();

  Call stack:

main.c: gpProtectedMain()->
      main.c: invocation()->
            main.c: DestroyJavaVM()->
                  vm_destroy(){
                        jthread_wait_for_all_nondaemon_threads();
                        …
                  }
                  Global_Env::~Global_Env()->
                        ClassLoader::~ClassLoader()->
                              ClassLoader::ClassClearInternals()->
                                    Class::clear_internals()->

Method::MethodClearInternals()->delete _method_sig


This issue results in leaking such structures as  Global_Env,
ClassLoader, Method_Signature and others. This problem reproduced on
the simplest EIOffice scenario (start and then exit).

Also the issue may cause the problem described in
https://issues.apache.org/jira/browse/HARMONY-5018

Best regards,
Ilya Leviev
ESSD, Intel

Re: [drlvm]Class unloading failure due to threading issue

Posted by Ilya Leviev <il...@gmail.com>.
Rana,

Yes, I mean that some class structures like method_sig  and like
Global_Env and ClassLoader haven't disposed due to abnormal shutdown.

Ilya Leviev

Re: [drlvm]Class unloading failure due to threading issue

Posted by Rana Dasgupta <rd...@gmail.com>.
Illya,
  By "incomplete class unloading support", you are not refering to gc
initiated class unloading, am I right? You mean that some class
structures like method_sig are being leaked due to abnormal shutdown?

Rana

On Oct 31, 2007 6:25 AM, Ilya Leviev <il...@gmail.com> wrote:
> Hi,
> Recently I have profiled EIOffice on Harmony using BoundsChecker that
> detected memory leaks related to incomplete class unloading support,
> namely, leaking Method_Signature structures. Here is a call stack that
> shows a pass that should result in Method_Signature disposing. However
> it doesn't work as expected because vm_destroy() function terminates
> abnormally during executing jthread_wait_for_all_nondaemon_threads();
>
>  Call stack:
>
> main.c: gpProtectedMain()->
>      main.c: invocation()->
>            main.c: DestroyJavaVM()->
>                  vm_destroy(){
>                        jthread_wait_for_all_nondaemon_threads();
>                        …
>                  }
>                  Global_Env::~Global_Env()->
>                        ClassLoader::~ClassLoader()->
>                              ClassLoader::ClassClearInternals()->
>                                    Class::clear_internals()->
>
> Method::MethodClearInternals()->delete _method_sig
>
>
> This issue results in leaking such structures as  Global_Env,
> ClassLoader, Method_Signature and others. This problem reproduced on
> the simplest EIOffice scenario (start and then exit).
>
> Also the issue may cause the problem described in
> https://issues.apache.org/jira/browse/HARMONY-5018
>
> Best regards,
> Ilya Leviev
> ESSD, Intel
>