You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Patrick Hunt (JIRA)" <ji...@apache.org> on 2009/02/27 21:05:12 UTC

[jira] Created: (ZOOKEEPER-332) c client issues (memory leaks) reported by valgrind

c client issues (memory leaks) reported by valgrind
---------------------------------------------------

                 Key: ZOOKEEPER-332
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-332
             Project: Zookeeper
          Issue Type: Bug
          Components: c client
    Affects Versions: 3.1.0
            Reporter: Patrick Hunt
            Priority: Blocker
             Fix For: 3.1.1, 3.2.0
         Attachments: valgrind_mt.out

Attaching valgrind log files.

1)  getpwuid_r doesn't seem like it's due to us
2) the rest seem to be valid


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-332) c client issues (memory leaks) reported by valgrind

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678804#action_12678804 ] 

Patrick Hunt commented on ZOOKEEPER-332:
----------------------------------------

perhaps a new jira to update the makefile to include valgrind/helgrind support? it can load the exceptions that we know about explicitly... just a thought.


> c client issues (memory leaks) reported by valgrind
> ---------------------------------------------------
>
>                 Key: ZOOKEEPER-332
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-332
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.1.0
>            Reporter: Patrick Hunt
>            Priority: Blocker
>             Fix For: 3.1.1, 3.2.0
>
>         Attachments: valgrind_mt.out, valgrind_st.out
>
>
> Attaching valgrind log files.
> 1)  getpwuid_r doesn't seem like it's due to us
> 2) the rest seem to be valid

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-332) c client issues (memory leaks) reported by valgrind

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678803#action_12678803 ] 

Patrick Hunt commented on ZOOKEEPER-332:
----------------------------------------

I did do a quick eyeball of the results before entering the jira - I guess the "goto fail" in getaddrs caught my eye - that skips the freeaddrinfo call, but now looking again it seems thats an unlikely case (oom).

Feel free to close, it might be good to document this somewhere, perhaps a src/c/valgrind.txt file that details the exceptions in case someone else runs valgrind? Isn't there some way to pass known exceptions to valgrind? Perhaps that's a better way (commit the exceptions to svn).

anyway - looks like we are good for 3.1.1, feel free to close.


> c client issues (memory leaks) reported by valgrind
> ---------------------------------------------------
>
>                 Key: ZOOKEEPER-332
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-332
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.1.0
>            Reporter: Patrick Hunt
>            Priority: Blocker
>             Fix For: 3.1.1, 3.2.0
>
>         Attachments: valgrind_mt.out, valgrind_st.out
>
>
> Attaching valgrind log files.
> 1)  getpwuid_r doesn't seem like it's due to us
> 2) the rest seem to be valid

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-332) c client issues (memory leaks) reported by valgrind

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

Patrick Hunt updated ZOOKEEPER-332:
-----------------------------------

    Attachment: valgrind_st.out

> c client issues (memory leaks) reported by valgrind
> ---------------------------------------------------
>
>                 Key: ZOOKEEPER-332
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-332
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.1.0
>            Reporter: Patrick Hunt
>            Priority: Blocker
>             Fix For: 3.1.1, 3.2.0
>
>         Attachments: valgrind_mt.out, valgrind_st.out
>
>
> Attaching valgrind log files.
> 1)  getpwuid_r doesn't seem like it's due to us
> 2) the rest seem to be valid

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-332) c client issues (memory leaks) reported by valgrind

Posted by "Chris Darroch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678428#action_12678428 ] 

Chris Darroch commented on ZOOKEEPER-332:
-----------------------------------------

These look OK to me, on a first glance.  There's a call to freeaddrinfo() in getaddrs() to match getaddrinfo().  There's also a free(zh) in zookeeper_close() to match the allocation in zookeeper_init().  I think these are just spurious reports from valgrind, but I'm not absolutely 100% on that.

> c client issues (memory leaks) reported by valgrind
> ---------------------------------------------------
>
>                 Key: ZOOKEEPER-332
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-332
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.1.0
>            Reporter: Patrick Hunt
>            Priority: Blocker
>             Fix For: 3.1.1, 3.2.0
>
>         Attachments: valgrind_mt.out, valgrind_st.out
>
>
> Attaching valgrind log files.
> 1)  getpwuid_r doesn't seem like it's due to us
> 2) the rest seem to be valid

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-332) c client issues (memory leaks) reported by valgrind

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678863#action_12678863 ] 

Patrick Hunt commented on ZOOKEEPER-332:
----------------------------------------

FYI:

       --suppressions=<filename> [default: $PREFIX/lib/valgrind/default.supp]
              Specifies an extra file from which to read descriptions of
              errors to suppress. You may use up to 100 extra suppression
              files.

