Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command failed: Internal debugger error: assignment to entry in nil map #3114

Closed
jibinpt-stripe opened this issue Aug 20, 2022 · 1 comment · Fixed by #3115
Closed

Command failed: Internal debugger error: assignment to entry in nil map #3114

jibinpt-stripe opened this issue Aug 20, 2022 · 1 comment · Fixed by #3115

Comments

@jibinpt-stripe
Copy link

Please answer the following before submitting your issue:

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

If this is about source listing not showing up (or breakpoints not being
accepted) while running in a container please read our
FAQ
first.

  1. What version of Delve are you using (dlv version)?
    Delve Debugger Version: 1.9.0 Build: $Id: 69310c2f438e492f892d6af22e8e62c8ea1e9d8d $
  2. What version of Go are you using? (go version)?
    go version go1.19 darwin/arm64
  3. What operating system and processor architecture are you using?
    MacOS Monterey V12.5
  4. What did you do?
    /Applications/GoLand.app/Contents/plugins/go/lib/dlv/macarm/dlv --listen=127.0.0.1:55934 --api-version=2 --check-go-version=false --only-same-user=false exec <path to Bazel generated debug executable> --

(dlv) b server.TestMain
9. What did you expect to see? Expected to set debug point
11. What did you see instead?
(dlv) b server.TestMain Command failed: Internal debugger error: assignment to entry in nil map runtime.gopanic (0x1049951e3) /opt/homebrew/Cellar/go/1.19/libexec/src/runtime/panic.go:884 runtime.mapassign_fast64 (0x1049721a7) /opt/homebrew/Cellar/go/1.19/libexec/src/runtime/map_fast64.go:95 github.com/go-delve/delve/service/debugger.createLogicalBreakpoint (0x104cab307) /Users/jibinpt/go/pkg/mod/github.com/go-delve/delve@v1.9.1-0.20220817070253-cb9150963052/service/debugger/debugger.go:739 github.com/go-delve/delve/service/debugger.(*Debugger).CreateBreakpoint (0x104caae7f) /Users/jibinpt/go/pkg/mod/github.com/go-delve/delve@v1.9.1-0.20220817070253-cb9150963052/service/debugger/debugger.go:700 github.com/go-delve/delve/service/rpc2.(*RPCServer).CreateBreakpoint (0x104d0eba7) /Users/jibinpt/go/pkg/mod/github.com/go-delve/delve@v1.9.1-0.20220817070253-cb9150963052/service/rpc2/server.go:259 reflect.Value.call (0x104a201a7) /opt/homebrew/Cellar/go/1.19/libexec/src/reflect/value.go:584 reflect.Value.Call (0x104a1f92f) /opt/homebrew/Cellar/go/1.19/libexec/src/reflect/value.go:368 github.com/go-delve/delve/service/rpccommon.(*ServerImpl).serveJSONCodec.func2 (0x104dcfea7) /Users/jibinpt/go/pkg/mod/github.com/go-delve/delve@v1.9.1-0.20220817070253-cb9150963052/service/rpccommon/server.go:342 github.com/go-delve/delve/service/rpccommon.(*ServerImpl).serveJSONCodec (0x104dcf533) /Users/jibinpt/go/pkg/mod/github.com/go-delve/delve@v1.9.1-0.20220817070253-cb9150963052/service/rpccommon/server.go:344 runtime.goexit (0x1049c5df3) /opt/homebrew/Cellar/go/1.19/libexec/src/runtime/asm_arm64.s:1165

aarzilli added a commit to aarzilli/delve that referenced this issue Aug 21, 2022
The logical breakpoints map was created as a side effect of
createUnrecoveredPanicBreakpoint or createFatalThrowBreakpoint, however
with an executable with incomplete debug info (that must be incomplete
in just the right way) both will fail and the logical breakpoint map
will never be created.

It's unknown how such an executable could be created, one easy way is
to debug a non-go executable.

Fixes go-delve#3114
@aarzilli
Copy link
Member

The PR solves the internal debugger error (which is a bug), but your executable has incomplete debug info and you probably won't be able to do any meaningful debugging on it either way. You should review your bazel configuration.

derekparker pushed a commit that referenced this issue Aug 22, 2022
The logical breakpoints map was created as a side effect of
createUnrecoveredPanicBreakpoint or createFatalThrowBreakpoint, however
with an executable with incomplete debug info (that must be incomplete
in just the right way) both will fail and the logical breakpoint map
will never be created.

It's unknown how such an executable could be created, one easy way is
to debug a non-go executable.

Fixes #3114
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants