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

Possible memory leak

    XMLWordPrintable

Details

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

      The problem is not easily reproducible.

      Show
      The problem is not easily reproducible.

    Description

      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

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: