-
Notifications
You must be signed in to change notification settings - Fork 1k
Check glibc version at startup and abort if below 2.28 #9560
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
anumukul
wants to merge
2
commits into
hyperledger:main
Choose a base branch
from
anumukul:fix-9551-glibc-version-check
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR - I hadn't seen it until just now.
besu-native is not required for non-mainnet uses of besu, and that is the root of the glibc requirement. Bouncycastle provides a pure-java implementation of most of the crypto libraries necessary. We should not make a specific version glibc a hard requirement for startup. This could break alpine linux for example, which uses musl rather than glibc.
Ideally, we would make the glibc check in the besu startup script, that way it can be trivially bypassed for non-standard but otherwise valid configurations. Also, it should be only required for ethereum mainnet configurations that have a hard requirement of the besu-native implementation. see NativeRequirement.java
If we want to keep the loading checks in besu java, perhaps we can move this into the ValidateConfigSubcommand and call it from the startup script to assert loading is successful.
It is going to be a bit tricky to make and keep up-to-date the assertion about glibc version, since it is dependent on the platform building besu-native, which at the time of writing is ubuntu-22.04. But I think moving the startup check into a subcommand and modifying the besu startup script to execute the subcommand would be a great place to add this safety/clarity - it is flexible enough to be useful and bypassable, and is open to extension in the future.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reiterating comments I made on the issue, I think we should be treating this as an actionable error message enhancement, rather than changing the startup behavior of besu.
We should not hard-require glibc or a specific version of it for besu to startup, but rather should make error messages from NativeRequirement reference a configuration validation subcommand that can provide a more detailed error regarding glibc minimum version, if it is not present, and the native libraries are required by the specified configuration.