poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From littlenoodles <ryamp...@harris.com>
Subject Dealing with javacore dumps calling POI via JNI
Date Wed, 12 Jun 2013 17:29:14 GMT
Hi.  I've got a C app that calls out to POI via a POIJNI wrapper I wrote. 
Since it's a write-only wrapper, most of the calls from C to POIJNI don't
return any values.  And it mostly works well.

Today, though, a user caused the Java VM to dump (I copied the stack from
the resulting javacore file below - seems to be my PoiJni.writeFile method
calling out to HSSFWorkbook.write and having a memory allocation fail down
the line).  Anyway, the problem seems to be that I set the max memory to
128MB in my jvm and I need more.  But on top of that, my 'CallVoidMethod'
call returns after java dumps, and my app thinks the file was written
successfully.  I guess I figured if the JVM ever dumped, my calling app
would too, but that's not the case.  So I'm wondering how to test for the
fact that the JVM aborted.  Is there some status flag in the JNIEnv struct 
(or query I can make) to monitor the health of the JVM to detect when it dumps?

1STGCHTYPE     GC History
3STHSTTYPE     16:49:13:333019000 GMT j9mm.126 -   at 216B49C0
ring;)V, jit 00000000, pc 21771FCA
3STHSTTYPE     16:49:13:333017000 GMT j9mm.126 -   at 216B9748
kbook.write(Ljava/io/OutputStream;)V, jit 00000000, pc 217C3C2D
3STHSTTYPE     16:49:13:333014000 GMT j9mm.126 -   at 216B9758
kbook.getBytes()[B, jit 20B01164, pc 20304950
3STHSTTYPE     16:49:13:333009000 GMT j9mm.101 -  
J9AllocateIndexableObject() returning NULL! 16978
328 bytes requested for object of class 21377768 from memory space ''
3STHSTTYPE     16:49:13:332973000 GMT j9mm.53 -   GlobalGC end:
workstackoverflow=0 overflowcount=0
weakrefs=17 soft=0 phantom=0 finalizers=52 newspace=0/0
oldspace=13720344/134217728 loa=0/0

To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org

View raw message