[asterisk-bugs] [JIRA] (ASTERISK-27224) Crash when freeing log message

Rusty Newton (JIRA) noreply at issues.asterisk.org
Tue Aug 29 17:33:08 CDT 2017


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

Rusty Newton edited comment on ASTERISK-27224 at 8/29/17 5:31 PM:
------------------------------------------------------------------

I'm setting up Asterisk on a new server and don't plan to fix the error any time soon.  This was a one-shot crash, but I can't deploy the system live until each crash is understood and resolved.

Unfortunately, the full backtrace isn't very useful:
{noformat}
#0  reset_field (p=0x696b702f6374652f) at stringfields.c:94
#1  __ast_string_field_free_memory (mgr=mgr at entry=0x7f9d540cc418, 
    pool_head=pool_head at entry=0x7f9d540cc3e8, 
    cleanup_type=cleanup_type at entry=AST_STRINGFIELD_DESTROY, 
    file=file at entry=0x64ba65 "logger.c", lineno=lineno at entry=182, 
    func=func at entry=0x64bf58 <__PRETTY_FUNCTION__.16670> "logmsg_free")
    at stringfields.c:122
#2  0x000000000053e5cf in logmsg_free (msg=0x7f9d540cc3d0) at logger.c:182
#3  logger_thread (data=data at entry=0x0) at logger.c:1721
#4  0x00000000005f90da in dummy_start (data=<optimized out>) at utils.c:1233
#5  0x00007f9df16d6dc5 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f9df099676d in clone () from /lib64/libc.so.6
{noformat}


was (Author: kenner):
I'm setting up Asterisk on a new server and don't plan to fix the error any time soon.  This was a one-shot crash, but I can't deploy the system live until each crash is understood and resolved.

Unfortunately, the full backtrace isn't very useful:

#0  reset_field (p=0x696b702f6374652f) at stringfields.c:94
#1  __ast_string_field_free_memory (mgr=mgr at entry=0x7f9d540cc418, 
    pool_head=pool_head at entry=0x7f9d540cc3e8, 
    cleanup_type=cleanup_type at entry=AST_STRINGFIELD_DESTROY, 
    file=file at entry=0x64ba65 "logger.c", lineno=lineno at entry=182, 
    func=func at entry=0x64bf58 <__PRETTY_FUNCTION__.16670> "logmsg_free")
    at stringfields.c:122
#2  0x000000000053e5cf in logmsg_free (msg=0x7f9d540cc3d0) at logger.c:182
#3  logger_thread (data=data at entry=0x0) at logger.c:1721
#4  0x00000000005f90da in dummy_start (data=<optimized out>) at utils.c:1233
#5  0x00007f9df16d6dc5 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f9df099676d in clone () from /lib64/libc.so.6


> Crash when freeing log message
> ------------------------------
>
>                 Key: ASTERISK-27224
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27224
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/Logging
>    Affects Versions: 14.6.0
>         Environment: CentOS 7
>            Reporter: Richard Kenner
>            Assignee: Unassigned
>            Severity: Critical
>
> I have a crash at stringfields.c:94.
> See below:
> {noformat}
> #3  logger_thread (data=data at entry=0x0) at logger.c:1721
> 1721                            logmsg_free(msg);
> (gdb) print *msg
> $15 = {type = LOGMSG_NORMAL, level = 4, sublevel = -1, line = 2724, 
>   lwp = 30375, callid = 0, __field_mgr_pool = 0x7f9d540cc448, 
>   date = 0x7f9d540cc4c0 "Aug 27 19:50:44", 
>   file = 0x7f9d540cc4da "rtp_engine.c", 
>   function = 0x7f9d540cc4ea "ast_rtp_dtls_cfg_parse", 
>   message = 0x7f9d540cc46a "dtlscafile file /etc/pki/tls/certs/server-ca.crt does not exist or is not readable\n", level_name = 0x7f9d540cc4d2 "ERROR", 
>   __field_mgr = {last_alloc = 0x7f9d540cc4ea "ast_rtp_dtls_cfg_parse", 
>     embedded_pool = 0x7f9d540cc448, string_fields = {elems = 0x7f9d5408f510, 
>       max = 5, current = 5}}, list = {next = 0x0}}
> (gdb) p msg->__field_mgr.string_fields.elems[0]
> $16 = (const char **) 0x696b702f6374652f
> (gdb) p $16
> $17 = (const char **) 0x696b702f6374652f
> (gdb) p *$16
> Cannot access memory at address 0x696b702f6374652f
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list