[asterisk-bugs] [JIRA] (ASTERISK-23328) Asterisk crash in ast_cdr_setapp() at cdr.c

Rusty Newton (JIRA) noreply at issues.asterisk.org
Mon Feb 24 09:00:07 CST 2014


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

Rusty Newton edited comment on ASTERISK-23328 at 2/24/14 8:59 AM:
------------------------------------------------------------------

Matt, here's the output:

{noformat}
Program terminated with signal 11, Segmentation fault.
#0  0x0809f696 in ast_cdr_setapp (cdr=0xc8, app=0xc47e5e "AGI", data=0xb61339d0 "GET") at cdr.c:826
826                     if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) {
(gdb) frame 1
#1  0x00c45828 in agi_handle_command (chan=0xa46aa3c8, agi=0xb61342ac, buf=0xb61339d0 "GET", dead=0) at res_agi.c:3381
3381                            ast_cdr_setapp(chan->cdr, "AGI", buf);
(gdb) p *chan
$1 = {tech = 0x7f521c0, tech_pvt = 0x9b52de8, music_state = 0x0, generatordata = 0x0, generator = 0x0, _bridge = 0x0, masq = 0x0, masqr = 0x0,
  blockproc = 0x81d61a2 "ast_waitfor_nandfds", appl = 0x9843218 "AGI", data = 0xb61345b6 "agi://10.230.2.102/cc/dialer_set_user.php", sched = 0xa41ff5d8, stream = 0x0,
  vstream = 0x0, timingfunc = 0, timingdata = 0x0, pbx = 0x0, writetrans = 0xa41d6750, readtrans = 0xa4634ba0, audiohooks = 0x0, framehooks = 0x0, cdr = 0x9809bb8, zone = 0x0,
  monitor = 0x0, __field_mgr_pool = 0xa4086a28, name = 0xa4086a66 "SIP/680-000450bb", language = 0xa4086a8c "cs", musicclass = 0x8234646 "", accountcode = 0x8234646 "",
  peeraccount = 0x8234646 "", userfield = 0x8234646 "", call_forward = 0x8234646 "", uniqueid = 0xa4086a3a "1392806826.1483358", linkedid = 0xa4086a50 "1392806808.1483074",
  parkinglot = 0xa4086a9c "default", hangupsource = 0x8234646 "", dialcontext = 0x8234646 "", __field_mgr = {last_alloc = 0xa4086a9c "default", embedded_pool = 0x0},
  whentohangup = {tv_sec = 0, tv_usec = 0}, blocker = 3054762896, dialed = {number = {str = 0x0, plan = 0}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '\000',
      valid = 0 '\000'}, transit_network_select = 0}, caller = {id = {name = {str = 0x9822c90 "HodoninCC 680", char_set = 1, presentation = 0, valid = 1 '\001'}, number = {
        str = 0x9b39470 "680", plan = 0, presentation = 0, valid = 1 '\001'}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '\000', valid = 0 '\000'},
      tag = 0x98c3bd0 ""}, ani = {name = {str = 0x0, char_set = 1, presentation = 0, valid = 0 '\000'}, number = {str = 0x0, plan = 0, presentation = 0, valid = 0 '\000'},
      subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '\000', valid = 0 '\000'}, tag = 0x0}, ani2 = 0}, connected = {id = {name = {
        str = 0x9accfa0 "Auto dial - 606264598", char_set = 1, presentation = 0, valid = 1 '\001'}, number = {str = 0x99dd2d8 "606264598", plan = 0, presentation = 0,
        valid = 1 '\001'}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '\000', valid = 0 '\000'}, tag = 0x0}, ani = {name = {str = 0x0, char_set = 1,
        presentation = 0, valid = 0 '\000'}, number = {str = 0x9a148c0 "606264598", plan = 0, presentation = 0, valid = 1 '\001'}, subaddress = {str = 0x0, type = 0,
        odd_even_indicator = 0 '\000', valid = 0 '\000'}, tag = 0x0}, ani2 = 0, source = 0}, redirecting = {from = {name = {str = 0x0, char_set = 1, presentation = 0,
        valid = 0 '\000'}, number = {str = 0x0, plan = 0, presentation = 0, valid = 0 '\000'}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '\000',
        valid = 0 '\000'}, tag = 0x0}, to = {name = {str = 0x0, char_set = 1, presentation = 0, valid = 0 '\000'}, number = {str = 0x0, plan = 0, presentation = 0,
        valid = 0 '\000'}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '\000', valid = 0 '\000'}, tag = 0x0}, count = 0, reason = 0}, dtmff = {frametype = 0,
    subclass = {integer = 0, codec = 0}, datalen = 0, samples = 0, mallocd = 0, mallocd_hdr_len = 0, offset = 0, src = 0x0, data = {ptr = 0x0, uint32 = 0,
      pad = "\000\000\000\000\000\000\000"}, delivery = {tv_sec = 0, tv_usec = 0}, frame_list = {next = 0x0}, flags = 0, ts = 0, len = 0, seqno = 0}, varshead = {
    first = 0xa40ab030, last = 0x98d3fd8}, callgroup = 0, pickupgroup = 0, readq = {first = 0xa41bb908, last = 0xa68029f8}, jb = {conf = {flags = 0, max_size = -1,
      resync_threshold = -1, impl = '\000' <repeats 11 times>, target_extra = -1}, impl = 0x0, jbobj = 0x0, timebase = {tv_sec = 0, tv_usec = 0}, next = 0, last_format = 0,
    logfile = 0x0, flags = 0}, dtmf_tv = {tv_sec = 0, tv_usec = 0}, datastores = {first = 0xa41ce0a8, last = 0x98bc888}, autochans = {first = 0x0, last = 0x0}, insmpl = 0,
  outsmpl = 0, fds = {920, 927, -1, -1, -1, -1, -1, -1, 742, -1}, _softhangup = 0, fdno = -1, streamid = -1, vstreamid = 0, oldwriteformat = 0, timingfd = 742,
  _state = AST_STATE_UP, rings = 0, priority = 2, macropriority = 1, amaflags = 3, adsicpe = AST_ADSI_UNKNOWN, fin = 6, fout = 0, hangupcause = 16, flags = 1536, alertpipe = {-1,
    -1}, nativeformats = 4, readformat = 64, writeformat = 64, rawreadformat = 4, rawwriteformat = 4, emulate_dtmf_duration = 0, visible_indication = 0, transfercapability = 0,
  bridge = 0x0, timer = 0xa40983a0, context = "macro-qmagent-answer-inbound", '\000' <repeats 51 times>, exten = "s\000\060", '\000' <repeats 76 times>,
  macrocontext = "qmqueue", '\000' <repeats 72 times>, macroexten = "680", '\000' <repeats 76 times>, emulate_dtmf_digit = 0 '\000', sending_dtmf_digit = 0 '\000',
  sending_dtmf_tv = {tv_sec = 0, tv_usec = 0}}
