Name: js151677 Date: 08/05/2004
FULL PRODUCT VERSION :
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
EXTRA RELEVANT SYSTEM CONFIGURATION :
Network Adapter: Intel(R) PRO/1000 MT
A DESCRIPTION OF THE PROBLEM :
I have written an application to monitor the network connectivity of several servers by "pinging" them with InetAddress.isReachable() 10 times at 10 minute intervals. It runs without flaw for approximately 5 hours, but then I recieve a ConnectException for each server I am trying to "ping." Each server has its own thread (13 in all). After 5 hours, the exception occurrs on about 5 of the 10 ping attempts. The other 5 work fine.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start 13 threads at minimum priority.
Each of these thread's run methods should be an infinite loop which tests a server's reachability with the InetAddress.isReachable() method 10 times in a row and then sleeps for 10 minutes.
EXPECTED VERSUS ACTUAL BEHAVIOR :
Application should run indefinitely without ever having any output.
An exception is thrown after executing my application for about 5 hours.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.net.ConnectException: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full
at java.net.Inet4AddressImpl.isReachable0(Native Method)
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
//This is an example of the type of thing I am doing. The problem may
// require multiple threads running this same code to produce the
// results I have seen.
for(int i=0; i < 10; i++)
InetAddress addy = InetAddress.getByName("java.sun.com");
boolean isReachable = addy.isReachable();
Thread.sleep(10 * 60 * 1000);
---------- END SOURCE ----------
(Incident Review ID: 295880)