Issue #453: Resource leaking via a rogue Shutdown Hook

Type: BugPriority: NormalStatus: FixedReplies: 1

A shutdown hook is registered upon ObjectDB initialisation. The hook is loaded from the web application's class loader. When the application is stopped (not the server, just the application) the hook is not cleared. This leads to web-application class-loader leak, that results in huge resource loss, and eventually in an OOME.

Offending class: com.objectdb.o.MSF$1
 (anonymous subclass of java.lang.Thread)
Name of the Thread/Hook: ODB-FileCloser

Thread is registered from the com.objectdb.o.MSF static initialiser (<clinit>).

Attaching screen-shots of the memory foot-prints with a live application, and after the application has been stopped.
The thing to look for is the fact, that the only path to a garbage collection root after stopping is via the hook.

image/png iconScreenshot-Eclipse_Memory_Analyzer_2.png (186 KB)
After the application has been stopped

Thank you for your report. The shutdown hook is removed in build 2.2.9_03.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login