[Home]

Summary:ASTERISK-13544: codec_g729 crashes system
Reporter:David Van Ginneken (davevg)Labels:
Date Opened:2009-02-09 11:17:19.000-0600Date Closed:2009-02-10 13:39:04.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Codecs/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Have not used this codec in a while so not sure when the issue was introduced.  If  I have the codec_g729a.so in the modules directory when I start asterisk, it immediately crashes when loading it.  (I tried multiple flavors of codec_g729a-1.6.0_3.0.1)  It also crashes if I manually try to load it from the CLI.  Not sure if it is related, but transcoding from ilbc to g722 on the same system is problematic.  Backtraces are below:


****** ADDITIONAL INFORMATION ******

Program terminated with signal 11, Segmentation fault.
#0  0x028e74b3 in g729tolin_new.8858 () from /usr/lib/asterisk/modules/codec_g729a.so
(gdb) bt
#0  0x028e74b3 in g729tolin_new.8858 () from /usr/lib/asterisk/modules/codec_g729a.so
#1  0x0813bbe4 in newpvt (t=0x299cf40) at translate.c:124
#2  0x0813c8bc in calc_cost (t=0x299cf40, seconds=1) at translate.c:402
#3  0x0813d957 in __ast_register_translator (t=0x299cf40, mod=0x9f8a838) at translate.c:672
#4  0x028ee909 in load_module.9228 () from /usr/lib/asterisk/modules/codec_g729a.so
ASTERISK-1  0x080d85b4 in load_resource (resource_name=0x9ed31a8 "codec_g729a.so", global_symbols_only=0) at loader.c:694
ASTERISK-2  0x080d8f1e in load_modules (preload_only=0) at loader.c:897
ASTERISK-3  0x0807bf6f in main (argc=3, argv=0xbf95ccc4) at asterisk.c:3424
ASTERISK-4  0x003a5dec in __libc_start_main () from /lib/libc.so.6
ASTERISK-5  0x0805c1e1 in SSL_accept ()

(gdb) bt full
#0  0x028e74b3 in g729tolin_new.8858 () from /usr/lib/asterisk/modules/codec_g729a.so
No symbol table info available.
#1  0x0813bbe4 in newpvt (t=0x299cf40) at translate.c:124
       pvt = (struct ast_trans_pvt *) 0x9f8aed8
       len = 21796
       useplc = 0
       ofs = 0x9f8c53c ""
       __PRETTY_FUNCTION__ = "newpvt"
#2  0x0813c8bc in calc_cost (t=0x299cf40, seconds=1) at translate.c:402
       num_samples = 0
       pvt = (struct ast_trans_pvt *) 0x20642520
       start = {ru_utime = {tv_sec = -1080704280, tv_usec = 135117669}, ru_stime = {tv_sec = 135982728, tv_usec = 4}, ru_maxrss = -1080704008,
 ru_ixrss = 135120946, ru_idrss = 135982728, ru_isrss = 135838611, ru_minflt = 0, ru_majflt = 135838611, ru_nswap = 135837932,
 ru_inblock = 167293069, ru_oublock = 6, ru_msgsnd = 7440052, ru_msgrcv = 1025515647, ru_nsignals = 1866866749, ru_nvcsw = 543452789,
 ru_nivcsw = 1635020660}
       end = {ru_utime = {tv_sec = 5307233, tv_usec = 1}, ru_stime = {tv_sec = 1, tv_usec = 5341172}, ru_maxrss = 5294233, ru_ixrss = 260071,
 ru_idrss = 14, ru_isrss = 1, ru_minflt = 12, ru_majflt = 5042164, ru_nswap = 4, ru_inblock = -1080704240, ru_oublock = -1080704312,
 ru_msgsnd = 5294224, ru_msgrcv = -1080704296, ru_nsignals = 4642310, ru_nvcsw = 135982728, ru_nivcsw = 167293128}
       cost = 842477127
       out_rate = 8000
       __PRETTY_FUNCTION__ = "calc_cost"
#3  0x0813d957 in __ast_register_translator (t=0x299cf40, mod=0x9f8a838) at translate.c:672
       u = (struct ast_translator *) 0xbf95c310
       tmp = "p??\tx??\t\000\003\000\000?\000\000\000|fK\000x??\t?1?\t??\225?\212\224q\000x??\t\024\000\000\000???\t4\234\200\0004\234\200\000\000\000\000\000\n\024\000\000???\t??\t&\000\000\000@\001M"
       added_cli = 1
       __PRETTY_FUNCTION__ = "__ast_register_translator"
