Hi.

I and co-worker use jstack for various trouble shooting.

We mainly use Java on Linux with AMD64 architecture.
However, jstack -F option doesn't work our platform.

I ran jstack -F with LIBSAPROC_DEBUG=1 (environment variable),
I got following messages:


/***************/
Thread 31933: (state = BLOCKED)
libsaproc DEBUG: ptrace(PTRACE_GETREGS, ...) not supported
Error occurred during stack walking:
sun.jvm.hotspot.debugger.DebuggerException: 
sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs failed for a lwp
/***************/


In order to fix this problem, I made a patch for preprocessor
macro in "agent/src/os/linux/ps_proc.c" .
The patch that attached this mail works well on Fedora 13 x86_64.

Please merge this patch if you don't fix this problem yet.


Best regards.


--- a/agent/src/os/linux/ps_proc.c      2010-11-12 05:43:12.000000000 +0900
+++ b/agent/src/os/linux/ps_proc.c      2010-11-15 13:11:35.280037045 +0900
@@ -124,6 +124,8 @@
 #ifdef _LP64
 #ifdef PTRACE_GETREGS64
 #define PTRACE_GETREGS_REQ PTRACE_GETREGS64
+#elif defined(__linux__)
+#define PTRACE_GETREGS_REQ PTRACE_GETREGS
 #endif
 #else
 #if defined(PTRACE_GETREGS) || defined(PT_GETREGS)

Reply via email to