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