FULL PRODUCT VERSION :
1.6.14_b01
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
We are using java.nio for communication and have no caching of direct byte buffers. When testing build 1.6.0_14-ea-b01 with G1 we experienced very soon OutOfMemoryErrors:
Switching off (or: not on) G1garbage collector fixes the problem.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
NIO communication with HeapByteBuffer's
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No OutOfMemoryError
ACTUAL -
java.lang.OutOfMemoryError: Direct buffer memory
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.OutOfMemoryError: Direct buffer memory
at java.nio.Bits.reserveMemory(Bits.java:633)
at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:95)
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
at sun.nio.ch.IOUtil.write(IOUtil.java:134)
at sun.nio.ch.SocketChannelImpl.write0(SocketChannelImpl.java:365)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:388)
at de.espirit.firstspirit.server.io.GatheringWriteBuffer.write(GatheringWriteBuffer.java:34)
...
java.lang.OutOfMemoryError: Direct buffer memory
at java.nio.Bits.reserveMemory(Bits.java:633)
at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:95)
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:57)
at sun.nio.ch.IOUtil.write(IOUtil.java:69)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:334)
at de.espirit.firstspirit.server.io.DirectChannelIO.write(DirectChannelIO.java:31)
...
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Switch of (or: not on) G1 garbage collector
1.6.14_b01
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
We are using java.nio for communication and have no caching of direct byte buffers. When testing build 1.6.0_14-ea-b01 with G1 we experienced very soon OutOfMemoryErrors:
Switching off (or: not on) G1garbage collector fixes the problem.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
NIO communication with HeapByteBuffer's
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No OutOfMemoryError
ACTUAL -
java.lang.OutOfMemoryError: Direct buffer memory
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.OutOfMemoryError: Direct buffer memory
at java.nio.Bits.reserveMemory(Bits.java:633)
at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:95)
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
at sun.nio.ch.IOUtil.write(IOUtil.java:134)
at sun.nio.ch.SocketChannelImpl.write0(SocketChannelImpl.java:365)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:388)
at de.espirit.firstspirit.server.io.GatheringWriteBuffer.write(GatheringWriteBuffer.java:34)
...
java.lang.OutOfMemoryError: Direct buffer memory
at java.nio.Bits.reserveMemory(Bits.java:633)
at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:95)
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:57)
at sun.nio.ch.IOUtil.write(IOUtil.java:69)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:334)
at de.espirit.firstspirit.server.io.DirectChannelIO.write(DirectChannelIO.java:31)
...
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Switch of (or: not on) G1 garbage collector
- duplicates
-
JDK-6781363 New I/O: Update socket-channel API to jsr203/nio2-b99
-
- Resolved
-