I have recently installed Asterisk 1.6.2.17 64 Bit on a Dual Core
system, 2 gig memory, 2 Port Digium PRI card and 4 port FXO card using
Fedora 12 with Digiums licensed faxing software.
I downloaded the required codec G723 and G729 and thought I am using
it successfully on my system, however I am trying to find out why my
system just stop responding with multaple open calls in the Dial
state.
I read on this forum about Valgrind and tried it.
Every time I start Asterisk with "valgrind asterisk" asterisk starts
but shortly thereafter I get a core dump...
"/root
[root@asterisk40100 ~]# valgrind asterisk
==2158== Memcheck, a memory error detector
==2158== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et
al.
==2158== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright
info
==2158== Command: asterisk
==2158==
==2158==
==2158== HEAP SUMMARY:
==2158== in use at exit: 13,546 bytes in 128 blocks
==2158== total heap usage: 166 allocs, 38 frees, 19,113 bytes
allocated
==2158==
==2158== LEAK SUMMARY:
==2158== definitely lost: 0 bytes in 0 blocks
==2158== indirectly lost: 0 bytes in 0 blocks
==2158== possibly lost: 9,328 bytes in 2 blocks
==2158== still reachable: 4,218 bytes in 126 blocks
==2158== suppressed: 0 bytes in 0 blocks
==2158== Rerun with --leak-check=full to see details of leaked memory
==2158==
==2158== For counts of detected and suppressed errors, rerun with: -v
==2158== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 6 from
6)
[root@asterisk40100 ~]# ==2158== Invalid read of size 1
==2158== at 0x34B9A14251: _dl_close (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A0DD45: _dl_catch_error (in /lib64/
ld-2.11.so)
==2158== by 0x34BA20129B: _dlerror_run (in /lib64/
libdl-2.11.so)
==2158== by 0x34BA20100E: dlclose (in /lib64/
libdl-2.11.so)
==2158== by 0x49E18F: load_dynamic_module (loader.c:413)
==2158== by 0x49F60A: load_resource (loader.c:794)
==2158== by 0x49F88A: load_resource_list (loader.c:900)
==2158== by 0x49FD85: load_modules (loader.c:1063)
==2158== by 0x433B73: main (asterisk.c:3754)
==2158== Address 0x58951c4 is 980 bytes inside a block of size 1,205
free'd
==2158== at 0x4A04D72: free (vg_replace_malloc.c:325)
==2158== by 0x34B9A13B70: _dl_close_worker (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A1427D: _dl_close (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A0DD45: _dl_catch_error (in /lib64/
ld-2.11.so)
==2158== by 0x34BA20129B: _dlerror_run (in /lib64/
libdl-2.11.so)
==2158== by 0x34BA20100E: dlclose (in /lib64/
libdl-2.11.so)
==2158== by 0x49E18F: load_dynamic_module (loader.c:413)
==2158== by 0x49F60A: load_resource (loader.c:794)
==2158== by 0x49F88A: load_resource_list (loader.c:900)
==2158== by 0x49FD85: load_modules (loader.c:1063)
==2158== by 0x433B73: main (asterisk.c:3754)
==2158==
==2158== Invalid read of size 1
==2158== at 0x3803F6F9: vgPlain_amd64_linux_REDIR_FOR_strlen
(m_trampoline.S:180)
==2158== by 0x34B9A0DE36: _dl_signal_error (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A142A5: _dl_close (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A0DD45: _dl_catch_error (in /lib64/
ld-2.11.so)
==2158== by 0x34BA20129B: _dlerror_run (in /lib64/
libdl-2.11.so)
==2158== by 0x34BA20100E: dlclose (in /lib64/
libdl-2.11.so)
==2158== by 0x49E18F: load_dynamic_module (loader.c:413)
==2158== by 0x49F60A: load_resource (loader.c:794)
==2158== by 0x49F88A: load_resource_list (loader.c:900)
==2158== by 0x49FD85: load_modules (loader.c:1063)
==2158== by 0x433B73: main (asterisk.c:3754)
==2158== Address 0x5894d80 is 0 bytes inside a block of size 45
free'd
==2158== at 0x4A04D72: free (vg_replace_malloc.c:325)
==2158== by 0x34B9A13ADF: _dl_close_worker (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A1427D: _dl_close (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A0DD45: _dl_catch_error (in /lib64/
ld-2.11.so)
==2158== by 0x34BA20129B: _dlerror_run (in /lib64/
libdl-2.11.so)
==2158== by 0x34BA20100E: dlclose (in /lib64/
libdl-2.11.so)
==2158== by 0x49E18F: load_dynamic_module (loader.c:413)
==2158== by 0x49F60A: load_resource (loader.c:794)
==2158== by 0x49F88A: load_resource_list (loader.c:900)
==2158== by 0x49FD85: load_modules (loader.c:1063)
==2158== by 0x433B73: main (asterisk.c:3754)
==2158==
==2158== Invalid read of size 1
==2158== at 0x3803F705: vgPlain_amd64_linux_REDIR_FOR_strlen
(m_trampoline.S:184)
==2158== by 0x34B9A0DE36: _dl_signal_error (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A142A5: _dl_close (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A0DD45: _dl_catch_error (in /lib64/
ld-2.11.so)
==2158== by 0x34BA20129B: _dlerror_run (in /lib64/
libdl-2.11.so)
==2158== by 0x34BA20100E: dlclose (in /lib64/
libdl-2.11.so)
==2158== by 0x49E18F: load_dynamic_module (loader.c:413)
==2158== by 0x49F60A: load_resource (loader.c:794)
==2158== by 0x49F88A: load_resource_list (loader.c:900)
==2158== by 0x49FD85: load_modules (loader.c:1063)
==2158== by 0x433B73: main (asterisk.c:3754)
==2158== Address 0x5894d81 is 1 bytes inside a block of size 45
free'd
==2158== at 0x4A04D72: free (vg_replace_malloc.c:325)
==2158== by 0x34B9A13ADF: _dl_close_worker (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A1427D: _dl_close (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A0DD45: _dl_catch_error (in /lib64/
ld-2.11.so)
==2158== by 0x34BA20129B: _dlerror_run (in /lib64/
libdl-2.11.so)
==2158== by 0x34BA20100E: dlclose (in /lib64/
libdl-2.11.so)
==2158== by 0x49E18F: load_dynamic_module (loader.c:413)
==2158== by 0x49F60A: load_resource (loader.c:794)
==2158== by 0x49F88A: load_resource_list (loader.c:900)
==2158== by 0x49FD85: load_modules (loader.c:1063)
==2158== by 0x433B73: main (asterisk.c:3754)
==2158==
==2158== Invalid read of size 1
==2158== at 0x34B9A17BEE: memcpy (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A0DE7B: _dl_signal_error (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A142A5: _dl_close (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A0DD45: _dl_catch_error (in /lib64/
ld-2.11.so)
==2158== by 0x34BA20129B: _dlerror_run (in /lib64/
libdl-2.11.so)
==2158== by 0x34BA20100E: dlclose (in /lib64/
libdl-2.11.so)
==2158== by 0x49E18F: load_dynamic_module (loader.c:413)
==2158== by 0x49F60A: load_resource (loader.c:794)
==2158== by 0x49F88A: load_resource_list (loader.c:900)
==2158== by 0x49FD85: load_modules (loader.c:1063)
==2158== by 0x433B73: main (asterisk.c:3754)
==2158== Address 0x5894da0 is 32 bytes inside a block of size 45
free'd
==2158== at 0x4A04D72: free (vg_replace_malloc.c:325)
==2158== by 0x34B9A13ADF: _dl_close_worker (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A1427D: _dl_close (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A0DD45: _dl_catch_error (in /lib64/
ld-2.11.so)
==2158== by 0x34BA20129B: _dlerror_run (in /lib64/
libdl-2.11.so)
==2158== by 0x34BA20100E: dlclose (in /lib64/
libdl-2.11.so)
==2158== by 0x49E18F: load_dynamic_module (loader.c:413)
==2158== by 0x49F60A: load_resource (loader.c:794)
==2158== by 0x49F88A: load_resource_list (loader.c:900)
==2158== by 0x49FD85: load_modules (loader.c:1063)
==2158== by 0x433B73: main (asterisk.c:3754)
==2158==
==2158== Invalid read of size 2
==2158== at 0x34B9A17BFE: memcpy (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A0DE7B: _dl_signal_error (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A142A5: _dl_close (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A0DD45: _dl_catch_error (in /lib64/
ld-2.11.so)
==2158== by 0x34BA20129B: _dlerror_run (in /lib64/
libdl-2.11.so)
==2158== by 0x34BA20100E: dlclose (in /lib64/
libdl-2.11.so)
==2158== by 0x49E18F: load_dynamic_module (loader.c:413)
==2158== by 0x49F60A: load_resource (loader.c:794)
==2158== by 0x49F88A: load_resource_list (loader.c:900)
==2158== by 0x49FD85: load_modules (loader.c:1063)
==2158== by 0x433B73: main (asterisk.c:3754)
==2158== Address 0x5895f60 is 32 bytes inside a block of size 42
free'd
==2158== at 0x4A04D72: free (vg_replace_malloc.c:325)
==2158== by 0x34B9A13ADF: _dl_close_worker (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A1427D: _dl_close (in /lib64/
ld-2.11.so)
==2158== by 0x34B9A0DD45: _dl_catch_error (in /lib64/
ld-2.11.so)
==2158== by 0x34BA20129B: _dlerror_run (in /lib64/
libdl-2.11.so)
==2158== by 0x34BA20100E: dlclose (in /lib64/
libdl-2.11.so)
==2158== by 0x49E18F: load_dynamic_module (loader.c:413)
==2158== by 0x49F60A: load_resource (loader.c:794)
==2158== by 0x49F88A: load_resource_list (loader.c:900)
==2158== by 0x49FD85: load_modules (loader.c:1063)
==2158== by 0x433B73: main (asterisk.c:3754)
==2158==
vex amd64->IR: unhandled instruction bytes: 0x48 0xF 0x5A 0x0 0x48 0xF
==2158== valgrind: Unrecognised instruction at address 0xd3fb897.
==2158== Your program just tried to execute an instruction that
Valgrind
==2158== did not recognise. There are two possible reasons for this.
==2158== 1. Your program has a bug and erroneously jumped to a non-
code
==2158== location. If you are running Memcheck and you just saw a
==2158== warning about a bad jump, it's probably your program's
fault.
==2158== 2. The instruction is legitimate but Valgrind doesn't handle
it,
==2158== i.e. it's Valgrind's fault. If you think this is the case
or
==2158== you are not sure, please let us know and we'll try to fix
it.
==2158== Either way, Valgrind will now raise a SIGILL signal which
will
==2158== probably kill your program.
==2158==
==2158== Process terminating with default action of signal 4 (SIGILL):
dumping core
==2158== Illegal opcode at address 0xD3FB897
==2158== at 0xD3FB897: ??? (in /usr/lib/asterisk/modules/codec_g729-
ast16-gcc4-glibc-x86_64-core2.so)
==2158== by 0xD3C4A61: DecodeGain_G729 (in /usr/lib/asterisk/
modules/codec_g729-ast16-gcc4-glibc-x86_64-core2.so)
==2158== by 0xD3B8F8F: apiG729FPDecode (in /usr/lib/asterisk/
modules/codec_g729-ast16-gcc4-glibc-x86_64-core2.so)
==2158== by 0xD3B55F5: ??? (in /usr/lib/asterisk/modules/codec_g729-
ast16-gcc4-glibc-x86_64-core2.so)
==2158== by 0x50036E: framein (translate.c:176)
==2158== by 0x50187E: calc_cost (translate.c:396)
==2158== by 0x50201F: __ast_register_translator (translate.c:647)
==2158== by 0xD3B5AE9: ??? (in /usr/lib/asterisk/modules/codec_g729-
ast16-gcc4-glibc-x86_64-core2.so)
==2158== by 0x49F382: start_resource (loader.c:743)
==2158== by 0x49F97E: load_resource_list (loader.c:921)
==2158== by 0x49FD9C: load_modules (loader.c:1068)
==2158== by 0x433B73: main (asterisk.c:3754)
==2158==
==2158== HEAP SUMMARY:
==2158== in use at exit: 4,213,190 bytes in 37,540 blocks
==2158== total heap usage: 130,602 allocs, 93,062 frees, 24,511,508
bytes allocated
==2158==
==2158== LEAK SUMMARY:
==2158== definitely lost: 30,637 bytes in 539 blocks
==2158== indirectly lost: 3,188 bytes in 191 blocks
==2158== possibly lost: 3,232,168 bytes in 30,072 blocks
==2158== still reachable: 947,197 bytes in 6,738 blocks
==2158== suppressed: 0 bytes in 0 blocks
==2158== Rerun with --leak-check=full to see details of leaked memory
==2158==
==2158== For counts of detected and suppressed errors, rerun with: -v
==2158== ERROR SUMMARY: 16429 errors from 5 contexts (suppressed: 3335
from 23)"
I have tried using the Barcelona version and got the same result.
This happens with g723 also if I delete the g729 codec.
I have deleted the g723 abd g729 codec's and via Valgind asterisk
starts 100% and is fully opperational.
Anybody have some advice for me.
I tried to compile the code myself but I am battling to get the
relevant IPP libraries for version 6.0 or 6.1
I have 2 core dumps availbel if need be.
Thanks