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

(*LineTable).funcName() causes panic: runtime error: slice bounds out of range [795306342:43562440] #3650

Closed
keisku opened this issue Jan 25, 2024 · 3 comments · Fixed by #3678

Comments

@keisku
Copy link

keisku commented Jan 25, 2024

Please answer the following before submitting your issue:

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

#3549 seems to introduce this panic because (*LineTable).funcName() didn't exist at v1.21.0 source code.

See https://gist.github.com/keisku/a217ce1d3772617c48b3fd1bbcfe03fe for more detail of this issue.

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.22.0
Build: efaf5523d8425267f379f4efab8e3144620a0a40
  1. What version of Go are you using? (go version)?
go version
go version go1.21.6 linux/amd64
  1. What operating system and processor architecture are you using?
uname -a
Linux ip-10-0-133-150 6.2.0-1017-aws #17~22.04.1-Ubuntu SMP Fri Nov 17 21:07:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
  1. What did you do? See the gist above.
  2. What did you expect to see? No panic as dlv v1.21.0
  3. What did you see instead?
@aarzilli
Copy link
Member

@derekparker I think this might be a problem with gore.

@derekparker
Copy link
Member

I will start taking a look at this issue today.

@keisku
Copy link
Author

keisku commented Mar 2, 2024

FYI:

When this commit is head, this issue caused.

$ git switch --detach f32818c9e36e6c6e84a07131c08f994ee38fa156
Previous HEAD position was 4a72c523 pkg/proc: remove usage of gore dependency (#3664)
HEAD is now at f32818c9 cmd/dlv: fix --continue with unix domain sockets (#3658)

Since #3664 was merged, this issue have not been caused.

$ git switch --detach 4a72c523bed853ceed7bee6272d4c84641fc3b1e
Previous HEAD position was f32818c9 cmd/dlv: fix --continue with unix domain sockets (#3658)
HEAD is now at 4a72c523 pkg/proc: remove usage of gore dependency (#3664)

aarzilli added a commit to aarzilli/delve that referenced this issue Mar 3, 2024
Adds a recover to the functions reading debug info from the go runtime
data structures for stripped executables.

This function is best-effort and can sometimes fail in weird ways,
instead of crashing recover any panic and turn them into errors.

Fixes go-delve#3650
derekparker pushed a commit that referenced this issue Mar 4, 2024
…3678)

Adds a recover to the functions reading debug info from the go runtime
data structures for stripped executables.

This function is best-effort and can sometimes fail in weird ways,
instead of crashing recover any panic and turn them into errors.

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

Successfully merging a pull request may close this issue.

3 participants