-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8374343: Fix SIGSEGV when lib/modules is unreadable #28982
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
base: master
Are you sure you want to change the base?
Conversation
|
👋 Welcome back bulasevich! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
@bulasevich The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
AOT aside, does this scenario cause problems elsewhere? The JDK has to work with both images and interim exploded builds. I'm wondering if other parts of the runtime will assume an exploded build (and fail) if lib/modules is not accessile. |
The change is fail-fast: when lib/modules exists but is unreadable, we now report a clear error and exit cleanly instead of crashing: I checked also the interim exploded build case. With broken permissions on lib/modules, there is no SIGSEGV or undefined behavior; the runtime reports an error and exits cleanly. Let me know if you have a concrete failure scenario in mind. I will check it. |
|
To get to the point where we crash this way a lot of stuff under lib has to exist and be readable (e.g. native libs), so why is modules not readable? |
The JVM crashes with a SIGSEGV during startup if the runtime image (lib/modules) exists but is unreadable. In this scenario, ClassLoader::get_jrt_entry() returns nullptr, leading to a crash. This change adds a null check to avoid the dereference and bail out gracefully.
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28982/head:pull/28982$ git checkout pull/28982Update a local copy of the PR:
$ git checkout pull/28982$ git pull https://git.openjdk.org/jdk.git pull/28982/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28982View PR using the GUI difftool:
$ git pr show -t 28982Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28982.diff
Using Webrev
Link to Webrev Comment