Java memory dump issue

后端 未结 2 428
不知归路
不知归路 2021-01-16 03:37

I have tried to create a memory dump using with below code

 **/usr/lib/jvm/j2sdk1.5-sun/bin/jmap -heap 10699**

but i got below mentioned er

2条回答
  •  时光说笑
    2021-01-16 04:10

    (Assuming you're on ubuntu)

    A quick fix is echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope.

    If you want this to survive a reboot, and you don't want to compromise the protection that a restricted ptrace_scope provides, I recommend using setcap cap_sys_ptrace=eip on the binaries that require ptrace. For a java developer, you can run this command (as root)

    find /usr/lib/jvm -type f -perm -o+x -exec setcap cap_sys_ptrace=eip {} \;
    

提交回复
热议问题