[Home]

Summary:ASTERISK-01777: ast_log when asterisk -cdv segfaults
Reporter:supaplex (supaplex)Labels:
Date Opened:2004-06-07 13:43:18Date Closed:2008-01-15 14:57:37.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:
Using Asterisk CVS-HEAD-06/07/04-12:03:35
This occurs on a earlier version as well, but I recompiled from head to make sure it wasn't fixed already.

I was not able to catch it while running gdb, however the -g switch was sufficent to produce a core dump, and then provide debugging.  Seems to require console ( -c ) as well, but haven't tried to reproduce otherwise.

Usualy it'll occur when I use:
asterisk -cdvvvv

asterisk1 (with the x100p) receives a call from asterisk2 (with the quicknet) via iax.  asterisk1 will crash after I hang up (about 75% fo the time)

#0  0x4032fc96 in send_packet (f=0x8169dd0) at chan_iax2.c:1185
1185                    ast_log(LOG_DEBUG, "Sending %d on %d/%d to %s:%d\n", f->ts, f->callno, iaxs[f->callno]->peercallno, inet_ntoa(iaxs[f->callno]->addr.sin_addr), ntohs(iaxs[f->callno]->addr.sin_port));
(gdb) where
#0  0x4032fc96 in send_packet (f=0x8169dd0) at chan_iax2.c:1185
#1  0x40336633 in timing_read (id=0x810dfd0, fd=12, events=23208, cbdata=0x0) at chan_iax2.c:4341
#2  0x080520b0 in ast_io_wait (ioc=0x1, howlong=0) at io.c:267
#3  0x4033e86d in network_thread (ignore=0x0) at chan_iax2.c:5800
#4  0x400200ba in pthread_start_thread () from /lib/libpthread.so.0
(gdb) bt full
#0  0x4032fc96 in send_packet (f=0x8169dd0) at chan_iax2.c:1185
       res = 1
       __PRETTY_FUNCTION__ = "send_packet"
#1  0x40336633 in timing_read (id=0x810dfd0, fd=12, events=23208, cbdata=0x0) at chan_iax2.c:4341
       buf = '\0' <repeats 87 times>, "\020\0\0\0\0\b÷ß?\005?\b\b\027\0\0\0À£\b\b?÷ß?T/\002@\027", '\0' <repeats 11 times>, "+\0\0\0+\0\0\0°±\020\bè\003\0\0?úß?\210úß?À±\020\be\0\0\0\002\0\0\0üÿÿÿ\0\0\0\0\0\0\0\0°k\026@#\0\0\0\206\002\0\0\210úß?+\0\0\0\bøß?\003P\0\210\0\0\0\0|÷ß?\027\0\0\0À£\b\b\216.\002@À±\020\bè\003\0\0°±\020\b\0\0\0\0+\0\0\0+\0\0\0\002\0\0\0\b\0\0\0\0\0\0\0\0üß??úß??v\f@\027", '\0' <repeats 11 times>...
       res = 0
       tpeer = (struct iax2_trunk_peer *) 0x80f5aa8
       prev = (struct iax2_trunk_peer *) 0x1
       drop = (struct iax2_trunk_peer *) 0x0
       processed = 1
       totalcalls = 0
       x = 1
       now = {tv_sec = 1086631704, tv_usec = 976483}
       __PRETTY_FUNCTION__ = "timing_read"
#2  0x080520b0 in ast_io_wait (ioc=0x1, howlong=0) at io.c:267
       res = 1
       x = 1077188312
       origcnt = 2
#3  0x4033e86d in network_thread (ignore=0x0) at chan_iax2.c:5800
       res = 1077189280
       f = (struct iax_frame *) 0x0
       freeme = (struct iax_frame *) 0x0
#4  0x400200ba in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
(gdb)

I'm using gcc-3.4 (freshly compiled) on debian woody
Comments:By: Mark Spencer (markster) 2004-06-07 15:02:51

Fixed in CVS

By: Digium Subversion (svnbot) 2008-01-15 14:57:37.000-0600

Repository: asterisk
Revision: 3169

U   trunk/channels/chan_iax2.c

------------------------------------------------------------------------
r3169 | markster | 2008-01-15 14:57:36 -0600 (Tue, 15 Jan 2008) | 2 lines

Simplify trunk transmission path and remove potential race (bug ASTERISK-1777)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=3169