Delve: Unable to run 'debug' on MacOS 10.12.2 due to "error waiting for thread stop" and others

Created on 27 Jan 2017  Â·  5Comments  Â·  Source: go-delve/delve

  1. What version of Delve are you using (dlv version)?

I tried three versions:

  • Latest brew install
Version: 0.12.1
Build: v0.12.1
  • git checkout and built from v0.12.1 tag:
Version: 0.12.1
Build: 449b276fe1ce7e20a0c7ffffbdd47d97f40022a1
  • git checkout of master (at d89d115ef9efb3acdb3a1052ac058b79f36a4940):
Version: 0.12.1
Build: d89d115ef9efb3acdb3a1052ac058b79f36a4940
  1. What version of Go are you using? (go version)?
go version go1.7.5 darwin/amd64
  1. What operating system and processor architecture are you using?

Darwin / Mac OS 10.12.2
2.5 GHz Intel Core i7

  1. What did you do?

Created a main.go in $GOPATH/src/github.com/itzg/hello-gworld that contained

package main

import (
    "fmt"
    "time"
)

func main() {
    fmt.Println("Hello, gworld and now I sleep")

    start := time.Now()
    time.Sleep(5 * time.Second)

    fmt.Println("I slept for ", time.Now().Sub(start))
}

and ran

$GOPATH/bin/dlv debug
  1. What did you expect to see?

Not sure since I haven't ever been able to run delve on Mac OS.

  1. What did you see instead?
➜  github.com/itzg/hello-gworld $GOPATH/bin/dlv debug
could not launch process: Process 46258 has exited with status 0
➜  github.com/itzg/hello-gworld $GOPATH/bin/dlv debug
could not launch process: could not suspend thread 10755 (ipc/send) invalid destination port (additionally could not update thread list: could not get thread count)
➜  github.com/itzg/hello-gworld $GOPATH/bin/dlv debug
could not launch process: error waiting for thread stop -268435459
➜  github.com/itzg/hello-gworld $GOPATH/bin/dlv debug
could not launch process: error waiting for thread stop -268435459

This is a continuation of #696

areproc help wanted kinbug omacOS

Most helpful comment

Same versions of go and OSX for me, but tried a slightly newer delve yesterday. I am using a company managed machine and I saw elsewhere mentions of virus scanner conflicts...perhaps that's my root cause.

All 5 comments

go version go1.8 darwin/amd64
Delve Debugger
Version: 0.12.1
Build: bb07fc36b9df2b9baec074ee8a48b1941f049f55

It works on my mac OSX 10.12.3, are both too higher versions. I have no idea : ( but still suspect the reason is compatibility between dlv and go.

Same versions of go and OSX for me, but tried a slightly newer delve yesterday. I am using a company managed machine and I saw elsewhere mentions of virus scanner conflicts...perhaps that's my root cause.

I'm seeing the same problem on a company managed Mac. I'm using the version of dlv (0.12.1) shipped with JetBrain's Gogland IDE and go 1.8.

It seems to work sporadically when I try to debug a package. It randomly alternates between working and the could not launch process: error waiting for thread stop -268435459 message.

FWIW, I'm not seeing the same problem on my personal Mac, which uses a nearly identical setup, so may be something with the managed install interfering.

Update: Apparently it's being blocked by CrowdStrike, so the managed software theory was correct.

@itzg I ignored the AV mentions before, but seeing you bring it up again I just tried quitting Kaspersky on my work laptop and suddenly it started working OS 10.12.3, go 1.7.4 and dlv 0.12.1 (from a brew install) So thanks!

The 1.0.0-rc.1 version that is bundled with IntelliJ EAP 2017.2 / Go plugin has resolved this issue for me. I am also running MacOS 10.12.5 now, so I'm not sure which of the two changes fixed it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kdeenanauth picture kdeenanauth  Â·  5Comments

antoineco picture antoineco  Â·  3Comments

goen picture goen  Â·  5Comments

primalmotion picture primalmotion  Â·  3Comments

wxqzhy picture wxqzhy  Â·  4Comments