Delve: Stub exited while attempting to connect: Segmentation Fault Error

Created on 9 Jun 2017  路  22Comments  路  Source: go-delve/delve

Please answer the following before submitting your issue:

Note: Please include any substantial examples (debug session output,
stacktraces, etc) as linked gists.

  1. What version of Delve are you using (dlv version)?
Delve Debugger
Version: 1.0.0-rc.1
Build: 
  1. What version of Go are you using? (go version)?
    go version go1.8.3 darwin/amd64
  2. What operating system and processor architecture are you using?
    macOS Sierra 10.12.5, Intel Core i7
  3. What did you do?
    Installed dev with brew and also manually. Ran vscode with debugging.
  4. What did you expect to see?
    Expected the debugging to work.
  5. What did you see instead?
2017/06/09 13:01:42 debugger.go:97: launching process with args: [/Users/alan.chua/Projects/GoWorkspace/src/github.com/alan-chua/strservice/main/debug]
could not launch process: stub exited while attempting to connect: signal: segmentation fault
Process exiting with code: 1

Most helpful comment

Okay so I pulled the command line tools from developer.apple.com. Once I installed it from there it finally works thank you!

All 22 comments

What's the output of:

stat /Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/debugserver
which lldb-server
lldb-server --version

Forstat/Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/debugserver
I get stat: No such file or directory

For which lldb-server
I get/usr/local/bin/lldb-server

For lldb-server v
I get lldb-370.0.42 Swift-3.1

Try this.

Go to /Users/alan.chua/Projects/GoWorkspace/src/github.com/alan-chua/strservice/main/ and compile your program with go build -gcflags '-N -l'. Then run:

lldb-server g :1234 -- ./yourexecutablefile

If you get a segmentation fault this is a bug with lldb and you should report it to LLVM.

Once you have done that install xcode with:

xcode-select --install

and see if delve works.

Yea it must be a bug with LLVM
after running lldb-server g :1234 -- ./main
I got Segmentation fault: 11

When I install xcode it states: Can't install the software because it is not currently available from the Software Update server.

xcode-select -p?

/Applications/Xcode.app/Contents/Developer

stat /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/debugserver

stat: No such file or directory

can you find the debugserver executable anywhere inside /Applications/Xcode.app/Contents/Developer?

Nope its not in there. There isn't even a LLDB.framework directory in Private frameworks.

You need to figure out how to install xcode's command line tools, I'm not sure why xcode-select --install isn't working for you.

I have the latest version of command line tools. I think thats why it will not let me download it.

But where are they installed?

xcode-select -p
/Applications/Xcode.app/Contents/Developer

It says it is installed here.

Okay so I pulled the command line tools from developer.apple.com. Once I installed it from there it finally works thank you!

You're welcome.

i got this error too....

Install command line tools from developer.apple.com. That should fix it.

could not launch process: fork/exec /Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/debugserver: no such file or directory

i have download from developer.apple.com,and install... even use xcode-select --install...tell me i have already installed..

but i always got the error again and again....TAT
image

by the way, i go to the folder,,i see that file!! but why ??? and i have restart vscode...not working..

$ lldb-server v
zsh: command not found: lldb-server

how to make sure lldb-server is ok??

$ lldb -version
lldb-370.0.42
Swift-3.1

If xcode-select --install is not working for you, try the method given at https://stackoverflow.com/a/44234214
Which works for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

luminacious picture luminacious  路  5Comments

ramya-rao-a picture ramya-rao-a  路  3Comments

ankur0101 picture ankur0101  路  4Comments

delaneyj picture delaneyj  路  4Comments

goen picture goen  路  5Comments