java/162522: OpenJDK 6 is not setting close on exec
Stephen Sanders
ssanders at softhammer.net
Sun Nov 13 16:10:10 UTC 2011
>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 at 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:
More information about the freebsd-java
mailing list