JVM hangs beyond recovery
David.Holmes at oracle.com
Mon Jun 14 00:55:17 PDT 2010
Stas Oskin said the following on 06/13/10 17:27:
> We start in Java, try to load a native library and enter the dynamic
> linker. That in turn causes native code in libxuggle-xuggler-io.3 to
> run which tries to invoke Java code:
> If this is done while holding a lock in the dynamic linker then we
> will deadlock if any other thread tries to acquire that lock and a
> safepoint is trigerred - which in the above case is done by the
> thread holding that lock.
> I posted this issue to Xuggler list, and Xuggler developer/founder Art
> quickly posted a possible fix. He is not 100% sure it solves it, and my
> own Java/native skills are not so great to validate it (other then
> actually using is and finding out if it really helped, which I'm doing),
> so I will very appreciate if you could give a quick look to fix and give
> your verdict.
> Here is the diff:
I can't say if this fixes it or not as I don't know how all the code
hooks together. But I'm somewhat surprised that this is related to
JNI_ONload as from what I saw the problem is caused by a hook executed
by the dlopen while the internal dl lock is held - I would not think
that JNI_Onload could be executed while inside dlopen.
More information about the hotspot-runtime-dev