I've been given a thread dump generated by jvisualvm for a native shared library which is implemented using JNI. It's running in an app that is calling into it from multiple threads via Dot.Net's Parallel.For . The java portion of the library has a thread pool, but its size is limited, and the native portion of the library does not create any threads itself.
What seems to be happening is that more and more threads are being created, and eventually the app crashes with an out of memory error. The strange thing is that basically the only thing the app is doing is calling into the library within the Parallel.For in a loop, and any threads created by it shouldn't 'leak' (right?).
The thread dump contains many entries of the form:
"Thread-139" prio=6 tid=0x0ba33c00 nid=0x22ac runnable [0x00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
What exactly does that mean?