Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.4.3, 3.4.4
    • Fix Version/s: 3.4.6, 3.5.0
    • Component/s: c client
    • Labels:
    • Environment:

      Zookeeper client and server both are running on CentOS 6.3

    • Hadoop Flags:
      Reviewed
    • Release Note:
      Hide
      zoo_multi API used to leak memory while deserializing the response from zookeeper server.
      Completion entries for individual operation in zoo_multi transaction weren't getting cleaned causing memory leak. This patch resolves this memory leak by destroying completion entries in deserialize_multi function.
      Show
      zoo_multi API used to leak memory while deserializing the response from zookeeper server. Completion entries for individual operation in zoo_multi transaction weren't getting cleaned causing memory leak. This patch resolves this memory leak by destroying completion entries in deserialize_multi function.
    • Tags:
      zoo_multi memory-leak

      Description

      Valgrind is reporting memory leak for zoo_multi operations.

      ==4056== 2,240 (160 direct, 2,080 indirect) bytes in 1 blocks are definitely lost in loss record 18 of 24
      ==4056== at 0x4A04A28: calloc (vg_replace_malloc.c:467)
      ==4056== by 0x504D822: create_completion_entry (zookeeper.c:2322)
      ==4056== by 0x5052833: zoo_amulti (zookeeper.c:3141)
      ==4056== by 0x5052A8B: zoo_multi (zookeeper.c:3240)

      It looks like completion entries for individual operations in multiupdate transaction are not getting freed. My observation is that memory leak size depends on the number of operations in single mutlipupdate transaction

      1. ZOOKEEPER-1562.patch
        0.6 kB
        Deepak Jagtap

        Activity

          People

          • Assignee:
            Deepak Jagtap
            Reporter:
            Deepak Jagtap
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development