Hi all,


OutOfMemoryError in a JVM happens because (1) too many objects are reachable at a given point in time, or (2) the finalizer is blocked, so that otherwise reclaimable garbage piles up.

The problem under discussion is 2. If we solve it by adding one or multiple threads, we may run into 1 in different ways (e.g., if we have only one thread to do the releases, that thread may block and its queue may grow too large; if we have multiple threads, it is unlikely that all of them block at the same time, etc.).

I've written a somewhat reduced test case (it's still a bit big), which is suitable to demonstrate the problem. It is attached to issue i#57753# here:
http://www.openoffice.org/nonav/issues/showattachment.cgi/31513/CrashFilter.tgz

If you untar it into the top level of a 2.0 SDK and do 'make' then 'make run', you should run into problems fairly quickly. These problems do not occur if you compile a version of java_uno.dll with the patches also attached to issue #i57753#. These are checked into CVS on CWS 'mtg1' or branch 'cws_src680_mtg1' here:
http://udk.openoffice.org/source/browse/udk/bridges/source/jni_uno/?only_with_tag=cws_src680_mtg1

I also run the JVM with the following parameters:
<param>-XX:MaxPermSize=128m</param>
<param>-XX:NewSize=128m</param>
<param>-XX:MaxNewSize=128m</param>
<param>-XX:PermSize=128m</param>
<param>-Xincgc</param>
<param>-Xmx512m</param>
<param>-Xms512m</param>
</vmParameters>

The above solution (huge heap, 10 finalizer threads) is too brute force and needs to be finessed somewhat! But it should represent a starting point for discussion.

Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to