dev@glassfish.java.net

Re: File Descriptor leak in GlassFish

From: Ken Cavanaugh <Ken.Cavanaugh_at_Sun.COM>
Date: Thu, 02 Feb 2006 10:29:17 -0800

On Thu, 2006-02-02 at 10:11, Jeanfrancois Arcand wrote:
> Hi,
>
> GlassFish is currently suffering a file descriptor leak:
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6380347 [not yet
> available outside :-(]
>
> The problem is related to a VM bug:
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6215050
>
> fixed in Mustang, There is a workaround described here
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4726957
>
> WORKAROUND :
> -use Socket.shutdownOutput() and shutdownInput() instead of
> close(). The former results in a FIN segment.
> -use "new Socket(..)" instead of SocketChannel.open(..) if
> non-blocking IO is not needed
> -don't use setSoTimeout() if not needed
>
> This means that all modules that manipulate sockets needs to evaluate if
> the worksaround can be implemented. The components affected are:
>

Let me ask the obvious question: can we get this fixed in the
JDK, and then recommend the appropriate version of the JDK
for the various SJSAS releases?

This seems to have been well understood since around 7/2002,
so I'm a bit surprised (only a little; I know how hard it is
to get to every bug that is worth fixing) that this has
lingered for so long.

Ken.