You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "William Bardwell (JIRA)" <ji...@apache.org> on 2011/06/07 17:35:59 UTC

[jira] [Created] (TS-828) Various memory leaks and uninitialized values

Various memory leaks and uninitialized values
---------------------------------------------

                 Key: TS-828
                 URL: https://issues.apache.org/jira/browse/TS-828
             Project: Traffic Server
          Issue Type: Bug
    Affects Versions: 2.1.4, 2.1.5, 2.1.6, 2.1.7, 2.1.8, 2.1.9
            Reporter: William Bardwell
            Priority: Minor


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)


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (TS-828) Various memory leaks and uninitialized values

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-828:
-----------------------------

    Backport to Version: 3.0.1

> Various memory leaks and uninitialized values
> ---------------------------------------------
>
>                 Key: TS-828
>                 URL: https://issues.apache.org/jira/browse/TS-828
>             Project: Traffic Server
>          Issue Type: Bug
>    Affects Versions: 2.1.9, 2.1.8, 2.1.7, 2.1.6, 2.1.5, 2.1.4
>            Reporter: William Bardwell
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.0
>
>         Attachments: headers-prealloc.diff, memory-leaks.diff
>
>
> 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)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (TS-828) Various memory leaks and uninitialized values

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-828:
-----------------------------

    Fix Version/s: 3.1.0
         Assignee: Leif Hedstrom

> Various memory leaks and uninitialized values
> ---------------------------------------------
>
>                 Key: TS-828
>                 URL: https://issues.apache.org/jira/browse/TS-828
>             Project: Traffic Server
>          Issue Type: Bug
>    Affects Versions: 2.1.9, 2.1.8, 2.1.7, 2.1.6, 2.1.5, 2.1.4
>            Reporter: William Bardwell
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.0
>
>         Attachments: headers-prealloc.diff
>
>
> 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)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (TS-828) Various memory leaks and uninitialized values

Posted by "William Bardwell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Bardwell updated TS-828:
--------------------------------

    Attachment: memory-leaks.diff

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

> Various memory leaks and uninitialized values
> ---------------------------------------------
>
>                 Key: TS-828
>                 URL: https://issues.apache.org/jira/browse/TS-828
>             Project: Traffic Server
>          Issue Type: Bug
>    Affects Versions: 2.1.9, 2.1.8, 2.1.7, 2.1.6, 2.1.5, 2.1.4
>            Reporter: William Bardwell
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.0
>
>         Attachments: headers-prealloc.diff, memory-leaks.diff
>
>
> 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)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (TS-828) Various memory leaks and uninitialized values

Posted by "Igor Galić (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Galić updated TS-828:
--------------------------

    Fix Version/s: 3.0.1

> Various memory leaks and uninitialized values
> ---------------------------------------------
>
>                 Key: TS-828
>                 URL: https://issues.apache.org/jira/browse/TS-828
>             Project: Traffic Server
>          Issue Type: Bug
>    Affects Versions: 2.1.9, 2.1.8, 2.1.7, 2.1.6, 2.1.5, 2.1.4
>            Reporter: William Bardwell
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.0, 3.0.1
>
>         Attachments: headers-prealloc.diff, memory-leaks.diff
>
>
> 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)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (TS-828) Various memory leaks and uninitialized values

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-828:
-----------------------------

    Backport to Version:   (was: 3.0.1)

> Various memory leaks and uninitialized values
> ---------------------------------------------
>
>                 Key: TS-828
>                 URL: https://issues.apache.org/jira/browse/TS-828
>             Project: Traffic Server
>          Issue Type: Bug
>    Affects Versions: 2.1.9, 2.1.8, 2.1.7, 2.1.6, 2.1.5, 2.1.4
>            Reporter: William Bardwell
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.0, 3.0.1
>
>         Attachments: headers-prealloc.diff, memory-leaks.diff
>
>
> 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)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-828) Various memory leaks and uninitialized values

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045517#comment-13045517 ] 

Leif Hedstrom commented on TS-828:
----------------------------------

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

> Various memory leaks and uninitialized values
> ---------------------------------------------
>
>                 Key: TS-828
>                 URL: https://issues.apache.org/jira/browse/TS-828
>             Project: Traffic Server
>          Issue Type: Bug
>    Affects Versions: 2.1.9, 2.1.8, 2.1.7, 2.1.6, 2.1.5, 2.1.4
>            Reporter: William Bardwell
>            Priority: Minor
>         Attachments: headers-prealloc.diff
>
>
> 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)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (TS-828) Various memory leaks and uninitialized values

Posted by "William Bardwell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Bardwell updated TS-828:
--------------------------------

    Attachment: headers-prealloc.diff

> Various memory leaks and uninitialized values
> ---------------------------------------------
>
>                 Key: TS-828
>                 URL: https://issues.apache.org/jira/browse/TS-828
>             Project: Traffic Server
>          Issue Type: Bug
>    Affects Versions: 2.1.9, 2.1.8, 2.1.7, 2.1.6, 2.1.5, 2.1.4
>            Reporter: William Bardwell
>            Priority: Minor
>         Attachments: headers-prealloc.diff
>
>
> 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)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira