JDK-7173515 : (se) Selector.open fails with OOME on Solaris when unlimited file descriptors
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris
  • CPU: generic
  • Submitted: 2012-06-01
  • Updated: 2012-08-27
  • Resolved: 2012-08-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u6Fixed 8 b43Fixed
Related Reports
Relates :  
Description
With latest Selector changes from CR 7169050 a memory capacity issue has been introduced for solaris systems that may have unlimited amount of file descriptors set.

unlimited fd's can be acheived on solaris via "ulimit -n unlimited"

With that now returning MAX_INT, memory issues arise.

java.lang.OutOfMemoryError: Requested array size exceeds VM limit
        at sun.nio.ch.DevPollArrayWrapper.<init>(DevPollArrayWrapper.java:127)
        at sun.nio.ch.DevPollSelectorImpl.<init>(DevPollSelectorImpl.java:71)
        at sun.nio.ch.DevPollSelectorProvider.openSelector(DevPollSelectorProvider.java:36)
        at IsConnectable.test(IsConnectable.java:50)
        at IsConnectable.main(IsConnectable.java:79)

Comments
EVALUATION This was found by when testing the event port based Selector. The issue is that the pending events are stored in an array that is indexed by the file descriptor but this is only feasible when the number of file descriptor is limited.
01-06-2012