United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4619326 : (so) Selector.wakeup() throws IOException: Resource temporarily unavailable (lnx

Details
Type:
Bug
Submit Date:
2002-01-04
Status:
Closed
Updated Date:
2002-03-28
Project Name:
JDK
Resolved Date:
2002-03-08
Component:
core-libs
OS:
linux
Sub-Component:
java.nio
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.1 (hopper)

Related Reports

Sub Tasks

Description

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) 
======================================================================

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
generic
hopper

FIXED IN:
hopper

INTEGRATED IN:
hopper

VERIFIED IN:
hopper


                                     
2004-06-14
EVALUATION

Reproducible on Solaris with a higher number of iterations. If select is never called the interrupt pipe's buffer can fill up causing this exception.
###@###.### 2002-02-19
                                     
2002-02-19



Hardware and Software, Engineered to Work Together