On Sep 17, 2008, at 2:07 PM, Stas Oskin wrote:
Hi.
Thanks for the information, I didn't know about the
syncronizedLibrary requirement and will check it.
Note that this is only the case for when jna.protected=true/
Native.setProtected(true). Otherwise it's up to you whether you want
entry to your library synchronized.
Also, here is the log that I got from java core file. Any idea what
it means? Again, demangling the function names would be very helpful.
Regards.
#0 0x000000389e430155 in raise () from /lib64/libc.so.6
(gdb) backtrace
#0 0x000000389e430155 in raise () from /lib64/libc.so.6
#1 0x000000389e431bf0 in abort () from /lib64/libc.so.6
#2 0x00002b4aa37873f7 in os::abort ()
from /usr/java/jdk1.6.0_07/jre/lib/amd64/server/libjvm.so
#3 0x00002b4aa38e5bad in VMError::report_and_die ()
from /usr/java/jdk1.6.0_07/jre/lib/amd64/server/libjvm.so
#4 0x00002b4aa378c70c in JVM_handle_linux_signal ()
from /usr/java/jdk1.6.0_07/jre/lib/amd64/server/libjvm.so
#5 0x00002b4aa378955e in signalHandler ()
from /usr/java/jdk1.6.0_07/jre/lib/amd64/server/libjvm.so
#6 <signal handler called>
#7 0x000000389e47a22b in memcpy () from /lib64/libc.so.6
#8 0x00002b4aa35f2501 in jni_SetByteArrayRegion ()
from /usr/java/jdk1.6.0_07/jre/lib/amd64/server/libjvm.so
#9 0x00002aaad6a386ea in Java_com_sun_jna_Pointer__1read__J_3BII ()
from /tmp/jna6448.tmp
This isn't really any different than you already knew. The Pointer's
peer value seems to be bogus, which causes the read of a byte array
from native memory to fail. The VM signal handler catches the SEGV
and dumps.