Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-4480

Websocket exception using async remote

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 9.0.0.Beta2
    • Fix Version/s: 9.0.0.CR1
    • Component/s: Web Sockets
    • Labels:
      None

      Description

      Sending binary messages on the AsyncRemote endpoint throws an error in the log:
      21:11:28,747 ERROR [org.xnio.listener] (default I/O-6) XNIO001007: A channel event listener threw an exception: java.lang.IllegalStateException: XNIO000017: Buffer was already freed
      at org.xnio.ByteBufferSlicePool$PooledByteBuffer.getResource(ByteBufferSlicePool.java:206)
      at org.xnio.ByteBufferSlicePool$PooledByteBuffer.getResource(ByteBufferSlicePool.java:176)
      at io.undertow.server.protocol.framed.AbstractFramedChannel.flushSenders(AbstractFramedChannel.java:490)
      at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameWriteListener.handleEvent(AbstractFramedChannel.java:793)
      at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameWriteListener.handleEvent(AbstractFramedChannel.java:790)
      at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
      at org.xnio.conduits.WriteReadyHandler$ChannelListenerHandler.writeReady(WriteReadyHandler.java:65)
      at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:93)
      at org.xnio.nio.WorkerThread.run(WorkerThread.java:539)

      This happens after a few minutes and generally the number of errors increase rapidly and we can easily have a 2Go log after a few hours.

      Code is:

      session.getAsyncRemote.sendBinary(event.asReadOnlyBuffer(), new SendHandler(){
      override def onResult(result:SendResult) {
      }
      })

      It worked well with wildly 9.0 alpha 1 but bug appeared with beta 2.

      I generally receive a close event on the web socket session after the error logging.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                swd847 Stuart Douglas
                Reporter:
                nicodem nicolas desmaziers
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: