Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-908

Possible memory leak

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 1.4.4.Final
    • Core, Servlet
    • Hide

      The problem is not easily reproducible.

      Show
      The problem is not easily reproducible.

      I built a game server, using Undertow websockets implemented through JSR356.

      The game server has to loops, using ScheduledExecutorService.scheduleAtFixedRate, the game loop, and the data loop, which runs 20 times per second sending data of the world to all clients using getAsyncRemote().sendBinary(ByteBuffer).

      Everything works right for a while, until at some moment, memory starts to grow, and some minutes later everything becomes unstable, people stop receiving packets and I have no other way than to restart the server.

      I hooked jvisualvm using JMX and took some heap dumps, I attach the pictures of 3 of them, in temporal order.

      In resume, the following classes grow to hundreds of thousands:
      org.xnio.ChannelListener$SimpleSetter
      java.nio.HeapByteBuffer
      io.undertow.util.ImmediatePooledByteBuffer
      io.undertow.websockets.core.WebSocket$2
      io.undertow.websockets.core.WebSocket$1
      io.undertow.websockets.jsr.SendResultFuture

      You can download all the heap dumps to open with jvisualvm from here: https://mega.nz/#!4ckVWaAI!RQoqHdtAtwrah2Q_SBd2870AoNj3u78ry46h-B1aMXY

        1. as1.PNG
          88 kB
          Federico Mouse
        2. hd1.png
          97 kB
          Federico Mouse
        3. hd2.PNG
          99 kB
          Federico Mouse
        4. hd3.PNG
          100 kB
          Federico Mouse
        5. hd4.PNG
          92 kB
          Federico Mouse

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              federicojm Federico Mouse (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: