JDK-6494722 : SA: jstack throws get_thread_regs failed for lwp debugger exception.
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 5.0u8
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2006-11-16
  • Updated: 2010-04-03
  • Resolved: 2007-06-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0u14 b01Fixed
Description
On linux 2.6.9 the latest 5.0 update version of jstack throws debugger exception.

Thread 26023: (state = BLOCKED)
Error occurred during stack walking:
sun.jvm.hotspot.debugger.DebuggerException: sun.jvm.hotspot.debugger.DebuggerExc
eption: get_thread_regs failed for a lwp
       at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal$LinuxDebuggerLocalWo
rkerThread.execute(LinuxDebuggerLocal.java:134)
       at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.getThreadIntegerRegi
sterSet(LinuxDebuggerLocal.java:437)
       at sun.jvm.hotspot.debugger.linux.LinuxThread.getContext(LinuxThread.java
:48)
       at sun.jvm.hotspot.runtime.linux_x86.LinuxX86JavaThreadPDAccess.getCurren
tFrameGuess(LinuxX86JavaThreadPDAccess.java:75)
       at sun.jvm.hotspot.runtime.JavaThread.getCurrentFrameGuess(JavaThread.jav
a:252)
       at sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.jav
a:211)
       at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:50)
       at sun.jvm.hotspot.tools.JStack.run(JStack.java:41)
       at sun.jvm.hotspot.tools.Tool.start(Tool.java:204)
       at sun.jvm.hotspot.tools.JStack.main(JStack.java:58)
Caused by: sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs failed fo
r a lwp


One of sun customer is facing this problem and would like this bug
to be fixed in 5.0 update release.

Comments
EVALUATION This problem is not same as seen with bug id 6359295. I turned on LIBSAPROC_DEBUG to see what is happening. The problem is on linux 2.6.9 the SA is not able to get all threads information. There are couple of falures. One ptrace(PEEKDATA) on address 0x958a00 is failing and td_ta_new() call is failing. The address passed to ptrace is not a valid address in the process. So this address is not valid so it is failing. Need further investigation to see what that address corresponds to and also investigate why td_ta_new() call is failing. This problem is seen only with 5.0 update release and not reproducible with 6.0 java.
16-11-2006