delve: Ubuntu, could not launch process: fork/exec ./debug: operation not permitted
I’m on Ubuntu 14.04 and I am not sure what I’m doing wrong to get this error when I run dlv debug:
could not launch process: fork/exec ./debug: operation not permitted
I’m simply following the instructions at: https://github.com/derekparker/delve/wiki/Building#linux
vscode@9d24dfa15aab:~$ cd $GOPATH/src/golang.org/x/tools/cmd/gorename/
vscode@9d24dfa15aab:~/go/src/golang.org/x/tools/cmd/gorename$ go get -v -u github.com/peterh/liner github.com/derekparker/delve/cmd/dlv
github.com/peterh/liner (download)
github.com/derekparker/delve (download)
vscode@9d24dfa15aab:~/go/src/golang.org/x/tools/cmd/gorename$ ls -al $GOPATH/bin/dlv
-rwxr-xr-x 1 vscode vscode 15499304 Apr 26 19:32 /home/vscode/go/bin/dlv
vscode@9d24dfa15aab:~/go/src/golang.org/x/tools/cmd/gorename$ dlv debug
could not launch process: fork/exec ./debug: operation not permitted
vscode@9d24dfa15aab:~/go/src/golang.org/x/tools/cmd/gorename$ go version
go version go1.6.2 linux/amd64
vscode@9d24dfa15aab:~/go/src/golang.org/x/tools/cmd/gorename$ dlv version
Delve Debugger
Version: 0.11.0-alpha
Build:
vscode@9d24dfa15aab:~/go/src/golang.org/x/tools/cmd/gorename$ uname -a
Linux 9d24dfa15aab 4.4.6 #1 SMP Mon Apr 18 19:18:15 UTC 2016 x86_64 GNU/Linux
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (5 by maintainers)
Alright, so you’re running within a Docker container. Docker has security settings preventing
ptrace(2)operations by default with in the container. Pass--security-opt=seccomp:unconfinedtodocker runwhen starting.I ran into this and it took awhile for my google search to find this. Is there a way dlv can know that it’s running into this particular error and output a helpful hint?
since i run in a managed k8s pod I have no access to docker launch param , is there any other way to debug ?