Documentation Contents
Java Platform, Standard Edition Troubleshooting Guide
Contents    Previous    Next

Signals Used in Oracle Solaris and Linux

Table 7-2 Signals Used on Oracle Solaris and Linux

Signal Description

SIGSEGV, SIGBUS, SIGFPE, SIGPIPE, SIGILL

These signals are used in the implementation for implicit null check, and so forth.

SIGQUIT

This signal is used to dump Java stack traces to the standard error stream. (Optional)

SIGTERM, SIGINT, SIGHUP

These signals are used to support the shutdown hook mechanism (java.lang.Runtime.addShutdownHook) when the VM is terminated abnormally. (Optional)

SIGUSR1

This signal is used in the implementation of the java.lang.Thread.interrupt method. Not used starting with Oracle Solaris 10 reserved on Linux. (Configurable)

SIGUSR2

This signal is used internally. Not used starting with Oracle Solaris 10 operating system. (Configurable)

SIGABRT

The HotSpot VM does not handle this signal. Instead it calls the abort function after fatal error handling. If an application uses this signal then it should terminate the process to preserve the expected semantics.


Signals tagged as "optional" are not used when the -Xrs option is specified to reduce signal usage. With this option fewer signals are used, although the VM installs its own signal handler for essential signals such as SIGSEGV. Specifying this option means that the shutdown hook mechanism will not execute if the process receives a SIGQUIT, SIGTERM, SIGINT, or SIGHUP. Shutdown hooks will execute, as expected, if the VM terminates normally (that is, when the last non-daemon thread completes or the System.exit method is invoked).

On Oracle Solaris 8 and 9 operating system, signals tagged as "configurable" are substituted when the -XX:+UseAltSigs option is specified to use alternative signals. Starting with Oracle Solaris 10 operating system, this option is ignored, as the operating system reserves two additional signals (called SIGJVM1 and SIGJVM2).

On Linux, the handler for SIGUSR1 cannot be overridden. SIGUSR2 is used to implement suspend and resume. However it is possible to specify an alternative signal to be used instead of SIGUSR2. This is done by specifying the _JAVA_SR_SIGNUM environment variable. If this environment variable is set, it must be set to a value larger than the maximum of SIGSEGV and SIGBUS.

Contents    Previous    Next

Oracle and/or its affiliates Copyright © 1993, 2017, Oracle and/or its affiliates. All rights reserved.
Contact Us