-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
8
-
generic
-
generic
FULL PRODUCT VERSION :
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) Client VM (build 25.45-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
The Problem occurs, if a running Thread, which uses java.net.InetAddress is being interrupted by another class.
The thread is expected to throw an InterruptedException and stop its execution, but instead the interrupt() call is ignored.
The lines which are most likely responsible for this unexpected behavior are:
InetAddress.java:1391:
----------------------------------------------------------------------------
while (lookupTable.containsKey(host)) {
try {
lookupTable.wait();
} catch (InterruptedException e) {
}
}
----------------------------------------------------------------------------
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
- One thread is constantly trying to resolve an unknown host by calling InetAddress.getByName(host)
- The resolve loop stops once the thread is being interrupted by another thread.
- Now another thread calls interrupt()
- In some cases, the InterruptedException is ignored and does not lead to a stop of the loop
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Calling interrupt() on a thread is expected to trigger an InterruptedException.
ACTUAL -
The InterruptedException is being ignored.
REPRODUCIBILITY :
This bug can be reproduced occasionally.
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) Client VM (build 25.45-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
The Problem occurs, if a running Thread, which uses java.net.InetAddress is being interrupted by another class.
The thread is expected to throw an InterruptedException and stop its execution, but instead the interrupt() call is ignored.
The lines which are most likely responsible for this unexpected behavior are:
InetAddress.java:1391:
----------------------------------------------------------------------------
while (lookupTable.containsKey(host)) {
try {
lookupTable.wait();
} catch (InterruptedException e) {
}
}
----------------------------------------------------------------------------
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
- One thread is constantly trying to resolve an unknown host by calling InetAddress.getByName(host)
- The resolve loop stops once the thread is being interrupted by another thread.
- Now another thread calls interrupt()
- In some cases, the InterruptedException is ignored and does not lead to a stop of the loop
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Calling interrupt() on a thread is expected to trigger an InterruptedException.
ACTUAL -
The InterruptedException is being ignored.
REPRODUCIBILITY :
This bug can be reproduced occasionally.
- duplicates
-
JDK-8049228 Improve multithreaded scalability of InetAddress cache
-
- Resolved
-