[Home]

Summary:ASTERISK-07845: Core dump on hangup in socket_process after multi pbx transfer
Reporter:Douglas Garstang (dgarstang)Labels:
Date Opened:2006-09-29 16:43:30Date Closed:2006-10-02 10:01:01
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I have three Polycom SIP appearances.

9220370 calls 3254101. Both are registered on the same asterisk system, xxx.187.140.167(pbx1). For reasons that I will skip explaining here, in our DUNDi cluster, each node has itself as a peer, and therefore returns local paths when the desired number is available locally. So, a DUNDi lookup of 3254101 is done and 9220370 is dialled via the supplied DUNDi path (to itself), which uses IAX. The call is bridged.

We not have a call path of:
9220370 -> pbx1 -> 3254101

3254101 then transfers 9220370 to 3254103. Now, 3254103 is registered on a different asterisk box, xxx.187.140.169(pbx3). Once again a DUNDi lookup is performed on 3254103, and that number is dialled by the supplied DUNDi path, which uses IAX again.

I assume we now have a call path like this:
9220370 -> pbx1 -> pbx3 -> 3254103

Everything is fine until 3254103 hangs up. When that happens, the asterisk process on pbx3 dumps core. This problem is reasonably reproducable.

Now, the bug guidelines don't say what to do with core dumps. I tried uploading the core files and mantis puked. Here's a backtrace:

#0  0xb7784f9c in socket_process (thread=0x8193500) at chan_iax2.c:7598
7598            if (iaxs[fr->callno]->last < fr->ts) {
(gdb)
(gdb) bt
#0  0xb7784f9c in socket_process (thread=0x8193500) at chan_iax2.c:7598
#1  0xb778ef7b in iax2_process_thread (data=0x8193500) at chan_iax2.c:7653
#2  0x080ec859 in dummy_start (data=0x81855a0) at utils.c:538
#3  0xb7f6d294 in start_thread () from /lib/libpthread.so.0
#4  0xb7da032e in clone () from /lib/libc.so.6
(gdb)

What's the best way to supply the core files? What confg files should I include, because we're talking several files with lots of includes over two systems.

This is Asterisk 1.4-beta2.



Comments:By: Douglas Garstang (dgarstang) 2006-09-29 16:51:09

Correction: We aren't connecting to outself with DUNDi. We are using ChanIsAvail() first to determine if the number is local, and if is, are dialling it directly. If it's not available locally, THEN DUNDi is being used. My bad.

By: Serge Vecher (serge-v) 2006-10-02 08:47:32

dgarstang: the core files are not necessary, but a backtrace is. Also, the backtrace needs to be from Asterisk built with "DONT OPTIMIZE" checked off under compiler options in menuselect. In addition to bt, please also execute 'bt full'

Thanks

By: Douglas Garstang (dgarstang) 2006-10-02 09:49:44

I recompiled asterisk with DONT OPTIMIZE enabled, and could not reproduce the problem. I recompiled again with the original settings and STILL can't reproduce it anymore.

Here's the 'bt full' anyways...

(gdb) bt full
#0  0xb7784f9c in socket_process (thread=0x8193500) at chan_iax2.c:7598
       callno = <value optimized out>
       trunked_ts = <value optimized out>
       len = <value optimized out>
       metatype = <value optimized out>
       sin = {sin_family = 2, sin_port = 55569, sin_addr = {s_addr = 2811018200}, sin_zero = "\000\000\000\000\000\000\000"}
       res = 164
       updatehistory = 1
       new = <value optimized out>
       ptr = <value optimized out>
       dcallno = <value optimized out>
       fh = <value optimized out>
       mth = <value optimized out>
       cur = (struct iax_frame *) 0x0
       f = {frametype = AST_FRAME_VOICE, subclass = 4, datalen = 160, samples = 160, mallocd = 0, mallocd_hdr_len = 0,
 offset = 0, src = 0xb779382f "IAX2", data = 0x8193588, delivery = {tv_sec = 0, tv_usec = 0}, frame_list = {next = 0x0},
 has_timing_info = 0, ts = 0, len = 0, seqno = 0}
       c = <value optimized out>
       dp = <value optimized out>
       tpeer = <value optimized out>
       ies = {called_number = 0x0, calling_number = 0x0, calling_ani = 0x0, calling_name = 0x0, calling_ton = 0, calling_tns = 0,
 calling_pres = 0, called_context = 0x0, username = 0x0, password = 0x0, capability = 0, format = 0, codec_prefs = 0x0,
 language = 0x0, version = 0, adsicpe = 0, dnid = 0x0, rdnis = 0x0, authmethods = 0, encmethods = 0, challenge = 0x0,
 md5_result = 0x0, rsa_result = 0x0, apparent_addr = 0x0, refresh = 0, dpstatus = 0, callno = 0, cause = 0x0, causecode = 0 '\0',
 iax_unknown = 0 '\0', msgcount = 0, autoanswer = 0, musiconhold = 0, transferid = 0, datetime = 0, devicetype = 0x0,
 serviceident = 0x0, firmwarever = 0, fwdesc = 0, fwdata = 0x0, fwdatalen = 0 '\0', enckey = 0x0, enckeylen = 0 '\0',
 provver = 0, samprate = 0, provverpres = 0, rr_jitter = 0, rr_loss = 0, rr_pkts = 0, rr_delay = 0, rr_dropped = 0, rr_ooo = 0}
       ied0 = {buf = '\0' <repeats 1023 times>, pos = 0}
       ied1 = {buf = "\t\004\000\000\000\004", '\0' <repeats 1017 times>, pos = 6}
       format = <value optimized out>
       fd = 9
       exists = <value optimized out>
       minivid = 0
       empty = '\0' <repeats 31 times>
       duped_fr = <value optimized out>
       host_pref_buf = "(ulaw|g729)", '\0' <repeats 116 times>
       caller_pref_buf = "(ulaw|g729)", '\0' <repeats 116 times>
       pref = {order = "\003\t", '\0' <repeats 29 times>, framing = "\024\024", '\0' <repeats 29 times>}
       using_prefs = <value optimized out>
       __PRETTY_FUNCTION__ = "socket_process"
#1  0xb778ef7b in iax2_process_thread (data=0x8193500) at chan_iax2.c:7653
       curelm = <value optimized out>
       thread = (struct iax2_thread *) 0x0
       ts = {tv_sec = -1211051231, tv_nsec = 135864584}
#2  0x080ec859 in dummy_start (data=0x81855a0) at utils.c:538
       __cancel_buf = {__cancel_jmp_buf = {{__cancel_jmp_buf = {135864584, 0, 0, -1217264536, 928474548, -2010404378},
     __mask_was_saved = 0}}, __pad = {0xb77204a0, 0x0, 0x0, 0x0}}
       __cancel_arg = (void *) 0xb7720ba0
       not_first_call = <value optimized out>
       ret = <value optimized out>
#3  0xb7f6d294 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#4  0xb7da032e in clone () from /lib/libc.so.6
No symbol table info available.

By: Joshua C. Colp (jcolp) 2006-10-02 10:01:00

I have already fixed this in the 1.4 branch and trunk, it will go into the next 1.4 beta release.