From owner-freebsd-java@FreeBSD.ORG Sun Nov 13 16:10:10 2011 Return-Path: Delivered-To: freebsd-java@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46B901065674 for ; Sun, 13 Nov 2011 16:10:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 00AC88FC16 for ; Sun, 13 Nov 2011 16:10:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id pADGA9Sa082903 for ; Sun, 13 Nov 2011 16:10:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id pADGA9Cp082902; Sun, 13 Nov 2011 16:10:09 GMT (envelope-from gnats) Resent-Date: Sun, 13 Nov 2011 16:10:09 GMT Resent-Message-Id: <201111131610.pADGA9Cp082902@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-java@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stephen Sanders Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58FF41065679 for ; Sun, 13 Nov 2011 16:06:24 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 424388FC17 for ; Sun, 13 Nov 2011 16:06:24 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id pADG6ODD074311 for ; Sun, 13 Nov 2011 16:06:24 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id pADG6Owg074310; Sun, 13 Nov 2011 16:06:24 GMT (envelope-from nobody) Message-Id: <201111131606.pADG6Owg074310@red.freebsd.org> Date: Sun, 13 Nov 2011 16:06:24 GMT From: Stephen Sanders To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: java/162522: OpenJDK 6 is not setting close on exec X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2011 16:10:10 -0000 >Number: 162522 >Category: java >Synopsis: OpenJDK 6 is not setting close on exec >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-java >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Nov 13 16:10:09 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Stephen Sanders >Release: FreeBSD 8.1 >Organization: OPNET >Environment: FreeBSD focus8.networkphysics.com 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: It appears that OpenJDK does not set close on exec for file handles where Diablo did. If a process attempts to restart itself via fork/exec without closing all file handles first, it's child will fail with complaints of 'socket in use'. Of course, this depends on what the child is doing. Probably the best example is tomcat calling a shell script that restarts tomcat. This issue is hinted at in the comments of http://cr.openjdk.java.net/~ikrylov/6348631/src/os/linux/vm/os_linux.cpp.udiff.html >How-To-Repeat: Have tomcat exec a shell script that restarts tomcat. >Fix: Make sure the application closes all file handles before exec'ing a child. >Release-Note: >Audit-Trail: >Unformatted: