Review request for 6772303 (original) (raw)

Xueming Shen Xueming.Shen at Sun.COM
Fri Mar 27 15:58:04 UTC 2009


looks good, approved.

Alan Bateman wrote:

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 DPPOLL 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 RLIM64INFINITY 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.MAXVALUE. The webrev is here: http://cr.openjdk.java.net/~alanb/6772303/webrev.00/ Thanks, Alan.



More information about the core-libs-dev mailing list