also:

 --gen-suppressions=<yes|no|all> [default: no]


> c client issues (memory leaks) reported by valgrind
> ---------------------------------------------------
>
>                 Key: ZOOKEEPER-332
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-332
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.1.0
>            Reporter: Patrick Hunt
>            Priority: Blocker
>             Fix For: 3.1.1, 3.2.0
>
>         Attachments: valgrind_mt.out, valgrind_st.out
>
>
> Attaching valgrind log files.
> 1)  getpwuid_r doesn't seem like it's due to us
> 2) the rest seem to be valid

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-332) c client issues (memory leaks) reported by valgrind

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

Patrick Hunt updated ZOOKEEPER-332:
-----------------------------------

    Attachment: valgrind_mt.out

> c client issues (memory leaks) reported by valgrind
> ---------------------------------------------------
>
>                 Key: ZOOKEEPER-332
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-332
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.1.0
>            Reporter: Patrick Hunt
>            Priority: Blocker
>             Fix For: 3.1.1, 3.2.0
>
>         Attachments: valgrind_mt.out
>
>
> Attaching valgrind log files.
> 1)  getpwuid_r doesn't seem like it's due to us
> 2) the rest seem to be valid

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (ZOOKEEPER-332) c client issues (memory leaks) reported by valgrind

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

Mahadev konar resolved ZOOKEEPER-332.
-------------------------------------

    Resolution: Invalid

I am resolving this for now. 

> c client issues (memory leaks) reported by valgrind
> ---------------------------------------------------
>
>                 Key: ZOOKEEPER-332
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-332
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.1.0
>            Reporter: Patrick Hunt
>            Priority: Blocker
>             Fix For: 3.1.1, 3.2.0
>
>         Attachments: valgrind_mt.out, valgrind_st.out
>
>
> Attaching valgrind log files.
> 1)  getpwuid_r doesn't seem like it's due to us
> 2) the rest seem to be valid

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-332) c client issues (memory leaks) reported by valgrind

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678817#action_12678817 ] 

Mahadev konar commented on ZOOKEEPER-332:
-----------------------------------------

i dont think their is anything like passing known exceptions to valgrind. Also, the exceptions are line number based, which would be difficult to track with code changes in the c code. I would just close this jira for now and revisit it again if someone opens another jira for this. On the other hand, it would be good to have hudson scream if the number of excpetions increase... 

> c client issues (memory leaks) reported by valgrind
> ---------------------------------------------------
>
>                 Key: ZOOKEEPER-332
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-332
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.1.0
>            Reporter: Patrick Hunt
>            Priority: Blocker
>             Fix For: 3.1.1, 3.2.0
>
>         Attachments: valgrind_mt.out, valgrind_st.out
>
>
> Attaching valgrind log files.
> 1)  getpwuid_r doesn't seem like it's due to us
> 2) the rest seem to be valid

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-332) c client issues (memory leaks) reported by valgrind

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677502#action_12677502 ] 

Patrick Hunt commented on ZOOKEEPER-332:
----------------------------------------

btw, ran valgrind like:

 valgrind --malloc-fill=aa --free-fill=bb --log-file=valgrind_mt.out --leak-check=yes ./zktest-mt


> c client issues (memory leaks) reported by valgrind
> ---------------------------------------------------
>
>                 Key: ZOOKEEPER-332
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-332
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.1.0
>            Reporter: Patrick Hunt
>            Priority: Blocker
>             Fix For: 3.1.1, 3.2.0
>
>         Attachments: valgrind_mt.out, valgrind_st.out
>
>
> Attaching valgrind log files.
> 1)  getpwuid_r doesn't seem like it's due to us
> 2) the rest seem to be valid

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-332) c client issues (memory leaks) reported by valgrind

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678517#action_12678517 ] 

Mahadev konar commented on ZOOKEEPER-332:
-----------------------------------------

I agree with chris. also for the create_completion_entry( zookeeper.c:1830 in zktest-st) ( the line number is different in the latest code after a few checkins)... has a matcing free() in process_completions. I think we can close this jira for now.

> c client issues (memory leaks) reported by valgrind
> ---------------------------------------------------
>
>                 Key: ZOOKEEPER-332
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-332
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.1.0
>            Reporter: Patrick Hunt
>            Priority: Blocker
>             Fix For: 3.1.1, 3.2.0
>
>         Attachments: valgrind_mt.out, valgrind_st.out
>
>
> Attaching valgrind log files.
> 1)  getpwuid_r doesn't seem like it's due to us
> 2) the rest seem to be valid

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.