Skip to content

[GR-64787] Enable --install-exit-handlers by default and deprecate the option. #11149

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

Merged
merged 1 commit into from
Jun 2, 2025

Conversation

graalvmbot
Copy link
Collaborator

Enable --install-exit-handlers by default and deprecate the option.

Image size increase is negligible (10 new types and 53 new methods), and there is only 2.5% extra startup instructions (68498) for "Hello, World!" on Linux.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label May 7, 2025
@graalvmbot graalvmbot force-pushed the vj/GR-64787-install-exit-handlers-by-default branch 5 times, most recently from eeab102 to 44fb8aa Compare May 12, 2025 09:04
Copy link
Collaborator

@zakkak zakkak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @vjovanov , Quarkus is already setting up its own signal handlers so we would like to have the option to disable this (at least for some transition period). Is it safe to assume -H:-InstallExitHandlers will survive at least till GraalVM for JDK 29? Thanks.


@APIOption(name = "install-exit-handlers", deprecated = "Enabled by default for executables. For shared libraries (when --shared is used), use the experimental option -H:+InstallJavaExitHandlersForSharedLibrary.")//
@Option(help = "Provide java.lang.Terminator exit handlers", deprecated = true, deprecationMessage = "Enabled by default for executables. For shared libraries (when --shared is used), use the experimental option -H:+InstallJavaExitHandlersForSharedLibrary.")//
protected static final HostedOptionKey<Boolean> InstallExitHandlers = new HostedOptionKey<>(false);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be true?

Suggested change
protected static final HostedOptionKey<Boolean> InstallExitHandlers = new HostedOptionKey<>(false);
protected static final HostedOptionKey<Boolean> InstallExitHandlers = new HostedOptionKey<>(true);

Copy link
Collaborator

@zakkak zakkak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT. Thanks @vjovanov

@zakkak
Copy link
Collaborator

zakkak commented May 22, 2025

Hi @vjovanov , Quarkus is already setting up its own signal handlers so we would like to have the option to disable this (at least for some transition period). Is it safe to assume -H:-InstallExitHandlers will survive at least till GraalVM for JDK 29? Thanks.

I did some testing and it looks like Quarkus can still override the signal handlers installed by GraalVM so this is not an issue after all, although it might still make sense to keep around for other users. Sorry for the noise.

@graalvmbot graalvmbot force-pushed the vj/GR-64787-install-exit-handlers-by-default branch 5 times, most recently from 6979770 to d9fbd00 Compare May 28, 2025 08:23
@graalvmbot graalvmbot changed the title [GR-64787] Enable --install-exit-handlers by default. [GR-64787] Enable --install-exit-handlers by default and deprecate the option. May 28, 2025
Enable `--install-exit-handlers` by default and deprecate the option.
Image size increase is negligable (10 types with 53 mehtods), and
there is only 2.5% extra starup instructions (68498) for "Hello, World!"
on Linux.

If shared libraries were using this flag, the same functionality can be
restored by using `-H:+InstallJavaExitHandlersForSharedLibrary`.
@graalvmbot graalvmbot force-pushed the vj/GR-64787-install-exit-handlers-by-default branch from d9fbd00 to 38f70ae Compare June 2, 2025 09:09
@graalvmbot graalvmbot closed this Jun 2, 2025
@graalvmbot graalvmbot deleted the vj/GR-64787-install-exit-handlers-by-default branch June 2, 2025 13:40
@graalvmbot graalvmbot merged commit d019d3d into master Jun 2, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants