Restore legacy Go version detection for binaries built w/ 1.11 and earlier#2225
Merged
ddelnano merged 3 commits intopixie-io:mainfrom Jul 9, 2025
Conversation
…rlier Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
713465d to
dc549f4
Compare
oazizi000
approved these changes
Jul 9, 2025
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
b648e83 to
443daa3
Compare
ddelnano
added a commit
to k8sstormcenter/pixie
that referenced
this pull request
Feb 25, 2026
…rlier (pixie-io#2225) Summary: Restore legacy Go version detection for binaries built w/ 1.11 and earlier This PR reintroduces our original Go version detection logic as a fallback mechanism for edge cases. This was previously removed because it was the source of several bugs: 1. It caused huge memory allocations for 32-bit binaries 2. It didn't work for Go 1.20.5 and later We migrated the version detection to an implementation that was introduced in Go 1.12, supports 32 and 64 bit binaries and is aligned with the Go toolchain. While it's unlikely that end users are running 32 bit, pre Go 1.12 binaries, our existing [ProductCatalogServiceTraceTest.Basic](https://github.com/pixie-io/pixie/blob/3cc2cc19f5a15619d41d59a88b35037f20bcea88/src/stirling/source_connectors/socket_tracer/http2_trace_bpf_test.cc#L186-L190) test case does. I opted to test the 32-bit case's failure instead of fixing it because I believe fixing it will require more extensive testing on the eBPF side. The memory allocations are guaranteed to be bounded now, so this is safe. Relevant Issues: pixie-io#2210 Type of change: /kind bugfix Test Plan: Existing and new test cases pass --------- Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
ddelnano
added a commit
to k8sstormcenter/pixie
that referenced
this pull request
Feb 25, 2026
…rlier (pixie-io#2225) Summary: Restore legacy Go version detection for binaries built w/ 1.11 and earlier This PR reintroduces our original Go version detection logic as a fallback mechanism for edge cases. This was previously removed because it was the source of several bugs: 1. It caused huge memory allocations for 32-bit binaries 2. It didn't work for Go 1.20.5 and later We migrated the version detection to an implementation that was introduced in Go 1.12, supports 32 and 64 bit binaries and is aligned with the Go toolchain. While it's unlikely that end users are running 32 bit, pre Go 1.12 binaries, our existing [ProductCatalogServiceTraceTest.Basic](https://github.com/pixie-io/pixie/blob/3cc2cc19f5a15619d41d59a88b35037f20bcea88/src/stirling/source_connectors/socket_tracer/http2_trace_bpf_test.cc#L186-L190) test case does. I opted to test the 32-bit case's failure instead of fixing it because I believe fixing it will require more extensive testing on the eBPF side. The memory allocations are guaranteed to be bounded now, so this is safe. Relevant Issues: pixie-io#2210 Type of change: /kind bugfix Test Plan: Existing and new test cases pass --------- Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary: Restore legacy Go version detection for binaries built w/ 1.11 and earlier
This PR reintroduces our original Go version detection logic as a fallback mechanism for edge cases. This was previously removed because it was the source of several bugs:
We migrated the version detection to an implementation that was introduced in Go 1.12, supports 32 and 64 bit binaries and is aligned with the Go toolchain. While it's unlikely that end users are running 32 bit, pre Go 1.12 binaries, our existing ProductCatalogServiceTraceTest.Basic test case does.
I opted to test the 32-bit case's failure instead of fixing it because I believe fixing it will require more extensive testing on the eBPF side. The memory allocations are guaranteed to be bounded now, so this is safe.
Relevant Issues: #2210
Type of change: /kind bugfix
Test Plan: Existing and new test cases pass