Google-cloud-go: cmd/go-cloud-debug-agent: error when loading module

Created on 20 Jul 2019  路  8Comments  路  Source: googleapis/google-cloud-go

Client

Debugger

Describe Your Environment

GKE v1.12.8-gke.10
Go 1.12.6
Debugger(Latest)
Source Code: https://github.com/govargo/foo-controller
Dockerfile: https://github.com/govargo/foo-controller/blob/master/Dockerfile

Expected Behavior

I can use Stackdriver Debugger for my go binary(foo-controller).
Go binary in container runs on GKE.

Actual Behavior

It failed that Go binary in container runs on GKE.
When it runs go-cloud-debug-agent, the following error occurred.

$ /go/bin/go-cloud-debug-agent -v -sourcecontext=/source-context.json -appmodule=foo-controller -appversion=1.0 -- /foo-controller
Error loading program: AttrStmtList not present or not int64 for unit 393

Is the above error due to my binary?
Or, wrong with go build method?(https://github.com/govargo/foo-controller/blob/master/Dockerfile#L18)

It seems that the error is happend with https://github.com/googleapis/google-cloud-go/blob/master/cmd/go-cloud-debug-agent/debuglet.go#L110-L114.

However I don't know what to do so that I can solove this problem.
What should I do?

debugger question

All 8 comments

Thank you for reporting this issue @govargo!

I shall kindly page @shantuo who worked on the cloud-debug-agent to take a look.

Same problem here, same exact GC flags setup, Go 1.12.7.

Same problem here. Any clues?

Can you run the agent locally, not just on GKE? What version of Go? What build+runs commands are you using (might be different from the Dockerfile linked above)?

@tbpg I have the same problem. When I clone an example into Cloud Shell HotApp, build it without any arguments and run it with this command go-cloud-debug-agent -appmodule=main -appversion=1.0 -- main I get this error 2020/04/15 10:41:20 Error loading program: AttrStmtList not present or not int64 for unit 233

Edit:
Even if I compile it with go build -gcflags=all='-N -l' I get the same error

2020/07/07 08:00:15 Error loading program: AttrStmtList not present or not int64 for unit 535

got the same problem. @govargo have you solved this?

Just got this with Go 1.14.3 too

Closing as cmd/go-cloud-debug-agent is deprecated. The last version of Go it worked with was 1.11.

Was this page helpful?
0 / 5 - 0 ratings