https://issues.apache.org/ooo/show_bug.cgi?id=122517
Bug ID: 122517
Issue Type: DEFECT
Summary: AsynchronousFinalizer causes memory leaks
Product: App Dev
Version: AOO 3.4.1
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: sdk
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
In a multi classloader environment, such as a web container, the
com.sun.star.lib.util.AsynchronousFinalizer class of JURT/Java Uno RunTime has
the potential of causing classloader leaks, and eventually crashes due to
java.lang.OutOfMemoryError: PermGen space.
This is because AsynchronousFinalizer starts a Thread that will never finish,
which causes problems at application redeploy. More about the problem at
http://java.jiderhamn.se/2012/01/15/classloader-leaks-iii-die-thread-die/
At the very least, there should be a way of telling AsynchronousFinalizer to
shut down the thread gracefully. I realize however this can be complicated, as
the thread is supposed to process Jobs added to the queue by the finalize()
method of other objects, which may be garbage collected after the web
application/classloader is supposedly unloaded.
One alternative might be, that the signal to shutdown does not stop the thread
right away, but rather when X seconds have passed AND there are no more items
in queue. It should be possible to make things more complicated, for example by
starting a new thread if jobs are added after that.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.