(gdb)
{noformat}
                
      was (Author: hajekd):
    Matt, here's the output:

Program terminated with signal 11, Segmentation fault.
#0  0x0809f696 in ast_cdr_setapp (cdr=0xc8, app=0xc47e5e "AGI", data=0xb61339d0 "GET") at cdr.c:826
826                     if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) {
(gdb) frame 1
#1  0x00c45828 in agi_handle_command (chan=0xa46aa3c8, agi=0xb61342ac, buf=0xb61339d0 "GET", dead=0) at res_agi.c:3381
3381                            ast_cdr_setapp(chan->cdr, "AGI", buf);
(gdb) p *chan
$1 = {tech = 0x7f521c0, tech_pvt = 0x9b52de8, music_state = 0x0, generatordata = 0x0, generator = 0x0, _bridge = 0x0, masq = 0x0, masqr = 0x0,
  blockproc = 0x81d61a2 "ast_waitfor_nandfds", appl = 0x9843218 "AGI", data = 0xb61345b6 "agi://10.230.2.102/cc/dialer_set_user.php", sched = 0xa41ff5d8, stream = 0x0,
  vstream = 0x0, timingfunc = 0, timingdata = 0x0, pbx = 0x0, writetrans = 0xa41d6750, readtrans = 0xa4634ba0, audiohooks = 0x0, framehooks = 0x0, cdr = 0x9809bb8, zone = 0x0,
  monitor = 0x0, __field_mgr_pool = 0xa4086a28, name = 0xa4086a66 "SIP/680-000450bb", language = 0xa4086a8c "cs", musicclass = 0x8234646 "", accountcode = 0x8234646 "",
  peeraccount = 0x8234646 "", userfield = 0x8234646 "", call_forward = 0x8234646 "", uniqueid = 0xa4086a3a "1392806826.1483358", linkedid = 0xa4086a50 "1392806808.1483074",
  parkinglot = 0xa4086a9c "default", hangupsource = 0x8234646 "", dialcontext = 0x8234646 "", __field_mgr = {last_alloc = 0xa4086a9c "default", embedded_pool = 0x0},
  whentohangup = {tv_sec = 0, tv_usec = 0}, blocker = 3054762896, dialed = {number = {str = 0x0, plan = 0}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '\000',
      valid = 0 '\000'}, transit_network_select = 0}, caller = {id = {name = {str = 0x9822c90 "HodoninCC 680", char_set = 1, presentation = 0, valid = 1 '\001'}, number = {
        str = 0x9b39470 "680", plan = 0, presentation = 0, valid = 1 '\001'}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '\000', valid = 0 '\000'},
      tag = 0x98c3bd0 ""}, ani = {name = {str = 0x0, char_set = 1, presentation = 0, valid = 0 '\000'}, number = {str = 0x0, plan = 0, presentation = 0, valid = 0 '\000'},
      subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '\000', valid = 0 '\000'}, tag = 0x0}, ani2 = 0}, connected = {id = {name = {
        str = 0x9accfa0 "Auto dial - 606264598", char_set = 1, presentation = 0, valid = 1 '\001'}, number = {str = 0x99dd2d8 "606264598", plan = 0, presentation = 0,
        valid = 1 '\001'}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '\000', valid = 0 '\000'}, tag = 0x0}, ani = {name = {str = 0x0, char_set = 1,
        presentation = 0, valid = 0 '\000'}, number = {str = 0x9a148c0 "606264598", plan = 0, presentation = 0, valid = 1 '\001'}, subaddress = {str = 0x0, type = 0,
        odd_even_indicator = 0 '\000', valid = 0 '\000'}, tag = 0x0}, ani2 = 0, source = 0}, redirecting = {from = {name = {str = 0x0, char_set = 1, presentation = 0,
        valid = 0 '\000'}, number = {str = 0x0, plan = 0, presentation = 0, valid = 0 '\000'}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '\000',
        valid = 0 '\000'}, tag = 0x0}, to = {name = {str = 0x0, char_set = 1, presentation = 0, valid = 0 '\000'}, number = {str = 0x0, plan = 0, presentation = 0,
        valid = 0 '\000'}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '\000', valid = 0 '\000'}, tag = 0x0}, count = 0, reason = 0}, dtmff = {frametype = 0,
    subclass = {integer = 0, codec = 0}, datalen = 0, samples = 0, mallocd = 0, mallocd_hdr_len = 0, offset = 0, src = 0x0, data = {ptr = 0x0, uint32 = 0,
      pad = "\000\000\000\000\000\000\000"}, delivery = {tv_sec = 0, tv_usec = 0}, frame_list = {next = 0x0}, flags = 0, ts = 0, len = 0, seqno = 0}, varshead = {
    first = 0xa40ab030, last = 0x98d3fd8}, callgroup = 0, pickupgroup = 0, readq = {first = 0xa41bb908, last = 0xa68029f8}, jb = {conf = {flags = 0, max_size = -1,
      resync_threshold = -1, impl = '\000' <repeats 11 times>, target_extra = -1}, impl = 0x0, jbobj = 0x0, timebase = {tv_sec = 0, tv_usec = 0}, next = 0, last_format = 0,
    logfile = 0x0, flags = 0}, dtmf_tv = {tv_sec = 0, tv_usec = 0}, datastores = {first = 0xa41ce0a8, last = 0x98bc888}, autochans = {first = 0x0, last = 0x0}, insmpl = 0,
  outsmpl = 0, fds = {920, 927, -1, -1, -1, -1, -1, -1, 742, -1}, _softhangup = 0, fdno = -1, streamid = -1, vstreamid = 0, oldwriteformat = 0, timingfd = 742,
  _state = AST_STATE_UP, rings = 0, priority = 2, macropriority = 1, amaflags = 3, adsicpe = AST_ADSI_UNKNOWN, fin = 6, fout = 0, hangupcause = 16, flags = 1536, alertpipe = {-1,
    -1}, nativeformats = 4, readformat = 64, writeformat = 64, rawreadformat = 4, rawwriteformat = 4, emulate_dtmf_duration = 0, visible_indication = 0, transfercapability = 0,
  bridge = 0x0, timer = 0xa40983a0, context = "macro-qmagent-answer-inbound", '\000' <repeats 51 times>, exten = "s\000\060", '\000' <repeats 76 times>,
  macrocontext = "qmqueue", '\000' <repeats 72 times>, macroexten = "680", '\000' <repeats 76 times>, emulate_dtmf_digit = 0 '\000', sending_dtmf_digit = 0 '\000',
  sending_dtmf_tv = {tv_sec = 0, tv_usec = 0}}
(gdb)
                  
> Asterisk crash in ast_cdr_setapp() at cdr.c
> -------------------------------------------
>
>                 Key: ASTERISK-23328
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23328
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: CDR/cdr_adaptive_odbc, CDR/General
>    Affects Versions: 1.8.25.0
>         Environment: OS: Linux CentOS 5.5
> Kernel: 2.6.18-348.16.1.el5PAE
> Hardware: Dell PowerEdge R210 II
>            Reporter: David Hajek
>            Assignee: Matt Jordan
>            Severity: Critical
>         Attachments: backtrace.txt, callfile.txt
>
>
> We are experiencing random asterisk crash (segfaults) on a busy server, which is doing about 50k calls a day. We see asterisk crash every other day.
> This server is running a callcenter and in addition to regular in/out calls this server is processing callfiles (about 3 per second). Some AGI dialplan scripts are processed using FastAGI over tcp sockets.
> We see that all crashes are in ast_cdr_setapp() - we tried both 1.8.24 and 1.8.25.
> For CDR we use cdr_adaptive_odbc with MySQL backend.

--
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