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

There is a compatibility issue with older versions of google.golang.org/genproto/googleapis/rpc/status in the offset_results.json file #1226

Open
bittercookie opened this issue Oct 29, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@bittercookie
Copy link

The google.golang.org/genproto/googleapis/rpc/status is defined within the google.golang.org/genproto package. Although it is included by the google.golang.org/grpc package during program compilation, there is no explicit definition of the google.golang.org/genproto version. However, as google.golang.org/genproto is a dependency, its version information is included in the Go ELF binary file at compile time and can be retrieved by parsing Go module data.

Starting from google.golang.org/grpc v1.15.0, go.mod was introduced, so regardless of when the source code is compiled, the version pulled in is fixed.

However, for binaries compiled with google.golang.org/grpc v1.8.0 - v1.14.0, due to the lack of a go.mod file, the actual version of google.golang.org/genproto pulled in during compilation is the latest release at that time.

For example:
If an application requiring google.golang.org/grpc v1.14.0 is compiled in 2024, the version pulled in might be google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38.
If the same code is compiled in 2023, the version pulled in might be google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98.

This can lead to mismatches in the offsets of google.golang.org/genproto/googleapis/rpc/status between offset_results.json and the actual binary for grpc v1.8.0 - v1.14.0.

Consider the following suggestions please:

  1. Retain the google.golang.org/genproto/googleapis/rpc/status version definition in the google.golang.org/grpc group, but set the offset values for v1.8.0 - v1.14.0 to null to ensure that incorrect offsets aren’t read at runtime.

  2. Move the version definition for google.golang.org/genproto/googleapis/rpc/status to a new google.golang.org/genproto group, allowing the correct offsets to be obtained using the version information from google.golang.org/genproto.

@bittercookie bittercookie added the enhancement New feature or request label Oct 29, 2024
@damemi damemi self-assigned this Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants