Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JVM Finalizer hangup, OutOfMemoryError

843798Jan 3 2007 — edited Feb 1 2007
Our application showed endless series of OutOfMemoryErrors.
Looking on the heap dump we see that the memory is full, but there
is a lot objects waiting for a finalization. Checking the stack trace showed that
the finalizer thread stays locked in a native method:

"Finalizer" daemon prio=8 tid=0x004cc008 nid=0xa2c runnable [0x02bff000..0x02bffa68]
at sun.awt.windows.WRobotPeer._dispose(Native Method)
at sun.awt.windows.WRobotPeer.disposeImpl(WRobotPeer.java:33)
at sun.awt.windows.WObjectPeer.dispose(WObjectPeer.java:55)
at sun.awt.windows.WObjectPeer.finalize(WObjectPeer.java:65)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)

this explains the OutOfMemoryError.

My question is: is this a known bug, are there ways how to fix this ?
It is very hard to reproduce this , but it is a large problem for us
because this error happens at customer site and we cannot reproduce it
in our test environment. I am really sure, this is not a simple memory leak caused through java references.

I have already seen several instances of this problem at different customers.
One point is always common: OutOfMemoryException and the Heap dump
shows a lot of object waiting for the finalizer. Our application runs under windows and linux, this problem seems to be windows specific. The heap dumps are written from the JVM using the "-XX:+HeapDumpOnOutOfMemoryError" option.

The JVM is JRE 1.5.09,
Microsoft Windows XP Professional, Version 2002, Service pack 2
on Dell Optiplex GX620, Intel (R), Pentium (R) D CPU 3.20GHz, 3.19GHz,
2.00GB of RAM, Physical Address Extension.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 1 2007
Added on Jan 3 2007
10 comments
487 views