-
Bug
-
Resolution: Duplicate
-
P5
-
None
-
1.3.1
-
sparc
-
solaris_8
Name: gm110360 Date: 02/01/2003
FULL PRODUCT VERSION :
$ java -version
java version "1.3.1_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_06-b01)
Java HotSpot(TM) Client VM (build 1.3.1_06-b01, mixed mode)
FULL OPERATING SYSTEM VERSION :
SunOS 5.8 Generic_108528-04 sun4u sparc SUNW,Ultra-5_10
EXTRA RELEVANT SYSTEM CONFIGURATION :
JDK 1.3.1_04, JDK 1.3.1_05, and JDK 1.3.1_06 have this problem.
JDK 1.3.1_03 and below do not.
A DESCRIPTION OF THE PROBLEM :
I have determined that this "SIGINT" problem was introduced
in JDK 1.3.1_04 and exists in _05 and _06 also. Beginning
with JDK 1.3.1_04, the JVM catches and exits when this
signal is received as can be seen with truss(1) as follows:
25006: lwp_sigredirect(5, SIGINT, 0xFF00FC4C) = 0
25006: Received signal #2, SIGINT, in poll() [caught]
...
25006: munmap(0xFE300000, 524288) = 0
25006: munmap(0xFB000000, 33554432) = 0
25006: llseek(0, 0, SEEK_CUR) = 0
25006: _exit(130)
In the prior release (1.3.1_03), this signal was ignored as
can be seen with truss(1):
24848: signotifywait() = 2
24848: lwp_sigredirect(5, SIGINT, 0xFF00FC4C) = 0
24848: Received signal #2, SIGINT, in poll() [ignored]
This can be seen by using the Solaris Bourne shell and
starting a background java process with 1.3.1_06. Next,
simply type CTRL-C (INTR) in the command window. The bourne
shell will signal the JVM with SIGINTR and it will exit
without any error message.
REGRESSION. Last worked in version 1.3.1
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Open a bourne shell on Solaris Sparc
2. Start a java process in the background (e.g. java
SleepServer &
3. Type CTRL-C (INTR) in the command window.
EXPECTED VERSUS ACTUAL BEHAVIOR :
Until JDK 1.3.1_04, this would not cause the process to
exit. It now does.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
SleepServer.java
-------------------------
public class SleepServer
{
public static void main(String[] args)
{
while(true)
{
System.out.println("I am sleeping ...");
}
}
}
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
Use nohup to launch the background process and then "exit"
the parent shell to prevent signals from the parent.
or
Use /bin/ksh instead of /bin/sh
Release Regression From : 1.3.1_03
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Review ID: 180451)
======================================================================
- duplicates
-
JDK-4784574 background java process dies by CTRL-C on starting shell
-
- Closed
-