Issue 122517 - AsynchronousFinalizer causes memory leaks
Summary: AsynchronousFinalizer causes memory leaks
Alias: None
Product: App Dev
Classification: Unclassified
Component: sdk (show other issues)
Version: 3.4.1
Hardware: All All
: P3 Normal
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2013-06-12 07:21 UTC by Mattias Jiderhamn
Modified: 2013-06-12 07:21 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description Mattias Jiderhamn 2013-06-12 07:21:31 UTC
In a multi classloader environment, such as a web container, the 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

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.