deadlock with jni NewDirectByteBuffer called from multiple threads introduced in JDK 1.6.0_04
Keith McNeill
mcneill at streambase.com
Thu Jan 8 12:22:43 PST 2009
Our software has a C++ network layer using a large java runtime via
JNI. When new clients connect to our server we make some
NewDirectByteBuffer calls so that we can pass data from the c++ network
layer to the the java runtime system. We use the JVM invocation JNI
interface (i.e. we startup with our own exe rather than java.exe). This
same basic setup has been running for several years.
We have recently found that we can get what appears to be deadlock
within calls to NewDirectByteBuffer. Debugging we can see multiple
threads down in the guts of NewDirectByteBuffer blocked. Once the
deadlock occurs the JVM is hosed. We can't get stack dumps from it,
can't do anything with it.
This problem is complicated to reproduce but we can do it reliably.
We have been able to reproduce this with JDK 1.6.0_04 through JDK
1.6.0_11. We haven't been able to reproduce with JDK 1.6.0_03 down
through JDK 1.5.
Any suggestions on the best way to debug this JDK problem?
Keith
More information about the hotspot-runtime-dev
mailing list