OutOfMemory Direct buffer memory with enabled JVM flag DisableExplicitGC

Your rating: None Average: 5 (3 votes)

issue will be fixed with 7.8.2 

server gets unresponisve and must be restarted

 Symptoms:

Server response: 

java.lang.OutOfMemoryError: Direct buffer memory
at java.nio.Bits.reserveMemory(Bits.java:658)
at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:123)
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:306)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.obtainDirectByteBuffer(TCPNIOTransport.java:1207)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.writeGathered(TCPNIOTransport.java:1111)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.write(TCPNIOTransport.java:1026)
at org.glassfish.grizzly.nio.transport.TCPNIOTemporarySelectorWriter.writeNow0(TCPNIOTemporarySelectorWriter.java:65)
at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorWriter.write0(TemporarySelectorWriter.java:167)
at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorWriter.write(TemporarySelectorWriter.java:118)
at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorWriter.write(TemporarySelectorWriter.java:77)
at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorWriter.write(TemporarySelectorWriter.java:58)
at org.glassfish.grizzly.http.server.OXTCPNIOTransportFilter.handleWrite(OXTCPNIOTransportFilter.java:210)
at org.glassfish.grizzly.filterchain.TransportFilter.handleWrite(TransportFilter.java:191)
at org.glassfish.grizzly.filterchain.ExecutorResolver$8.execute(ExecutorResolver.java:111)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:265)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134

Root cause:
 "-XX:+DisableExplicitGC" option caused "java.lang.OutOfMemoryError: Direct buffer memory"
due to Java Bug #8142537 ( https://bugs.openjdk.java.net/browse/JDK-8142537 )

Solution:  

Remove "-XX:+DisableExplicitGC" JVM argument from ox-scriptconf.sh file 

Open-Xchange AG | Impressum