Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Nov 2011 16:06:24 GMT
From:      Stephen Sanders <ssanders@softhammer.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   java/162522: OpenJDK 6 is not setting close on exec
Message-ID:  <201111131606.pADG6Owg074310@red.freebsd.org>
Resent-Message-ID: <201111131610.pADGA9Cp082902@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111131606.pADG6Owg074310>