Traffic Server
  1. Traffic Server
  2. TS-828

Various memory leaks and uninitialized values

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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)

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

        Activity

        Hide
        Leif Hedstrom added a comment -

        Closing, this is committed to both 3.0.x and trunk.

        Show
        Leif Hedstrom added a comment - Closing, this is committed to both 3.0.x and trunk.
        Hide
        William Bardwell added a comment -

        Sorry, correct patch for found memory issues, except for the one item in initial comment.

        Show
        William Bardwell added a comment - Sorry, correct patch for found memory issues, except for the one item in initial comment.
        Hide
        Leif Hedstrom added a comment -

        William: Did you really mean to attach the same diff as for TS-827 here ?

        Show
        Leif Hedstrom added a comment - William: Did you really mean to attach the same diff as for TS-827 here ?

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development