delve: could not launch process: EOF
Please answer the following before submitting your issue:
Note: Please include any substantial examples (debug session output, stacktraces, etc) as linked gists.
- What version of Delve are you using (
dlv version
)?
Delve Debugger
Version: 1.0.0
Build: db435c184eb79976087fc0cb36c2867c737a9066
- What version of Go are you using? (
go version
)?
go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/dingwenjiang/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/dingwenjiang/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/ly/7p11f6gn5v71sspkdwx4qhgc0000gn/T/go-build573955664=/tmp/go-build -gno-record-gcc-switches -fno-common"
- What operating system and processor architecture are you using?
sw_vers
ProductName: Mac OS X
ProductVersion: 10.13.4
BuildVersion: 17E199
uname -a
Darwin dingwenjiangdeMacBook-Pro.local 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64
- What did you do?
go get -u github.com/derekparker/delve/cmd/dlv
go build -gcflags "-N -l" -a github.com/golang/example/hello
$GOPATH/bin/dlv exec hello
could not launch process: EOF
- What did you expect to see?
To dlv start a debug session
- What did you see instead?
could not launch process: EOF
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 52
- Comments: 78 (10 by maintainers)
Commits related to this issue
- proc/gdbserial: disable g command on version 902 of debugserver Fixes #1165 — committed to aarzilli/delve by aarzilli 6 years ago
- proc/gdbserial: disable g command on version 902 of debugserver The g command is bugged and causes that version of debugserver to crash. See: https://bugs.llvm.org/show_bug.cgi?id=36968 Fixes #1165 — committed to aarzilli/delve by aarzilli 6 years ago
I rollback my CommandLineTools, Temporarily solved the problem by removing new Command Line Tools $ sudo rm -rf /Library/Developer/CommandLineTools
then go to page https://developer.apple.com/download/more/ download and install previous version
Command Line Tools (macOS 10.13) for Xcode 9.2 - Dec 4, 2017
go get -u github.com/derekparker/delve/cmd/dlv
will solve this issue.For those using Homebrew like me, upgrade to the
HEAD
version:Works on 10.13.4 with latest Command Line Tools 9.3.
Same issue and same MAC OS version, just updated today.
I have a workaround.
sudo rm -rf /Library/Developer/CommandLineTools.
Go to https://developer.apple.com/download/more/ and download
Command Line Tools (macos 10.13) for XCode 9.2.
This will restore debugging until the issue gets resolved upstream.
Also had this issue when upgrading to Sierra. What worked for me (assuming you use GoLand IDE).
@Khamliuk https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_macOS_10.13_for_Xcode_9.2/Command_Line_Tools_macOS_10.13_for_Xcode_9.2.dmg
and It worked!
For anyone waiting for this patch, you can patch manually like this. Run these instructions inside of the delve package in your
$GOPATH/src/github.com/derekparker/delve
If you need to reload your shell
exec $SHELL
As I know many of the GoLand users are watching this issue, GoLand 2018.1.1 / 2017.3.4 were rolled-out with the patch from #1169. Thank you to the Delve team for the fix on this.
@姚俊兆 我没有苹果的开发者账号没办法下载那个工具… 能否给我邮箱发一份谢谢120549547@qq.com
@aarzilli I couldn’t follow those instructions for patching gdbserver.go but this seems to work:
Im on macOS High Sierra 10.13.3 and have same problem!
Here is how I fixed it for GoLang:
For me the problem started from Command Line Tools update, didn’t make update to 10.13.4 yet. So the problem is somewhere in command line tools 😕
IDEA version is 2018.1
As @levrik suggests, for VS Code you can update all of your tools via the Command Pallette. This is accessed via
CMD+Shift+P
on MacOS, search forGo: Install/Update Tools
and tick at leastdlv (Debugging)
to update delve.I’m getting this with VS Code. I tried the tip to remove latest XCode - no joy 😦
EDIT:
go get -u github.com/derekparker/delve/cmd/dlv
worked for me. It would appear VS Code doesn’t use the version brew installs@henryse, I’d appreciate if you remove the instruction.
Somebody having this problem should try adding
conn.gcmdok = false
after$GOPATH/src/github.com/derekparker/delve/pkg/proc/gdbserial/gdbserver.go:238
. If it doesn’t work, don’t post “it doesn’t work”, turn on logGdbWire and post the output.@WangChangQin Please move this thread to our tracker at https://youtrack.jetbrains.com/issues/Go but this problem should have been solved in 2018.1.1, a long time ago.
This is my step
@radugh 's suggestion looked by far the easiest to give a shot and it worked.
I didn’t touch XCode or any OS tools just ran: go get -u github.com/derekparker/delve/cmd/dlv
OS: 10.13.4
$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables package-id: com.apple.pkg.CLTools_Executables version: 9.3.0.0.1.1521514116 volume: / location: / install-time: 1525178199 groups: com.apple.FindSystemFiles.pkg-group
$ gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 9.1.0 (clang-902.0.39.2) Target: x86_64-apple-darwin17.5.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
@charnlsxy the bug was fixed in 2018.1.1, not in 2018.1. Let’s continue the discussion at https://youtrack.jetbrains.com to avoid spamming other Delve’s users, please.
@RoarkeRandall could be. My app store wants to upgrade it again but I just declined the terms and conditions when they showed up. Now it waits for manual approve.
Weird, I down graded the CLI tools like @YaoJunZhao suggested and it worked, but this morning its no longer working. I wonder if macOS automatically upgraded the cli tools again?
So I downloaded the latest master and ran a debug session and it worked fine. But the version from brew does not work.EDIT: Ok, turns out the latest does not work either. Changing p.gcmdok = true fixes the issue for me. But I have no idea what this does.
Posting logs with just logGdbWire = true
Current Version Delve Debugger Version: 1.0.0 Build: db435c184eb79976087fc0cb36c2867c737a9066
This one with p.gcmdok unmodified log_broken.txt
This one with p.gcmdok = false log_working.txt