-
Bug
-
Resolution: Fixed
-
P4
-
5.0u12, 5.0u15
-
b55
-
x86, sparc
-
solaris_9, solaris_10
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2178799 | 6u18 | Alan Bateman | P4 | Resolved | Fixed | b01 |
On a SunFire X4200 (4 x 2593 MHz, 8192 MB) with Solaris 10:
$ cat /etc/release
Solaris 10 8/07 s10x_u4wos_12b X86
Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 16 August 2007
the following application will throw an exception on the call to Selector's select() when the application is launched with the -d64 flag. This problem is systematically reproduced on one machine (the one described above - remulac) and it never happens on other platforms or on the same one but using the -d32 flag.
--0<- bug.java --0<---0<---0<---0<---0<---0<---0<---0<--
import java.io.*;
import java.nio.channels.Selector;
class bug {
public static void main(String[] arg) {
Selector selector = null;
try {
System.out.println("Opening selector");
selector = Selector.open();
System.out.println("Waiting on selector");
selector.select(2000);
System.out.println("Waited 2000 ms");
System.out.println("Closing selector");
selector.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
--0<---0<---0<---0<---0<---0<---0<---0<---0<--
This is what happens:
$ java -d64 bug
Opening selector
Waiting on selector
java.io.IOException: Invalid argument
at sun.nio.ch.DevPollArrayWrapper.poll0(Native Method)
at sun.nio.ch.DevPollArrayWrapper.poll(DevPollArrayWrapper.java:164)
at sun.nio.ch.DevPollSelectorImpl.doSelect(DevPollSelectorImpl.java:68)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
at bug.main(bug.java:14)
$ cat /etc/release
Solaris 10 8/07 s10x_u4wos_12b X86
Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 16 August 2007
the following application will throw an exception on the call to Selector's select() when the application is launched with the -d64 flag. This problem is systematically reproduced on one machine (the one described above - remulac) and it never happens on other platforms or on the same one but using the -d32 flag.
--0<- bug.java --0<---0<---0<---0<---0<---0<---0<---0<--
import java.io.*;
import java.nio.channels.Selector;
class bug {
public static void main(String[] arg) {
Selector selector = null;
try {
System.out.println("Opening selector");
selector = Selector.open();
System.out.println("Waiting on selector");
selector.select(2000);
System.out.println("Waited 2000 ms");
System.out.println("Closing selector");
selector.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
--0<---0<---0<---0<---0<---0<---0<---0<---0<--
This is what happens:
$ java -d64 bug
Opening selector
Waiting on selector
java.io.IOException: Invalid argument
at sun.nio.ch.DevPollArrayWrapper.poll0(Native Method)
at sun.nio.ch.DevPollArrayWrapper.poll(DevPollArrayWrapper.java:164)
at sun.nio.ch.DevPollSelectorImpl.doSelect(DevPollSelectorImpl.java:68)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
at bug.main(bug.java:14)
- backported by
-
JDK-2178799 (se) IOException: Invalid argument" thrown on a call to Selector.select(value) with -d64
-
- Resolved
-
- duplicates
-
JDK-6782668 (se) IOException: Invalid argument" thrown on a call to Selector.select(value) with -d64
-
- Closed
-