#4  0x028ee909 in load_module.9228 () from /usr/lib/asterisk/modules/codec_g729a.so
No symbol table info available.
ASTERISK-1  0x080d85b4 in load_resource (resource_name=0x9ed31a8 "codec_g729a.so", global_symbols_only=0) at loader.c:694
       mod = (struct ast_module *) 0x9f8a838
       res = AST_MODULE_LOAD_SUCCESS
       tmp = "\033[33;40mTrivial Record Application\033[0;37;40m\000)\033[0;37;40m\0000m\000;40m\000\000m\000\033[0;37;40m\000\000??\031\b??L\000?|8\000?\223?\t\230?\225??\203?\000??\225?\006?F\000\210?\032\b\000\000?r??\225?e?\r\b\210?\032\b\020\000\000\0008?\225?\030fK\000\210?\032\b??\030\bD\000\000\000??\225?6?\030\b??L\000@\001M\000?d?\t?b\220I??\003\000@\001M\000T?\225??b\220I??L\000"...
       __PRETTY_FUNCTION__ = "load_resource"
ASTERISK-2  0x080d8f1e in load_modules (preload_only=0) at loader.c:897
       __list_head = (struct load_order *) 0xbf95c6b0
       __list_next = (struct load_order_entry *) 0x9ed31c0
       __list_prev = (struct load_order_entry *) 0x0
       __new_prev = (struct load_order_entry *) 0x9ed3198
---Type <return> to continue, or q <return> to quit---
       cfg = (struct ast_config *) 0x9ec64c8
       mod = (struct ast_module *) 0x0
       order = (struct load_order_entry *) 0x9ed3198
       v = (struct ast_variable *) 0x0
       load_count = 176
       load_order = {first = 0x9ed3198, last = 0x9ece9b0}
       res = 0
       config_flags = {flags = 0}
       modulecount = 56
       dirent = (struct dirent *) 0x0
       dir = (DIR *) 0x9ec87d8
       __PRETTY_FUNCTION__ = "load_modules"
ASTERISK-3  0x0807bf6f in main (argc=3, argv=0xbf95ccc4) at asterisk.c:3424
       c = -1
       filename = "/root/.asterisk_history", '\0' <repeats 56 times>
       hostname = "asterisk", '\0' <repeats 55 times>
       tmp = "\000?\225???7\000\020\2108\000?P??\001\000\000\000\230\\P\000??L\000@\001M\000\200\002\002\000\030?\225????\000@\001M\000\035\000\000\000,\000\000\000@\001M\000\200\235?\t\035\000\000\000\200\002\002\000`i\032\b?R\026\b"
       xarg = 0x0
       x = 3
       f = (FILE *) 0x9e60490
       sigs = {__val = {134238211, 0 <repeats 31 times>}}
       num = 0
       isroot = 1
       buf = 0x9e59d88 "`\235?\t?R\026\b\224\235?\tRevision: 137082"
       runuser = 0x0
       rungroup = 0x0
       remotesock = 0x0
       __PRETTY_FUNCTION__ = "main"
       __func__ = "main"
ASTERISK-4  0x003a5dec in __libc_start_main () from /lib/libc.so.6
No symbol table info available.
ASTERISK-5  0x0805c1e1 in SSL_accept ()
No symbol table info available.


Comments:By: Terry Wilson (twilson) 2009-02-09 16:05:38.000-0600

Are you running on Asterisk 1.6.0.5 or 1.6.1 r174221?  I have tested both a recent 1.6.1 checkout and 1.6.0.5 with the latest codec g729 (opteron) w/o crash and calls being completed normally.  What CPU and distro are you experiencing the crash on?

By: David Van Ginneken (davevg) 2009-02-09 16:08:36.000-0600

It is 1.6.1 r174221 (checked out and compiled this morning)

cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Celeron(R) CPU 2.60GHz
stepping        : 9
cpu MHz         : 2625.873
cache size      : 128 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe up cid xtpr
bogomips        : 5254.32


Running CentOS 5.2 with the following Kernel
Linux asterisk 2.6.18-92.1.10.el5 #1 SMP Tue Aug 5 07:41:53 EDT 2008 i686 i686 i386 GNU/Linux

Edit:  I can give access to the server if needed.



By: Terry Wilson (twilson) 2009-02-10 10:02:46.000-0600

I have recreated this on Centos 5.2 x86 under vmware.  Hopefully I can track this down, now.

By: Terry Wilson (twilson) 2009-02-10 13:07:14.000-0600

There is an API change between 1.6.0 and 1.6.1, so there is no version of codec_g729 for 1.6.1 yet, so we'll have to make one (shortly).  Stay tuned...

By: Terry Wilson (twilson) 2009-02-10 13:39:04.000-0600

Just as a follow up, the 1.6.1 version of the codec is now posted at downloads.digium.com