2012-12-13 2 views

답변

10

당신은 권한이없는 경우 jstack -F 실패 시도하고 JVM의 데이터에 액세스 할 수있는 ptrace(2) 시스템 호출을 사용하기 때문이다 다음 ptrace(2) man에서

$ strace -e all -f jstack -F 26846 
... 
[pid 27653] ptrace(PTRACE_ATTACH, 26846, 0, 0) = -1 EPERM (Operation not permitted) 
... 

:

EPERM The specified process cannot be traced. This could be because the parent 
     has insufficient privileges (the required capability is CAP_SYS_PTRACE); 
     unprivileged processes cannot trace processes that they cannot send 
     signals to or those running set-user-ID/set-group-ID programs, for obvious 
     reasons. Alternatively, the process may already be being traced, or be 
     init(8) (PID 1). 

도 참조하십시오. capabilities(7). sudo을 사용하면 CAP_SYS_PTRACE을 포함한 루트 기능을 사용할 수 있습니다.

관련 문제