Name: nt126004 Date: 01/03/2002
FULL PRODUCT VERSION :
java version "1.4.0-beta3"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta3-b84)
Java HotSpot(TM) Client VM (build 1.4.0-beta3-b84, mixed mode)
FULL OPERATING SYSTEM VERSION :
RedHat Linux 7.1 (Linux Kernel 2.4.2-2)
A DESCRIPTION OF THE PROBLEM :
After 4096 calls to a Selector instance's wakeup method, subsequent
calls to the instance's wakeup method throw an IOException with the
message "Resource temporarily unavailable".
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Make a Selector, call wakeup() on it 4096 times, and then call wakeup() on
it again.
EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected Result: no exception thrown, no output
Actual Result:
exception thrown, stack trace dumped
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "main" java.io.IOException: Resource temporarily
unavailable
at sun.nio.ch.PollArrayWrapper.interrupt(Native Method)
at sun.nio.ch.PollArrayWrapper.interrupt(PollArrayWrapper.java:101)
at sun.nio.ch.AbstractPollSelectorImpl.wakeup(AbstractPollSelectorImpl.java:56)
at SelectorRepeatedWakeupTest.main(SelectorRepeatedWakeupTest.java:7)
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.nio.channels.*;
public class
SelectorRepeatedWakeupTest {
public static void main( String[] args ) throws Exception {
Selector selector = Selector.open();
for( int i = 0; i < 4097; i++ ) {
selector.wakeup();
}
}
}
---------- END SOURCE ----------
(Review ID: 137664)
======================================================================