Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JVM apparently hanging




Hey Greg, looks like you found something there!

I found another thread that looks like this:

Thread [Thread-0] (Suspended)
       ClassLoader$NativeLibrary.load(String) line: not available [native method]
       ClassLoader.loadLibrary0(Class, File) line: 1586
       ClassLoader.loadLibrary(Class, String, boolean) line: 1503
       Runtime.loadLibrary0(Class, String) line: 788
       System.loadLibrary(String) line: 834
       LoadLibraryAction.run() line: 50
       AccessController.doPrivileged(PrivilegedAction) line: not available [native method]
       NativeLibLoader.loadLibraries() line: 38
       DebugHelper.<clinit>() line: 29
       Component.<clinit>() line: 506
       AWTInitializer.run() line: 65 [local variables unavailable]


It ALSO is calling loadLibrary0() so there could be deadlock there.  But...this thread is sitting in ClassLoader$NativeLibrary.load, where it wants to load "awt" (libawt.jnilib it looks like).
So this begs another question: Why is THIS thread hanging?

It sounds like triggering a full thread-dump would be the thing to do.  I have to confess ignorance and ask: How do I trigger a full thread-dump?

I will also try to figure out why the AWTInitializer thread is running... I didn't start it, and I don't know if it runs by default or anything like that, or it may be triggered somewhere else in the product.

Thanks again for your help!

-Eric

java-dev-bounces+eric_feigenson=email@hidden wrote on 05/02/2006 12:42:21 PM:

> Eric Feigenson wrote:
>
> >Thread [main] (Suspended)
> >        Runtime.loadLibrary0(Class, String) line: 780   <-- seems to hang
> >here.   Class is sun.security.action.LoadLibraryAction,
> >and the String is "zip"
> >        System.loadLibrary(String) line: 834             // The value of
> >the string argument here is "zip"
> >        LoadLibraryAction.run() line: 50 [local variables unavailable]
> >        AccessController.doPrivileged(PrivilegedAction) line: not
> >available [native method]
> >        CRC32.<clinit>() line: 25 [local variables unavailable]
> >        ZipInputStream.<init>(InputStream) line: 26
> >        ClassHashtable.explodeArchive(String, byte[]) line: 112
>
> Seems like a normal stack-trace to me.  The method Runtime.loadLibrary0()
> is synchronized, so maybe that's a clue: deadlock.  Trigger a full
> thread-dump and the JVM should tell you about deadlocks it finds.
>
> The only other synchronized method in Runtime is load0(), called by the
> Runtime.load() method.  Both loadLibrary0() and load0() eventually call
> ClassLoader.loadLibrary(), a package-visible static method.  See the source
> for Runtime and ClassLoader for details.
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: JVM apparently hanging (From: Greg Guerin <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.