dev@glassfish.java.net

File Descriptor leak in GlassFish

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Thu, 02 Feb 2006 13:11:57 -0500

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:

+ Grizzly
+ ORB
+ AsyncStartup

any more? I recommend that affected module update the bug as soon as
they update their code.

Thanks

-- Jeanfrancois