Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-828

Various memory leaks and uninitialized values

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.9, 2.1.8, 2.1.7, 2.1.6, 2.1.5, 2.1.4
    • Fix Version/s: 3.1.0, 3.0.1
    • Component/s: None
    • Labels:
      None

      Description

      We found various memory leaks, none are per-transaction. And we found an uninitialized variable (for internal requests.) All found with valgrind.
      I will attach a patch with fixes for all of them except for one which looked like the following:
      =15923== 23 bytes in 1 blocks are definitely lost in loss record 105 of
      360==15923== at 0x4022BF3: malloc (in
      /usr/local/lib/valgrind/vgpreload_memcheck-x86-linux.so)
      ==15923== by 0x838BAAC: ink_malloc (ink_memory.cc:213)
      ==15923== by 0x839C2DD: Tokenizer::addToken(char*, int) (Tokenizer.cc:244)
      ==15923== by 0x839CA98: Tokenizer::Initialize(char*, int) (Tokenizer.cc:227)
      ==15923== by 0x839CC4F: Tokenizer::Initialize(char const*) (Tokenizer.cc:95)
      ==15923== by 0x8379BC3: RecTree::rec_tree_insert(char const*, char const*)
      (RecTree.cc:104)
      ==15923== by 0x8379C60: RecTree::rec_tree_insert(char const*, char const*)
      (RecTree.cc:142)
      ==15923== by 0x837A6E4: RecAlloc(RecT, char const*, RecDataT)
      (RecUtils.cc:52)
      ==15923== by 0x83741F8: register_record(RecT, char const*, RecDataT,
      RecData, bool) (RecCore.cc:68)
      ==15923== by 0x83742A5: RecRegisterStat(RecT, char const*, RecDataT,
      RecData, RecPersistT) (RecCore.cc:750)
      ==15923== by 0x8375B85: RecRegisterRawStat(RecRawStatBlock*, RecT, char
      const*, RecDataT, RecPersistT, int, int (char const*, RecDataT, RecData*,
      RecRawStatBlock*, int)) (RecProcess.cc:428)
      ==15923== by 0x83437E3: ink_net_init(ModuleVersion) (Net.cc:69)

        Attachments

        1. headers-prealloc.diff
          2 kB
          William Bardwell
        2. memory-leaks.diff
          8 kB
          William Bardwell

          Activity

            People

            • Assignee:
              zwoop Leif Hedstrom
              Reporter:
              wbardwel William Bardwell
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: