-
Bug
-
Resolution: Fixed
-
P3
-
6u2
-
b21
-
generic
-
solaris
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2152506 | 6u4 | Chris Hegarty | P4 | Closed | Fixed | b04 |
JDK-2152774 | 5.0u14 | Sean Coffey | P3 | Closed | Fixed | b02 |
FULL PRODUCT VERSION :
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)
This issue is also reproducible with Java SE 5, and Open JDK 7 b18.
ADDITIONAL OS VERSION INFORMATION :
Solaris 10, but should be reproducible on any unix system.
EXTRA RELEVANT SYSTEM CONFIGURATION :
MUST run as root. You must be root to have priviliges to create raw sockets
over which to send the ICMP ECHO. If you are not root then this problem
cannot be reproduced.
A DESCRIPTION OF THE PROBLEM :
A java process that continuously loops for a reachable host will impact on the
timeout of another java process that is in an isReachable call. That is, the
call can be observed to not timeout after the said timeout time has elapsed.
REPRODUCIBILITY :
This bug can be reproduced always.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
With root priviliges run:
# java Loop <a reachable host>
# java TimeoutTest <an unreachable host, e.g. 1.1.1.1>
TimeoutTest will never exit!
---------- BEGIN SOURCE ----------
/**
* Loop.java
*/
class Loop {
public static void main(String[] args) throws Exception {
InetAddress addr = InetAddress.getByName(args[0]);
while( true ) {
addr.isReachable(1000);
}
}
}
/**
* TimeoutTest.java
*/
class TimeoutTest {
public static void main(String[] args) throws Exception {
InetAddress addr = InetAddress.getByName(args[0]);
System.out.println("Start (timeout 5sec)");
if (addr.isReachable(5000)) {
System.out.println("isReachable() : true");
} else {
System.out.println("isReachable() : false");
}
System.out.println("Finish");
}
}
---------- END SOURCE ----------
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)
This issue is also reproducible with Java SE 5, and Open JDK 7 b18.
ADDITIONAL OS VERSION INFORMATION :
Solaris 10, but should be reproducible on any unix system.
EXTRA RELEVANT SYSTEM CONFIGURATION :
MUST run as root. You must be root to have priviliges to create raw sockets
over which to send the ICMP ECHO. If you are not root then this problem
cannot be reproduced.
A DESCRIPTION OF THE PROBLEM :
A java process that continuously loops for a reachable host will impact on the
timeout of another java process that is in an isReachable call. That is, the
call can be observed to not timeout after the said timeout time has elapsed.
REPRODUCIBILITY :
This bug can be reproduced always.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
With root priviliges run:
# java Loop <a reachable host>
# java TimeoutTest <an unreachable host, e.g. 1.1.1.1>
TimeoutTest will never exit!
---------- BEGIN SOURCE ----------
/**
* Loop.java
*/
class Loop {
public static void main(String[] args) throws Exception {
InetAddress addr = InetAddress.getByName(args[0]);
while( true ) {
addr.isReachable(1000);
}
}
}
/**
* TimeoutTest.java
*/
class TimeoutTest {
public static void main(String[] args) throws Exception {
InetAddress addr = InetAddress.getByName(args[0]);
System.out.println("Start (timeout 5sec)");
if (addr.isReachable(5000)) {
System.out.println("isReachable() : true");
} else {
System.out.println("isReachable() : false");
}
System.out.println("Finish");
}
}
---------- END SOURCE ----------
- backported by
-
JDK-2152774 InetAddress.isReachable(timeout) may not return after timout milliseconds
- Closed
-
JDK-2152506 InetAddress.isReachable(timeout) may not return after timout milliseconds
- Closed