go-delve / delve

Delve is a debugger for the Go programming language.
MIT License
22.38k stars 2.13k forks source link

layer=dap runtime error: protocol error E32 during register write for packet $P10 #3667

Closed flyzard closed 4 months ago

flyzard commented 4 months ago
  1. What version of Delve are you using (dlv version)? Version: 1.22.0
  2. What version of Go are you using? (go version)? go version go1.22.0 darwin/amd64
  3. What operating system and processor architecture are you using? MacOS Sonoma 14.4, 2,3 GHz Quad-Core Intel Core i7
  4. What did you do? Updated the macOS and golang version
  5. What did you expect to see? To have the debugging still working
  6. What did you see instead? While running dlv debug I can set a breakpoint, but when I do c I get Command failed: protocol error E32 during register write for packet $P10. On doing n I get no source available. It's not possible to debug on vscode, I get error layer=dap runtime error: protocol error E32 during register write for packet $P10=0030ef0a0000000....

go env:

GO111MODULE='on'
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/felizardoj/Library/Caches/go-build'
GOENV='/Users/felizardoj/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/felizardoj/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/felizardoj/go/'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/Cellar/go/1.22.0/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/Cellar/go/1.22.0/libexec/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.22.0'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/felizardoj/code/vaultManagment/vaultapp/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/tl/m1wb49l16g7_kyx5dsx_plf00000gr/T/go-build2414299556=/tmp/go-build -gno-record-gcc-switches -fno-common'

Please let me know which information I can add more. I really need to get this working. I did already try the go 1.21 version and the corresponding dlv, but still does not work. Could this be a issue with the macOS? If so, I would assume much more issues would have been reported by now...

aarzilli commented 4 months ago

A lot of people experienced problems after updating to Sonoma that were resolved by deleting and reinstalling XCode (although they presented differently from this): #3641

flyzard commented 4 months ago

A lot of people experienced problems after updating to Sonoma that were resolved by deleting and reinstalling XCode (although they presented differently from this): #3641

Hey @aarzilli, thanks for the quick feedback!

What I did was a minor update (14.3 -> 14.4). It was running on Sonoma already without problems. I deleted the CommandLineTools and reinstalled them, with no result.

Maybe is worth to mention I did upgrade the macOS to Version 14.4 Beta (23E5196e).

Is there someone with the same issue?

kangkangv5 commented 4 months ago

I have the same problem What version of Delve are you using (dlv version)? Version: 1.22.0 What version of Go are you using? (go version)? go version go1.22.0 darwin/amd64

Stopped at: 0x1126c1000 => 1: no source available Command failed: protocol error E32 during register write for packet $P10=00106c120100000...

aarzilli commented 4 months ago

This problem should be reported to Apple: debugserver is unable to set registers.

flyzard commented 4 months ago

Most likely, it is the new beta version of MacOS's fault. I just updated it and I got a different error:

(dlv) break cmd/main.go:31
Breakpoint 1 set at 0x113ce60f for main.main() ./cmd/main.go:31
(dlv) c
2024/02/21 09:58:30 no such file or directory
Process 7739 has exited with status 1

Codespaces to the rescue...

m0zgen commented 4 months ago

@aarzilli thanks for you recommendation about of debugserver is unable to set registers, I sent yesterday to Apple this information from Feedback Assistant and today Apple released new macOS release with fixed this issue.

@flyzard this problem solved in the latest (at current time, today released) - macOS Sonoma 14.4 Beta 5 Release

System Software Overview from my macOS:

flyzard commented 4 months ago

@aarzilli thanks for you recommendation about of debugserver is unable to set registers, I sent yesterday to Apple this information from Feedback Assistant and today Apple released new macOS release with fixed this issue.

@flyzard this problem solved in the latest (at current time, today released) - macOS Sonoma 14.4 Beta 5 Release

System Software Overview from my macOS:

  • System Version: macOS 14.4 (23E5211a)
  • Kernel Version: Darwin 23.4.0

Thanks @m0zgen ! I can confirm that, all good to go. Unfortunately, for some other languages, it still have some issues…