Skip to content

v0.22.0 is not built properly for arm64 #2399

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

Open
RonFed opened this issue Jun 2, 2025 · 2 comments · May be fixed by #2400 or #2411
Open

v0.22.0 is not built properly for arm64 #2399

RonFed opened this issue Jun 2, 2025 · 2 comments · May be fixed by #2400 or #2411
Labels
bug Something isn't working

Comments

@RonFed
Copy link
Contributor

RonFed commented Jun 2, 2025

Following #1962, the Dockerfile was changed to run the generate and build command without using the Makefile. This cause the TARGETARCH env var to not get propagated to the go build command - hence the image was effictively built only for amd64.
Since our e2e test were changed to only run as go tests - this was not tested (since our k8s tests were removed).

Running the v0.22.0 image on arm results in:

{"time":"2025-06-02T11:18:54.487189595Z","level":"INFO","source":{"function":"main.(*ProcessPoller).Poll","file":"/usr/src/go.opentelemetry.io/auto/cli/process_poller.go","line":69},"msg":"Polling for process","binary":"/app/odigos-ui","interval":2000000000}
{"time":"2025-06-02T11:18:56.499045596Z","level":"INFO","source":{"function":"main.(*ProcessPoller).Poll","file":"/usr/src/go.opentelemetry.io/auto/cli/process_poller.go","line":92},"msg":"process found","PID":21}
{"time":"2025-06-02T11:18:56.500363554Z","level":"INFO","source":{"function":"main.main","file":"/usr/src/go.opentelemetry.io/auto/cli/main.go","line":138},"msg":"building OpenTelemetry Go instrumentation ...","version":{"Release":"v0.22.0","Revision":"unknown","Go":{"Version":"go1.24.3","OS":"linux","Arch":"amd64"}}}
{"time":"2025-06-02T11:18:56.512250846Z","level":"INFO","source":{"function":"main.main","file":"/usr/src/go.opentelemetry.io/auto/cli/main.go","line":161},"msg":"building OpenTelemetry Go instrumentation ...","PID":21,"version":{"Release":"v0.22.0","Revision":"unknown","Go":{"Version":"go1.24.3","OS":"linux","Arch":"amd64"}}}
{"time":"2025-06-02T11:18:56.561809971Z","level":"ERROR","source":{"function":"main.main","file":"/usr/src/go.opentelemetry.io/auto/cli/main.go","line":169},"msg":"failed to create instrumentation","error":"error while scanning instructions: failed to decode x64 instruction at offset 52: unrecognized instruction"}
@MrAlias
Copy link
Contributor

MrAlias commented Jun 16, 2025

I'm not following how #1962 changed the behavior of the TARGETARCH var. Prior to that PR the makefile did not set a default value either. As shown in the changed files the scope of setting GOARCH=$TARGETARCH didn't change.

How did #1962 cause the TARGETARCH value to not get propagated to the go build command?

@MrAlias
Copy link
Contributor

MrAlias commented Jun 16, 2025

How did #1962 cause the TARGETARCH value to not get propagated to the go build command?

$ go env GOARCH
amd64

$ GOARCH=arm64 go env GOARCH && go env GOARCH
arm64
amd64

https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/1962/files#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R24-R28

@MrAlias MrAlias linked a pull request Jun 16, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants