[asterisk-bugs] [JIRA] (ASTERISK-21785) __ao2_ref_debug() logs to /tmp/refs when REF_DEBUG is not defined

abelbeck (JIRA) noreply at issues.asterisk.org
Tue May 14 10:47:38 CDT 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-21785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=206382#comment-206382 ] 

abelbeck commented on ASTERISK-21785:
-------------------------------------

The /tmp/refs logs are of the form:
--
0x40950994 +1   res_xmpp.c:2405:xmpp_log_hook () [@2]
0x40950994 +1   res_xmpp.c:2405:xmpp_log_hook () [@1]
0x40950994 +1   res_xmpp.c:3295:xmpp_action_hook () [@1]
0x40950994 +1   res_xmpp.c:3575:xmpp_client_thread () [@1]
0x40950994 +1   res_xmpp.c:2405:xmpp_log_hook () [@2]
0x40950994 +1   res_xmpp.c:3575:xmpp_client_thread () [@1]
0x40950994 +1   res_xmpp.c:2405:xmpp_log_hook () [@2]
0x40950994 +1   res_xmpp.c:3575:xmpp_client_thread () [@1]
0x40950994 +1   res_xmpp.c:2405:xmpp_log_hook () [@2]
0x40950994 +1   res_xmpp.c:3575:xmpp_client_thread () [@1]
0x40950994 +1   res_xmpp.c:2405:xmpp_log_hook () [@2]
--
Yes it seems ao2_global_obj_xxx() is causing the logs by looking at the code, but that info is not in /tmp/refs.

This was touched on in ASTERISK-21046, as it is confusing to get only some of the /tmp/refs data when REF_DEBUG is not set.
                
> __ao2_ref_debug() logs to /tmp/refs when REF_DEBUG is not defined
> -----------------------------------------------------------------
>
>                 Key: ASTERISK-21785
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21785
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_xmpp
>    Affects Versions: 11.3.0
>         Environment: Embedded Linux - AstLinux 1.x
>            Reporter: abelbeck
>            Assignee: abelbeck
>         Attachments: asterisk-11-disable-tmp-refs-logging.patch
>
>
> When __ao2_ref_debug() is called, very often when res_xmpp is actively used, the /tmp/refs file grows to 9MB over the course of a few weeks.
> In our embedded environment /tmp is RAM based and defaults to 10MB, the growing /tmp/refs file then causes problems.  We need a way to control this behavior.
> A fix is to only log to /tmp/refs in __ao2_ref_debug() when REF_DEBUG is defined.  Possibly this is too simplistic of a test in general, but works for us.  Patch to follow.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list