This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: FYI: gcj3.1 status update


Jeff Sturm writes:
 > On Fri, 5 Apr 2002, Andrew Haley wrote:
 > > I did, and it failed in the way I expected: it ran out of file
 > > handles.  This is because our implementation of System.gc() doesn't
 > > actually work.  Well, that's not true -- it does work eventually, but
 > > it returns before garbage collection is complete.
 > 
 > Same with runFinalization BTW, all it does it notify the finalizer thread,
 > not guarantee it has completed.
 > 
 > > This is a pretty important bug to fix, in my opinion, because it
 > > critically affects web servers.
 > 
 > That surprises me, to be honest.

I'm pretty sure that it is an issue, because the Linux kernel
engineers told me that they'd had to increase the number of available
file handles "because of Java servers."  Now, I'm guessing that this
is the cause, but it looks like a good candidate.

 > The server code I've worked with seems to rely on explicit close
 > for all fd's.  The reason has to do with more than resource
 > reclamation: it flushes the buffers and the socket close is often
 > part of the protocol handshake (e.g. HTTP response with no content
 > length nor transfer encoding).

Sure, but you also have to close local files as well as sockets.  I
take your point though.

I think I'll submit a patch for this.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]