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: issue with ServerSocket::accept


Simon wrote:

I think I've just run into the same bug when trying to compile the Apache.org XML-RPC library. Just creating a 'Webserver' (one of the supplied classes that nicely handles XML-RPC requests) is sufficient to cause the problem. The symptoms are that the sockets don't appear to be being closed properly, so are hanging around, and in 20 minutes or so, the program dies from lack of available file descriptors (per-process limit set to 1024 on the machine). It doesn't happen with the usual javac classes.


I've heard vague rumours of this problem with some Apache.org code before. I have not yet seen a test case to reproduce it, however, and I'd like to understand it better. Is it possible that the WebServer class never calls close() on its sockets, and instead relies on the finalizers to clean them up, or something like that? A simple ServerSocket test case I wrote didn't have any problems with file descriptors as long as I called close() on them when finished.

Regards

Bryce


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