Hello,
I am getting frequent segmentation fault when starting asterisk, by frequent I mean ~ 7 out of 10 manual start ends in seg fault .
Then it is not clear to me why sometimes it start and others it fails
Can you guide me to a procedure to figure out what is wrong ?
here’s how I test a start
root@toip1:~# asterisk -U asterisk -g -cv
I run on:
root@toip1:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 6.0.5 (squeeze)
Release: 6.0.5
Codename: squeeze
arch
x86_64
dpkg -l | grep asterisk
ii asterisk 1:1.8.11.1-1digium1~squeeze Open Source Private Branch Exchange (PBX)
ii asterisk-config 1:1.8.11.1-1digium1~squeeze Configuration files for Asterisk
ii asterisk-core-sounds-en-gsm 1.4.21-1digium1~squeeze asterisk PBX sound files - English/gsm
ii asterisk-dahdi 1:1.8.11.1-1digium1~squeeze DAHDI devices support for the Asterisk PBX
ii asterisk-moh-opsound-wav 2.03-1 asterisk extra sound files - English/wav
ii asterisk-voicemail 1:1.8.11.1-1digium1~squeeze simple voicemail support for the Asterisk PBX
when it occationnaly starts, I have:
*CLI> core show sysinfo
System Statistics
System Uptime: 29 hours
Total RAM: 33006520 KiB
Free RAM: 32020812 KiB
Buffer RAM: 83112 KiB
Total Swap Space: 34996216 KiB
Free Swap Space: 34996216 KiB
Number of Processes: 257
*CLI> core show version
Asterisk 1.8.11.1-1digium1~squeeze built by pbuilder @ nighthawk on a x86_64 running Linux on 2012-04-25 17:23:34 UTC
*CLI> module show
Module Description Use Count
res_calendar.so Asterisk Calendar integration 4
…
res_convert.so File format conversion CLI command 0
227 modules loaded
*CLI> dahdi show status
Description Alarms IRQ bpviol CRC Fra Codi Options LBO
wanpipe1 card 0 RED 0 0 0 CCS HDB3 CRC4 0 db (CSU)/0-133 feet (DSX-1)
wanpipe2 card 1 RED 0 0 0 CCS HDB3 CRC4 0 db (CSU)/0-133 feet (DSX-1)
wanpipe3 card 2 RED 0 0 0 CCS HDB3 CRC4 0 db (CSU)/0-133 feet (DSX-1)
wanpipe4 card 3 RED 0 0 0 CCS HDB3 CRC4 0 db (CSU)/0-133 feet (DSX-1)
root@toip1:/var/lib/asterisk# gdb -se “asterisk” -c core | tee /tmp/backtrace.txt
…
Loaded symbols for /usr/lib/asterisk/modules/res_convert.so
Core was generated by `asterisk -U asterisk -g -cv’.
Program terminated with signal 11, Segmentation fault. #0 0x00007fe874fe8702 in ?? () from /lib/libc.so.6
(gdb) bt #0 0x00007fe874fe8702 in ?? () from /lib/libc.so.6 #1 0x00007fe859a09b81 in vpb_read_confll(CONF_INFO*) () from /usr/lib/libvpb.so.0 #2 0x00007fe859a17819 in VPBRegister::VPBRegister() () from /usr/lib/libvpb.so.0 #3 0x00007fe859a0dfbc in ?? () from /usr/lib/libvpb.so.0 #4 0x00007fe859a0ebe9 in vpb_get_num_cards() () from /usr/lib/libvpb.so.0 #5 0x00007fe859c5d9e0 in ?? () from /usr/lib/asterisk/modules/chan_vpb.so #6 0x00000000004b11a7 in ?? () #7 0x00000000004b1852 in ?? () #8 0x00000000004b1c35 in ?? () #9 0x000000000043929d in ?? () #10 0x00007fe874fcfc8d in __libc_start_main () from /lib/libc.so.6 #11 0x0000000000422299 in ?? () #12 0x00007fff933653b8 in ?? () #13 0x000000000000001c in ?? () #14 0x0000000000000005 in ?? () #15 0x00007fff93366e79 in ?? () #16 0x00007fff93366e82 in ?? () #17 0x00007fff93366e85 in ?? () #18 0x00007fff93366e8e in ?? () #19 0x00007fff93366e91 in ?? () #20 0x0000000000000000 in ?? ()
then issued
(gdb) thread apply all bt
Thread 45 (Thread 23271): #0 0x00007fe8750759d3 in poll () from /lib/libc.so.6 #1 0x00007fe8574e71aa in ?? () from /usr/lib/asterisk/modules/chan_dahdi.so #2 0x00000000005140da in ?? () #3 0x00007fe8746428ca in start_thread () from /lib/libpthread.so.0 #4 0x00007fe87508092d in clone () from /lib/libc.so.6 #5 0x0000000000000000 in ?? ()
…
Thread 1 (Thread 23236): #0 0x00007fe874fe8702 in ?? () from /lib/libc.so.6 #1 0x00007fe859a09b81 in vpb_read_confll(CONF_INFO*) () from /usr/lib/libvpb.so.0 #2 0x00007fe859a17819 in VPBRegister::VPBRegister() () from /usr/lib/libvpb.so.0 #3 0x00007fe859a0dfbc in ?? () from /usr/lib/libvpb.so.0 #4 0x00007fe859a0ebe9 in vpb_get_num_cards() () from /usr/lib/libvpb.so.0 #5 0x00007fe859c5d9e0 in ?? () from /usr/lib/asterisk/modules/chan_vpb.so #6 0x00000000004b11a7 in ?? () #7 0x00000000004b1852 in ?? () #8 0x00000000004b1c35 in ?? () #9 0x000000000043929d in ?? () #10 0x00007fe874fcfc8d in __libc_start_main () from /lib/libc.so.6 #11 0x0000000000422299 in ?? ()
From there, how can I determined which modules (or whatever else) created the seg fault ?
before removing it, when it eventually starts (3 out of 10 times, it still strange that it works sometime !?)
I do have :
*CLI> module show like vpb
Module Description Use Count
chan_vpb.so Voicetronix API driver 0
1 modules loaded
Now I removed the load of that module from modules.conf :
noload => chan_vpb.so
and it starts fine
don’t know what this module is used for … but I hope it won’t prevent me from using my dahdi sangoma board !?