124 words

Issue #63 - Resource leaking via a rogue Shutdown Hook

BugVersion: Priority: NormalStatus: FixedReplies: 1
2011-08-15 14:58

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.

Lachezar's picture
Joined on 2011-08-15
User Post #1
2011-08-16 17:33

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)
support's picture
Joined on 2010-05-03
User Post #527

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Maximum file size: 32 MB