Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3495

Memory leak when promise module does not exist

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.17.0
    • Component/s: None
    • Labels:
      None

      Description

      root@OH-WIN:/home/olehermanse/cfe/core# /var/cfengine/bin/cf-agent -KIf ./docs/custom_promise_types/test.cf
         error: Promise module '/var/cfengine/modules/promises/git_using_lib.py' does not exist
         error: Promise module '/var/cfengine/modules/promises/git_using_lib.py' does not exist
         error: Promise module '/var/cfengine/modules/promises/git_using_lib.py' does not exist
      
      =================================================================
      ==17039==ERROR: LeakSanitizer: detected memory leaks
      
      Direct leak of 12288 byte(s) in 3 object(s) allocated from:
          #0 0x5619656495a8 in malloc (/var/cfengine/bin/cf-agent+0x12d5a8)
          #1 0x7f6345399bd9 in xmalloc /home/olehermanse/cfe/core/libntech/libutils/alloc.c:43
          #2 0x7f634539adf3 in BufferNewWithCapacity /home/olehermanse/cfe/core/libntech/libutils/buffer.c:40
          #3 0x7f634539aeed in BufferNew /home/olehermanse/cfe/core/libntech/libutils/buffer.c:50
          #4 0x7f6345301faa in ExpandScalar /home/olehermanse/cfe/core/libpromises/expand.c:531
          #5 0x7f6345343c45 in GetInterpreterAndPath /home/olehermanse/cfe/core/libpromises/mod_custom.c:102
          #6 0x7f634534769d in EvaluateCustomPromise /home/olehermanse/cfe/core/libpromises/mod_custom.c:751
          #7 0x56196569278a in KeepAgentPromise /home/olehermanse/cfe/core/cf-agent/cf-agent.c:1857
          #8 0x7f63453006ad in ExpandPromiseAndDo /home/olehermanse/cfe/core/libpromises/expand.c:224    #9 0x7f6345300c2a in ExpandPromise /home/olehermanse/cfe/core/libpromises/expand.c:307
          #10 0x561965690f26 in ScheduleAgentOperations /home/olehermanse/cfe/core/cf-agent/cf-agent.c:1523
          #11 0x5619656903d2 in KeepPromiseBundles /home/olehermanse/cfe/core/cf-agent/cf-agent.c:1396
          #12 0x56196568d65b in KeepPromises /home/olehermanse/cfe/core/cf-agent/cf-agent.c:884
          #13 0x56196568ae10 in main /home/olehermanse/cfe/core/cf-agent/cf-agent.c:285
          #14 0x7f6344b710b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
      
      Direct leak of 12288 byte(s) in 3 object(s) allocated from:
          #0 0x5619656495a8 in malloc (/var/cfengine/bin/cf-agent+0x12d5a8)
          #1 0x7f6345399bd9 in xmalloc /home/olehermanse/cfe/core/libntech/libutils/alloc.c:43
          #2 0x7f634539adf3 in BufferNewWithCapacity /home/olehermanse/cfe/core/libntech/libutils/buffer.c:40
          #3 0x7f634539aeed in BufferNew /home/olehermanse/cfe/core/libntech/libutils/buffer.c:50
          #4 0x7f6345301faa in ExpandScalar /home/olehermanse/cfe/core/libpromises/expand.c:531
          #5 0x7f6345343c91 in GetInterpreterAndPath /home/olehermanse/cfe/core/libpromises/mod_custom.c:107
          #6 0x7f634534769d in EvaluateCustomPromise /home/olehermanse/cfe/core/libpromises/mod_custom.c:751
          #7 0x56196569278a in KeepAgentPromise /home/olehermanse/cfe/core/cf-agent/cf-agent.c:1857
          #8 0x7f63453006ad in ExpandPromiseAndDo /home/olehermanse/cfe/core/libpromises/expand.c:224    #9 0x7f6345300c2a in ExpandPromise /home/olehermanse/cfe/core/libpromises/expand.c:307
          #10 0x561965690f26 in ScheduleAgentOperations /home/olehermanse/cfe/core/cf-agent/cf-agent.c:1523
          #11 0x5619656903d2 in KeepPromiseBundles /home/olehermanse/cfe/core/cf-agent/cf-agent.c:1396
          #12 0x56196568d65b in KeepPromises /home/olehermanse/cfe/core/cf-agent/cf-agent.c:884
          #13 0x56196568ae10 in main /home/olehermanse/cfe/core/cf-agent/cf-agent.c:285
          #14 0x7f6344b710b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
      
      SUMMARY: AddressSanitizer: 24576 byte(s) leaked in 6 allocation(s).
      root@OH-WIN:/home/olehermanse/cfe/core#
      

        Attachments

          Activity

            People

            • Assignee:
              olehermanse Ole Herman Schumacher Elgesem
              Reporter:
              olehermanse Ole Herman Schumacher Elgesem
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel