Review request for 6772303
Alan Bateman
Alan.Bateman at Sun.COM
Tue Mar 24 18:12:30 UTC 2009
6772303: (se) IOException: Invalid argument" thrown on a call to
Selector.select(value) with -d64
This is Solaris and 64-bit specific. In summary, the DP_POLL ioctl used
to retrieve events from the /dev/poll driver limits the number of pollfd
entries in the poll array to the maximum number of file descriptors
minus 1. The /dev/poll Selector uses this limit or 8k (whichever is
smaller) to size its poll array. This sizing breaks for the unlimited
case on 64-bit because RLIM64_INFINITY is negative (-3) and also the
code is truncating the limit to a jint. This manifests with the select
method throwing IOException "Invalid argument". There are many ways to
fix this, one of the simplest being to treat infinity as Integer.MAX_VALUE.
The webrev is here:
http://cr.openjdk.java.net/~alanb/6772303/webrev.00/
Thanks,
Alan.
More information about the core-libs-dev
mailing list