FULL PRODUCT VERSION :
JDK 6.0.23, but from looking at the sources the same problem is in the head revision of java 6 and java 7 code base
ADDITIONAL OS VERSION INFORMATION :
red hat linux 4.0
A DESCRIPTION OF THE PROBLEM :
java.lang.NullPointerException
at sun.nio.ch.Util.free(Util.java:199)
at sun.nio.ch.Util.offerFirstTemporaryDirectBuffer(Util.java:176)
at sun.nio.ch.IOUtil.read(IOUtil.java:181)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:243)
This occurs when running a large proprietory grid application that is extensively using NIO. From looking at the code is appears that
the problem is in sun.io.ch.IOUtil line 172/174. Line 174 should be outside of the try block. If Util.getTemporaryBuffer() fails (e.g. due to an OOM, then the finally block is executed which would cause this exception.
We are unable to verify that this is the cause of the issue. This diagnosis is by the code inspection. We have rolled the application back to 6.0.16 and have not experienced the issue again
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
We cannot generate a test case. This occurred on an operational system running 24/7 unter heavy IO load for several days, and this exception was noted.
Due to this we cannot repoduce this locally
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
no exception should be thrown
ACTUAL -
exception reported was thrown
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.NullPointerException
at sun.nio.ch.Util.free(Util.java:199)
at sun.nio.ch.Util.offerFirstTemporaryDirectBuffer(Util.java:176)
at sun.nio.ch.IOUtil.read(IOUtil.java:181)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:243)
REPRODUCIBILITY :
This bug can be reproduced occasionally.
CUSTOMER SUBMITTED WORKAROUND :
revert to 1.6.16
Due to the sporadic nature of this issue we cannot be sure that this is a fix, or if it affects some other side effects that do not manifest the problem, but we have not seen this issue for a couple of weeks now, when is was occurring once every few days on each node in a farm