SUGGESTED FIX
diff -r ff0a9e50f033 src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java
--- a/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java Mon Mar 30 19:22:27 2009 +0100
+++ b/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java Tue Mar 31 21:09:42 2009 +0100
@@ -77,7 +77,7 @@ class DevPollArrayWrapper {
private long pollArrayAddress;
// Maximum number of POLL_FD structs to update at once
- private int MAX_UPDATE_SIZE = 10000;
+ private int MAX_UPDATE_SIZE = Math.min(OPEN_MAX, 10000);
DevPollArrayWrapper() {
int allocationSize = NUM_POLLFDS * SIZE_POLLFD;
|
EVALUATION
The /dev/poll driver limits the number of pollfd structs that can be written to the driver in a single batch to the maximum number of file descriptors. The Selector implementation, on the other hand, limits the number of updates in a single batch to 10000. By default the maximum number of file descriptors is 64k so this is not a problem. In this customer's case, the limit is 2048 so >2048 updates will cause the exception in the description.
|