Comment 3 for bug 597098

Revision history for this message
Jakub Milkiewicz (jmilkiewicz) wrote :

Hi

I also faced dreadful "get_thread_regs failed for a lwp .." but depending on switches to jstack and whether i run my application in IDE ( eclipse based SpringSource Tools Suite) or from gnome-terminal jstack works..

Below are my observations:
- application ran from IDE, jstack <PID>
in gnome-terminal i got: "Unable to open socket file: target process not responding or HotSpot VM not loaded
The -F option can be used when the target process is not responding"

i can clearly see correct thread dump on eclipse console (sysout)

- application ran from IDE, jstack -F <PID>
in terminal i got: "Attaching to process ID 3744, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 17.0-b16
sun.jvm.hotspot.debugger.DebuggerException: sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs failed for a lwp ..."
on eclipse console (sysout/syserr) i see no stackTrace

- application ran from gnome-terminal, jstack <PID>
in terminal i got correct thread dump. application sysout/syserr is clear

- application ran from gnome-terminal, jstack -F <PID>
in terminal i got "Attaching to process ID 4265, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 17.0-b16
sun.jvm.hotspot.debugger.DebuggerException: sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs failed for a lwp ..."
application sysout/syserr is clear

Ubuntu 10.04.1 LTS

uname -a:
2.6.32-25-generic #44-Ubuntu SMP Fri Sep 17 20:05:27 UTC 2010 x86_64 GNU/Linux

java -version:
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)