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

gops stopped listing my running go programs #102

Closed
prithsharma opened this issue May 10, 2020 · 8 comments
Closed

gops stopped listing my running go programs #102

prithsharma opened this issue May 10, 2020 · 8 comments

Comments

@prithsharma
Copy link

A few days ago, gops stopped listing my running go program (found this when I couldn't attach to my program for debugging in GoLand)

Any ideas on how to debug this?

@rakyll
Copy link
Collaborator

rakyll commented May 11, 2020

Is it possible for you to see if https://godoc.org/rsc.io/goversion is working with your binary?

@prithsharma prithsharma changed the title gops stopped list my running go programs gops stopped listing my running go programs May 16, 2020
@prithsharma
Copy link
Author

Right, goversion doesn't list my binary either. I can confirm that some other binaries lying in my directory from before are being listed with goversion but the binary in question (which I recently generated) is not. May be something changed on my system? what should I check?

@tklauser
Copy link
Collaborator

tklauser commented Jun 2, 2020

@prithsharma could you check whether you still see the issue with the latest gops version? If you do, could you check with which Go version your binary was compiled using both goversion <binary> (using the latest version of goversion) and go version <binary>?

@lblackstone
Copy link

lblackstone commented Feb 3, 2021

I ran into this same issue today. Here's the output from both go version and goversion:

$ go version ~/go/bin/pulumi-resource-kubernetes
/Users/levi/go/bin/pulumi-resource-kubernetes: go1.15.7

$ goversion ~/go/bin/pulumi-resource-kubernetes
/Users/levi/go/bin/pulumi-resource-kubernetes: implausible string size 13678730008574592512 for runtime.buildVersion

This is with gops v0.3.14 and goversion v1.2

I also grabbed the runtime.buildVersion using dlv like this post shows:

dlv exec ~/go/bin/pulumi-resource-kubernetes
Type 'help' for list of commands.
(dlv) b main.main
Breakpoint 1 set at 0x588b6cf for main.main() /Users/levi/go/src/github.com/pulumi/pulumi-kubernetes/provider/cmd/pulumi-resource-kubernetes/main.go:26
(dlv) p runtime.buildVersion
"go1.15.7"

@lblackstone
Copy link

lblackstone commented Feb 3, 2021

This open issue with goversion looks like the culprit: rsc/goversion#12

rsc/goversion#13 fixes the issue:

$ goversion ~/go/bin/pulumi-resource-kubernetes
/Users/levi/go/bin/pulumi-resource-kubernetes go1.15.7

lblackstone added a commit to lblackstone/gops that referenced this issue Feb 3, 2021
tklauser added a commit that referenced this issue May 4, 2022
Use package debug/buildinfo [1] introduced in Go 1.18 [2] when possible.
This should avoid previous issues with rsc.io/goversion where Go
processes were no longer listed.

[1] https://pkg.go.dev/debug/buildinfo
[2] https://go.dev/doc/go1.18#debug/buildinfo

For #102
For #159
For #160
tklauser added a commit that referenced this issue May 4, 2022
Use package debug/buildinfo [1] introduced in Go 1.18 [2] when possible.
This should avoid previous issues with rsc.io/goversion where Go
processes were no longer listed.

[1] https://pkg.go.dev/debug/buildinfo
[2] https://go.dev/doc/go1.18#debug/buildinfo

For #102
For #159
For #160
@tklauser
Copy link
Collaborator

tklauser commented May 4, 2022

I think #166 should fix this issues, at least when building gops using Go 1.18.

@prithsharma @lblackstone could you please check whether gops built from latest master branch using Go 1.18 works as expected for you?

@lblackstone
Copy link

@lblackstone could you please check whether gops built from latest master branch using Go 1.18 works as expected for you?

Yes, this appears to be working as expected now. Thanks!

@tklauser
Copy link
Collaborator

tklauser commented May 6, 2022

@lblackstone Thanks for confirming!

@tklauser tklauser closed this as completed May 6, 2022
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

No branches or pull requests

4 participants