title: jstack not working on server
body: <p>We use jstack on servers to detect if java apps are getting deadlocked.  It's not working on one of our Linux servers. I think O/S version is:</p>
  
  <pre><code>$cat /etc/issue.net
  Red Hat Enterprise Linux Server release 5.6 (Tikanga)
  Kernel \r on an \m
  </code></pre>
  
  <p>Java version running on server: </p>
  
  <pre><code>java version "1.6.0_24"
  Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
  Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
  </code></pre>
  
  <p>When I try:</p>
  
  <pre><code>jstack 19114
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>19114: 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
  </code></pre>
  
  <p>When I try:</p>
  
  <pre><code>jstack -F 19114
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>Attaching to process ID 19114, please wait...
  Debugger attached successfully.
  
  Deadlock Detection:
  
  No deadlocks found.
  
  Thread 19180: (state = BLOCKED)
  Error occurred during stack walking:
  sun.jvm.hotspot.debugger.DebuggerException: sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs failed for a lwp
          at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal$LinuxDebuggerLocalWorkerThread.execute(LinuxDebuggerLocal.java:152)
          at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.getThreadIntegerRegisterSet(LinuxDebuggerLocal.java:466)
          at sun.jvm.hotspot.debugger.linux.LinuxThread.getContext(LinuxThread.java:65)
          at sun.jvm.hotspot.runtime.linux_amd64.LinuxAMD64JavaThreadPDAccess.getCurrentFrameGuess(LinuxAMD64JavaThreadPDAccess.java:92)
          at sun.jvm.hotspot.runtime.JavaThread.getCurrentFrameGuess(JavaThread.java:256)
          at sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:218)
          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)
  Caused by: sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs failed for a lwp
          at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.getThreadIntegerRegisterSet0(Native Method)
          at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.access$800(LinuxDebuggerLocal.java:51)
          at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal$1GetThreadIntegerRegisterSetTask.doit(LinuxDebuggerLocal.java:460)
          at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal$LinuxDebuggerLocalWorkerThread.run(LinuxDebuggerLocal.java:127)
  </code></pre>
  
  <p>Anyone know what is causing this?</p>