java.lang.OutOfMemoryError

Oracle Community | KannanKanagaraj | 4 months ago
  1. 0

    OOME when tried to launch an html file

    YouTrack | 2 years ago
    java.lang.OutOfMemoryError
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    I get this errors constantly in my server when a web connection is interrupted from the browser for instance: 11:50:45,301 ERROR [stderr] (default task-339) Exception in thread "default task-339" java.nio.BufferOverflowException 11:50:45,301 ERROR [stderr] (default task-339) at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:363) 11:50:45,301 ERROR [stderr] (default task-339) at java.nio.ByteBuffer.put(ByteBuffer.java:859) 11:50:45,301 ERROR [stderr] (default task-339) at io.undertow.util.HttpString.appendTo(HttpString.java:204) 11:50:45,301 ERROR [stderr] (default task-339) at io.undertow.server.protocol.http.HttpResponseConduit.processWrite(HttpResponseConduit.java:150) 11:50:45,301 ERROR [stderr] (default task-339) at io.undertow.server.protocol.http.HttpResponseConduit.flush(HttpResponseConduit.java:629) 11:50:45,301 ERROR [stderr] (default task-339) at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.flush(AbstractFixedLengthStreamSinkConduit.java:205) 11:50:45,301 ERROR [stderr] (default task-339) at org.xnio.conduits.ConduitStreamSinkChannel.flush(ConduitStreamSinkChannel.java:162) 11:50:45,301 ERROR [stderr] (default task-339) at io.undertow.channels.DetachableStreamSinkChannel.flush(DetachableStreamSinkChannel.java:100) 11:50:45,301 ERROR [stderr] (default task-339) at io.undertow.server.HttpServerExchange.closeAndFlushResponse(HttpServerExchange.java:1489) 11:50:45,317 ERROR [stderr] (default task-339) at io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1470) 11:50:45,317 ERROR [stderr] (default task-339) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:201) 11:50:45,317 ERROR [stderr] (default task-339) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727) 11:50:45,317 ERROR [stderr] (default task-339) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 11:50:45,317 ERROR [stderr] (default task-339) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 11:50:45,317 ERROR [stderr] (default task-339) at java.lang.Thread.run(Thread.java:745) And then, I think this errors lead to a OutOfMemory crash: 14:23:09,592 ERROR [org.xnio.listener] (default I/O-3) XNIO001007: A channel event listener threw an exception: java.lang.OutOfMemoryError at sun.misc.Unsafe.allocateMemory(Native Method) [rt.jar:1.8.0_20] at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:127) [rt.jar:1.8.0_20] at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311) [rt.jar:1.8.0_20] at org.xnio.BufferAllocator$2.allocate(BufferAllocator.java:57) [xnio-api-3.2.2.Final.jar:3.2.2.Final] at org.xnio.BufferAllocator$2.allocate(BufferAllocator.java:55) [xnio-api-3.2.2.Final.jar:3.2.2.Final] at org.xnio.ByteBufferSlicePool.allocate(ByteBufferSlicePool.java:149) [xnio-api-3.2.2.Final.jar:3.2.2.Final] at org.xnio.ssl.JsseSslConduitEngine.<init>(JsseSslConduitEngine.java:143) [xnio-api-3.2.2.Final.jar:3.2.2.Final] at org.xnio.ssl.JsseSslStreamConnection.<init>(JsseSslStreamConnection.java:71) [xnio-api-3.2.2.Final.jar:3.2.2.Final] at org.xnio.ssl.JsseAcceptingSslStreamConnection.accept(JsseAcceptingSslStreamConnection.java:45) [xnio-api-3.2.2.Final.jar:3.2.2.Final] at org.xnio.ssl.JsseAcceptingSslStreamConnection.accept(JsseAcceptingSslStreamConnection.java:37) [xnio-api-3.2.2.Final.jar:3.2.2.Final] at org.xnio.ssl.AbstractAcceptingSslChannel.accept(AbstractAcceptingSslChannel.java:187) [xnio-api-3.2.2.Final.jar:3.2.2.Final] at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:289) [xnio-api-3.2.2.Final.jar:3.2.2.Final] at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286) [xnio-api-3.2.2.Final.jar:3.2.2.Final] at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.2.2.Final.jar:3.2.2.Final] at org.xnio.ChannelListeners$DelegatingChannelListener.handleEvent(ChannelListeners.java:1092) [xnio-api-3.2.2.Final.jar:3.2.2.Final] at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.2.2.Final.jar:3.2.2.Final] at org.xnio.nio.NioTcpServerHandle.handleReady(NioTcpServerHandle.java:53) [xnio-nio-3.2.2.Final.jar:3.2.2.Final] at org.xnio.nio.WorkerThread.run(WorkerThread.java:539) [xnio-nio-3.2.2.Final.jar:3.2.2.Final] This is the trace for version 8.2 of WildFly: 17:17:16,957 ERROR [io.undertow.request] (default task-49) Undertow request failed HttpServerExchange{ GET /modulab/servlet/ShowPDFReportServlet}: java.nio.BufferOverflowException at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:363) [rt.jar:1.8.0_20] at java.nio.ByteBuffer.put(ByteBuffer.java:859) [rt.jar:1.8.0_20] at io.undertow.util.HttpString.appendTo(HttpString.java:204) at io.undertow.server.protocol.http.HttpResponseConduit.processWrite(HttpResponseConduit.java:166) at io.undertow.server.protocol.http.HttpResponseConduit.write(HttpResponseConduit.java:564) at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.write(AbstractFixedLengthStreamSinkConduit.java:106) at org.xnio.conduits.Conduits.writeFinalBasic(Conduits.java:132) [xnio-api-3.3.0.Final.jar:3.3.0.Final] at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.writeFinal(AbstractFixedLengthStreamSinkConduit.java:175) at org.xnio.conduits.ConduitStreamSinkChannel.writeFinal(ConduitStreamSinkChannel.java:104) [xnio-api-3.3.0.Final.jar:3.3.0.Final] at io.undertow.channels.DetachableStreamSinkChannel.writeFinal(DetachableStreamSinkChannel.java:194) at io.undertow.server.HttpServerExchange$WriteDispatchChannel.writeFinal(HttpServerExchange.java:1829) at io.undertow.servlet.spec.ServletOutputStreamImpl.writeBufferBlocking(ServletOutputStreamImpl.java:565) at io.undertow.servlet.spec.ServletOutputStreamImpl.close(ServletOutputStreamImpl.java:600) at io.undertow.servlet.spec.HttpServletResponseImpl.closeStreamAndWriter(HttpServletResponseImpl.java:497) at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpServletResponseImpl.java:581) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:308) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_20] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_20] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_20] 10:57:12,389 ERROR [org.xnio.listener] (default I/O-4) XNIO001007: A channel event listener threw an exception: java.lang.OutOfMemoryError at sun.misc.Unsafe.allocateMemory(Native Method) [rt.jar:1.8.0_20] at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:127) [rt.jar:1.8.0_20] at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311) [rt.jar:1.8.0_20] at org.xnio.BufferAllocator$2.allocate(BufferAllocator.java:57) [xnio-api-3.3.0.Final.jar:3.3.0.Final] at org.xnio.BufferAllocator$2.allocate(BufferAllocator.java:55) [xnio-api-3.3.0.Final.jar:3.3.0.Final] at org.xnio.ByteBufferSlicePool.allocate(ByteBufferSlicePool.java:143) [xnio-api-3.3.0.Final.jar:3.3.0.Final] at org.xnio.ssl.JsseSslConduitEngine.<init>(JsseSslConduitEngine.java:146) [xnio-api-3.3.0.Final.jar:3.3.0.Final] at org.xnio.ssl.JsseSslStreamConnection.<init>(JsseSslStreamConnection.java:71) [xnio-api-3.3.0.Final.jar:3.3.0.Final] at org.xnio.ssl.JsseAcceptingSslStreamConnection.accept(JsseAcceptingSslStreamConnection.java:45) [xnio-api-3.3.0.Final.jar:3.3.0.Final] at org.xnio.ssl.JsseAcceptingSslStreamConnection.accept(JsseAcceptingSslStreamConnection.java:37) [xnio-api-3.3.0.Final.jar:3.3.0.Final] at org.xnio.ssl.AbstractAcceptingSslChannel.accept(AbstractAcceptingSslChannel.java:187) [xnio-api-3.3.0.Final.jar:3.3.0.Final] at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:289) [xnio-api-3.3.0.Final.jar:3.3.0.Final] at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286) [xnio-api-3.3.0.Final.jar:3.3.0.Final] at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.3.0.Final.jar:3.3.0.Final] at org.xnio.ChannelListeners$DelegatingChannelListener.handleEvent(ChannelListeners.java:1092) [xnio-api-3.3.0.Final.jar:3.3.0.Final] at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.3.0.Final.jar:3.3.0.Final] at org.xnio.nio.NioTcpServerHandle.handleReady(NioTcpServerHandle.java:53) [xnio-nio-3.3.0.Final.jar:3.3.0.Final] at org.xnio.nio.WorkerThread.run(WorkerThread.java:539) [xnio-nio-3.3.0.Final.jar:3.3.0.Final]

    JBoss Issue Tracker | 2 years ago | Carlos Rodríguez Aguado
    java.lang.OutOfMemoryError

    7 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.OutOfMemoryError

      No message provided

      at sun.misc.Unsafe.allocateMemory()
    2. Java RT
      ByteBuffer.allocateDirect
      1. sun.misc.Unsafe.allocateMemory(Native Method)
      2. java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:127)
      3. java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
      3 frames
    3. com.oracle.common
      WrapperBufferManager.acquireSum
      1. com.oracle.common.io.BufferManagers$DirectManagerHolder$1.allocate(BufferManagers.java:213)
      2. com.oracle.common.internal.io.SlabBufferManager$SlabSegment$Slab.ensure(SlabBufferManager.java:397)
      3. com.oracle.common.internal.io.SlabBufferManager$SlabSegment.allocateGenerationBuffers(SlabBufferManager.java:121)
      4. com.oracle.common.internal.io.SegmentedBufferManager$Segment.allocateGeneration(SegmentedBufferManager.java:804)
      5. com.oracle.common.internal.io.SegmentedBufferManager$Segment.acquireComplex(SegmentedBufferManager.java:758)
      6. com.oracle.common.internal.io.SegmentedBufferManager$Segment.acquire(SegmentedBufferManager.java:544)
      7. com.oracle.common.internal.io.SegmentedBufferManager.ensureBuffer(SegmentedBufferManager.java:365)
      8. com.oracle.common.internal.io.SegmentedBufferManager.acquireSum(SegmentedBufferManager.java:188)
      9. com.oracle.common.internal.io.WrapperBufferManager.acquireSum(WrapperBufferManager.java:58)
      9 frames
    4. com.tangosol.internal
      BufferSequenceWriteBufferPool.allocate
      1. com.tangosol.internal.io.BufferSequenceWriteBufferPool.allocate(BufferSequenceWriteBufferPool.java:59)
      1 frame
    5. com.tangosol.io
      WrapperBufferOutput.writeSafeUTF
      1. com.tangosol.io.MultiBufferWriteBuffer.addBuffer(MultiBufferWriteBuffer.java:1140)
      2. com.tangosol.io.MultiBufferWriteBuffer$MultiBufferOutput.advance(MultiBufferWriteBuffer.java:873)
      3. com.tangosol.io.MultiBufferWriteBuffer$MultiBufferOutput.write(MultiBufferWriteBuffer.java:517)
      4. com.tangosol.io.AbstractWriteBuffer$AbstractBufferOutput.writeBytes(AbstractWriteBuffer.java:656)
      5. com.tangosol.io.AbstractWriteBuffer$AbstractBufferOutput.writeUTF(AbstractWriteBuffer.java:932)
      6. com.tangosol.io.AbstractWriteBuffer$AbstractBufferOutput.writeSafeUTF(AbstractWriteBuffer.java:758)
      7. com.tangosol.io.WrapperBufferOutput.writeSafeUTF(WrapperBufferOutput.java:242)
      7 frames
    6. com.tangosol.util
      ExternalizableHelper.writeStringArray
      1. com.tangosol.util.ExternalizableHelper.writeUTF(ExternalizableHelper.java:1198)
      2. com.tangosol.util.ExternalizableHelper.writeSafeUTF(ExternalizableHelper.java:1356)
      3. com.tangosol.util.ExternalizableHelper.writeStringArray(ExternalizableHelper.java:1422)
      3 frames
    7. com.tangosol.coherence
      StorageManagerModel.writeExternal
      1. com.tangosol.coherence.component.net.management.model.localModel.StorageManagerModel.writeExternal(StorageManagerModel.CDB:5)
      1 frame
    8. com.tangosol.util
      ExternalizableHelper.writeObject
      1. com.tangosol.util.ExternalizableHelper.writeExternalizableLite(ExternalizableHelper.java:2294)
      2. com.tangosol.util.ExternalizableHelper.writeObject(ExternalizableHelper.java:2684)
      2 frames
    9. com.tangosol.coherence
      Connector$Register.writeExternal
      1. com.tangosol.coherence.component.net.management.Connector$Register.writeExternal(Connector.CDB:15)
      1 frame
    10. com.tangosol.util
      ExternalizableHelper.writeObject
      1. com.tangosol.util.ExternalizableHelper.writeExternalizableLite(ExternalizableHelper.java:2294)
      2. com.tangosol.util.ExternalizableHelper.writeObject(ExternalizableHelper.java:2684)
      2 frames
    11. com.tangosol.io
      DefaultSerializer.serialize
      1. com.tangosol.io.DefaultSerializer.serialize(DefaultSerializer.java:47)
      1 frame
    12. com.tangosol.coherence
      Daemon.run
      1. com.tangosol.coherence.component.util.daemon.queueProcessor.Service.writeObject(Service.CDB:1)
      2. com.tangosol.coherence.component.net.Message.writeObject(Message.CDB:1)
      3. com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.InvocationService$InvocationMessage.write(InvocationService.CDB:3)
      4. com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.serializeMessage(Grid.CDB:21)
      5. com.tangosol.coherence.component.net.MessageHandler.serializeMessage(MessageHandler.CDB:19)
      6. com.tangosol.coherence.component.net.MessageHandler.post(MessageHandler.CDB:36)
      7. com.tangosol.coherence.component.net.Message.dispatch(Message.CDB:76)
      8. com.tangosol.coherence.component.net.Message.post(Message.CDB:1)
      9. com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.post(Grid.CDB:2)
      10. com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.send(Grid.CDB:1)
      11. com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.InvocationService.execute(InvocationService.CDB:39)
      12. com.tangosol.coherence.component.util.safeService.SafeInvocationService.execute(SafeInvocationService.CDB:1)
      13. com.tangosol.coherence.component.net.management.Connector.sendRegister(Connector.CDB:19)
      14. com.tangosol.coherence.component.net.management.Connector.registerAll(Connector.CDB:8)
      15. com.tangosol.coherence.component.net.management.Connector.onAnnouncement(Connector.CDB:10)
      16. com.tangosol.coherence.component.net.management.Connector$Announce.run(Connector.CDB:2)
      17. com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.InvocationService.onInvocationRequest(InvocationService.CDB:16)
      18. com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.InvocationService$InvocationRequest.onReceived(InvocationService.CDB:40)
      19. com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:38)
      20. com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:23)
      21. com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:54)
      21 frames
    13. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame