Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-2654

Work around native heap leak in sun.nio.ch.Util affecting IncomingTcpConnection

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 0.7.7, 0.8.1
    • None
    • None
    • OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1~10.04.1)
      OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

      Also observed on Sun/Oracle JDK. Probably platform- and os-independent.

    Description

      NIO's leaky, per-thread caching of direct buffers in combination with IncomingTcpConnection's eager buffering of messages leads to leakage of large amounts of native heap. Details in [1]. More on the root cause in [2]. Even though it doesn't fix the leak, attached patch has been found to alleviate the problem by keeping the size of each direct buffer modest.

      Attachments

        1. chunking.diff
          1 kB
          Hannes Schmidt
        2. 2654-v2.txt
          1 kB
          Jonathan Ellis
        3. 2654-v3.txt
          2 kB
          Hannes Schmidt
        4. 2654-v4.txt
          1 kB
          Jonathan Ellis
        5. 2654-v4-0.7.txt
          1 kB
          Jonathan Ellis

        Activity

          People

            eyealike Hannes Schmidt
            eyealike Hannes Schmidt
            Hannes Schmidt
            Jonathan Ellis
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: