Skip to content

[GR-64787] Enable --install-exit-handlers by default. #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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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);

vjovanov added 2 commits May 16, 2025 16:47
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 61e8e67 to 65ad0eb Compare May 16, 2025 14:53
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.

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