2010-08-31 1 views
1

Quand je suis en train d'utiliser jstack pour obtenir la décharge de fil de mon application figée, l'un des fils me donne ce résultat:Obtenir une décharge de fil à partir d'une application Java congelés sans utiliser jstack

Thread 27560: (state = IN_NATIVE) 
- org.eclipse.swt.internal.gtk.OS._gtk_adjustment_changed(int) @bci=0 (Compiled frame; information may be imprecise) 
Error occurred during stack walking: 
java.lang.NullPointerException 
    at sun.jvm.hotspot.runtime.Frame.addressOfStackSlot(Frame.java:224) 
    at sun.jvm.hotspot.runtime.x86.X86Frame.senderForCompiledFrame(X86Frame.java:342) 
    at sun.jvm.hotspot.runtime.x86.X86Frame.sender(X86Frame.java:283) 
    at sun.jvm.hotspot.runtime.Frame.sender(Frame.java:194) 
    at sun.jvm.hotspot.runtime.Frame.realSender(Frame.java:199) 
    at sun.jvm.hotspot.runtime.VFrame.sender(VFrame.java:119) 
    at sun.jvm.hotspot.runtime.CompiledVFrame.sender(CompiledVFrame.java:178) 
    at sun.jvm.hotspot.runtime.VFrame.javaSender(VFrame.java:146) 
    at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:76) 
    at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45) 
    at sun.jvm.hotspot.tools.JStack.run(JStack.java:60) 
    at sun.jvm.hotspot.tools.Tool.start(Tool.java:221) 
    at sun.jvm.hotspot.tools.JStack.main(JStack.java:86) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:597) 
    at sun.tools.jstack.JStack.runJStackTool(JStack.java:118) 
    at sun.tools.jstack.JStack.main(JStack.java:84) 

Bien sûr , il est celui que je suis plus intéressé par :(

Ctrl+Break ne fonctionne pas non plus. y at-il d'autres façons d'obtenir une décharge de fil? J'utilise Linux et Sun VM 1.6.0_20.

+3

'CTRL- \' ('CTRL-Break' est Windows). –

+0

Merci, je ne le savais pas! –

Répondre

2

Vous pouvez essayer VisualVM, un outil gratuit qui est livré avec Java 6. Je crois qu'il est disponible pour Linux ainsi que d'autres systèmes d'exploitation.

Ceci vous permet de vous connecter à distance aux processus Java en cours d'exécution, de faire des vidages de thread/heap/application, ainsi que de profiler et d'autres outils utiles. Pour plus d'informations, voir https://visualvm.dev.java.net/ pour plus d'informations.

+0

Oui, cela a fonctionné. –

3

sur Linux vous devrez peut-être utiliser Ctrl+\ dans le terminal pour générer un vidage de thread comme vous le faites sur les systèmes UNIX.

+1

ou envoyer le processus le signal QUIT 'kill -QUIT ' –

Questions connexes