Attaching to process 29139 Could not attach to process.
生活随笔
收集整理的這篇文章主要介紹了
Attaching to process 29139 Could not attach to process.
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
docker container中gdb調試程序,報錯:
Attaching to process 29139 Could not attach to process. If your uid matches the uid of the target process,
check the setting of /proc/sys/kernel/yama/ptrace_scope, or try again as the root user. For more details,
see /etc/sysctl.d/10-ptrace.conf ptrace: Operation not permitted.
原因是docker中做了限制,ptrace限制?
需要加上--cap-add=SYS_PTRACE --security-opt seccomp=unconfined,例如:
docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -it docker鏡像 bash
如果不是docker環境,可能需要
/etc/sysctl.d/10-ptrace.conf中的值由1改為0sysctl -p
?
總結
以上是生活随笔為你收集整理的Attaching to process 29139 Could not attach to process.的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python测试之道第5章模拟网络请求
- 下一篇: 【C#】C#对电子邮件的收发操作