United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4785154 VM uselessly traps SIGCHLD on Linux (cleanup)
JDK-4785154 : VM uselessly traps SIGCHLD on Linux (cleanup)

Details
Type:
Bug
Submit Date:
2002-11-26
Status:
Closed
Updated Date:
2012-10-08
Project Name:
JDK
Resolved Date:
2003-06-21
Component:
hotspot
OS:
linux_redhat_4.0,linux
Sub-Component:
runtime
CPU:
itanium,x86,generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.3.1_09,1.4.2,1.4.2_05
Fixed Versions:
5.0 (b05)

Related Reports
Backport:
Duplicate:
Duplicate:
Relates:

Sub Tasks

Description
On both i486 and ia64 Linux the runtime code traps SIGCHLD and handles it as
follows:

  /* from os_linux_i486.cpp; ia64 code is identical */
  if (sig == SIGCHLD) {
    // cleanup zombie pid for child thread
    ::waitpid(-1, 0, WNOHANG);
    return 1;
  }

This test, and the corresponding setup of the signal handler to catch SIGCHLD,
serve no purpose and should be removed.  (See 4763362 for details.)

-- ###@###.### 2002/11/26

                                    

Comments
EVALUATION

The problem has been fixed in J2SE workspace by bug 4763362. The only
thing left is a cleanup to remove the SIGCHLD code from JVM_handle_linux_signal.
It is harmless after 4763362, will fix in Tiger.

###@###.### 2003-01-15

Fixed by removing SIGCHLD handling from JVM.

###@###.### 2003-04-12

-----------------------------

The fix for 4763362 is not complete, it only solves the problem in Java code,
same problem still exists in JNI code until this bug is fixed in 1.5. There 
has been two bugs recently filed against JVM (4945203 and 4954748). This is 
no longer a simple clean-up as we thought before.

CTE, please consider backporting the fix from 1.5. Returning incorrect
return value after a fork() or system() call is very bad.

###@###.### 2003-11-17
                                     
2003-11-17
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger

FIXED IN:
tiger

INTEGRATED IN:
tiger-b05


                                     
2004-06-14
SUGGESTED FIX

Yes, http://raq.sfbay.sun.com/~huanghui/webrev/20030410/src/os_cpu/linux_i486/vm/os_linux_i486.cpp.diff.html
*** 120,135 *** is related to the fix

and also http://raq.sfbay.sun.com/~huanghui/webrev/20030410/src/os/linux/vm/os_linux.cpp.diff.html
*** 1636,1648 ***
                                     
2005-08-29



Hardware and Software, Engineered to Work Together