[9] PING: RFC on 8165823 & 8168500: (se) EPollArrayWrapper optimization for large file descriptors
Brian Burkhalter
brian.burkhalter at oracle.com
Fri Nov 11 01:28:38 UTC 2016
On Nov 5, 2016, at 1:31 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> Changing eventsHigh to final and always initializing it to an empty HashMap should be fine. However I do think we are just guessing that the nfiles is changing dynamically, hopefully the original submitter will come back to say more about the environment.
I have re-contacted the original submitter but as yet have had no response. I was however able to reproduce the problem by modifying the LotsOfChannels test and the EPollArrayWrapper constructor to sleep at two particular places during which I executed the prlimit command as
$ prlimit --nofile=512:512 --pid PID // before EPollArrayWrapper constructed
$ sudo prlimit --nofile=2048:2048 --pid PID // at end of EPollArrayWrapper constructor after eventsHigh NOT initialized
where PID is the process ID of the Java process executing LotsOfChannels. While this does not confirm that the RLIMIT_NOFILE resource changed dynamically in the submitter’s use case, it does verify that the scenario is plausible. It would seem therefore that always initializing a final eventsHigh to an empty HashMap is a reasonable defensive solution.
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20161110/e86a68b4/attachment.html>
More information about the nio-dev
mailing list