Created attachment 801679 [details] Patch to fix problem. During testing netty.io with many concurrent connections one of our users reported a NullPointerException which was thrown by sun.nio.ch.EPollArrayWrapper.setUpdateEvents(...). This was observed as soon as the concurrent connection count > 64 * 1024. After more investigating I was able to find the bug in EPollArrayWrapper.setUpdateEvents(...), which is a regression introduced by the following change: http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/rev/017bd924a3c8 The problem here is that eventsHigh.get(key) will be called once the fd is > 64 * 1024. This may return "null" which is compared to KILLED (which is of type byte) and so may throw a NPE because the compare tries to unbox the return value (which is of type Byte). The regression is present in lastest openjdk8 and in openjdk7u40 and later. It seems to also affects oracle jdk 7u40. All OS'es that use epoll are affected, in my case linux (ubuntu). Attached you find the proposed fix for openjdk8 and openjdk7 and a reproducer which can be used. The fix does two things: * Eliminate the access to the eventsHigh Map if "force" is true. * Check for null before try to compare the stored events value For more details and a reproducer see: http://mail.openjdk.java.net/pipermail/nio-dev/2013-September/002284.html
Created attachment 801680 [details] Changeset with test-cases to fix the problem
Fix added to 2.4: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.4/jdk?cmd=changeset;node=bdced30f70e9
We will fix this with the next CPU. Assigning to Jiri.
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle. Changing version to '22'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
This is in both OpenJDK 7 & 8 for nearly three years, so can be closed as CURRENTLRELEASE for java-1.8.0-openjdk.