United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7173515 (se) Selector.open fails with OOME on Solaris when unlimited file descriptors
JDK-7173515 : (se) Selector.open fails with OOME on Solaris when unlimited file descriptors

Details
Type:
Bug
Submit Date:
2012-06-01
Status:
Closed
Updated Date:
2012-08-27
Project Name:
JDK
Resolved Date:
2012-08-27
Component:
core-libs
OS:
solaris
Sub-Component:
java.nio
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:

Related Reports
Backport:
Relates:

Sub Tasks

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.
                                     
2012-06-01



Hardware and Software, Engineered to Work Together