Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Closed non-blocking SocketChannel never cleaned up. File Descriptor leak

843790Jan 18 2008 — edited Oct 27 2008
I have a small Java program using non-blocking ChannelSocket and it leaks File descriptors (Sockets never closed) as described in bug 6215050

I have tested on the following:
Linux RHEL 4 2.6.9-5.EL Sun JDK 1.5.0_11
Linux RHEL 4 Sun JDK 1.6.0_04
Linux RHEL 4 Bea JRockit 1.6.0_02
Ubuntu Linux 7.10 server 2.6.22-14 Bea JRockit 1.6.0_02
all with the same result.

I have tested a great number of suggested work arounds without success.
The socketChannel.socket().setKeepAlive(true); seems to make the number of "pipe" file descriptors less, but the problem remains and eventually the process stops.

Is this a Linux problem or Java problem?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 24 2008
Added on Jan 18 2008
3 comments
300 views