[Asterisk-Dev] Segfault

Tamas Jalsovszky jalsot at gmail.com
Sun Aug 28 10:51:49 MST 2005


Hello,

I got a segmentation fault with:
Asterisk CVS-NHEAD-08/17/05-20:51:51
running on Linux-2.6.12.3.

The system is used for making outbound IVR (with pbx_spool dialing Local
channel which sets CLIR and than dials out to the given number, after
connect I use FastAGI to run the IVR and have the hangup extension to
call another fastagi script for handling some info).

The gdb output:
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux"...Using host libthread_db
library "/lib/tls/i686/cmov/libthread_db.so.1".

Core was generated by `asterisk -U icall -G icall -vvvg -c'.
Program terminated with signal 11, Segmentation fault.

warning: current_sos: Can't read pathname for load map: Input/output error

Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libncurses.so.5...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /usr/lib/i686/cmov/libssl.so.0.9.7...done.
Loaded symbols for /usr/lib/i686/cmov/libssl.so.0.9.7
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/i686/cmov/libcrypto.so.0.9.7...done.
Loaded symbols for /usr/lib/i686/cmov/libcrypto.so.0.9.7
Reading symbols from /lib/libnss_compat.so.2...done.
Loaded symbols for /lib/libnss_compat.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libnss_nis.so.2...done.
Loaded symbols for /lib/libnss_nis.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /usr/lib/asterisk/modules/res_musiconhold.so...done.
Loaded symbols for /usr/lib/asterisk/modules/res_musiconhold.so
Reading symbols from /usr/lib/asterisk/modules/res_adsi.so...done.
Loaded symbols for /usr/lib/asterisk/modules/res_adsi.so
Reading symbols from /usr/lib/asterisk/modules/res_features.so...done.
Loaded symbols for /usr/lib/asterisk/modules/res_features.so
Reading symbols from /usr/lib/asterisk/modules/res_crypto.so...done.
Loaded symbols for /usr/lib/asterisk/modules/res_crypto.so
Reading symbols from /usr/lib/asterisk/modules/res_indications.so...done.
Loaded symbols for /usr/lib/asterisk/modules/res_indications.so
Reading symbols from /usr/lib/asterisk/modules/res_monitor.so...done.
Loaded symbols for /usr/lib/asterisk/modules/res_monitor.so
Reading symbols from /usr/lib/asterisk/modules/res_agi.so...done.
Loaded symbols for /usr/lib/asterisk/modules/res_agi.so
Reading symbols from /usr/lib/asterisk/modules/chan_agent.so...done.
Loaded symbols for /usr/lib/asterisk/modules/chan_agent.so
Reading symbols from /usr/lib/asterisk/modules/chan_iax2.so...done.
Loaded symbols for /usr/lib/asterisk/modules/chan_iax2.so
Reading symbols from /usr/lib/asterisk/modules/chan_local.so...done.
Loaded symbols for /usr/lib/asterisk/modules/chan_local.so
Reading symbols from /usr/lib/asterisk/modules/chan_features.so...done.
Loaded symbols for /usr/lib/asterisk/modules/chan_features.so
Reading symbols from /usr/lib/asterisk/modules/chan_zap.so...done.
Loaded symbols for /usr/lib/asterisk/modules/chan_zap.so
Reading symbols from /usr/lib/libpri.so.1...done.
Loaded symbols for /usr/lib/libpri.so.1
Reading symbols from /usr/lib/libtonezone.so.1...done.
Loaded symbols for /usr/lib/libtonezone.so.1
Reading symbols from /usr/lib/asterisk/modules/pbx_config.so...done.
Loaded symbols for /usr/lib/asterisk/modules/pbx_config.so
Reading symbols from /usr/lib/asterisk/modules/pbx_spool.so...done.
Loaded symbols for /usr/lib/asterisk/modules/pbx_spool.so
Reading symbols from /usr/lib/asterisk/modules/pbx_loopback.so...done.
Loaded symbols for /usr/lib/asterisk/modules/pbx_loopback.so
Reading symbols from /usr/lib/asterisk/modules/pbx_realtime.so...done.
Loaded symbols for /usr/lib/asterisk/modules/pbx_realtime.so
Reading symbols from /usr/lib/asterisk/modules/pbx_ael.so...done.
Loaded symbols for /usr/lib/asterisk/modules/pbx_ael.so
Reading symbols from /usr/lib/asterisk/modules/pbx_functions.so...done.
Loaded symbols for /usr/lib/asterisk/modules/pbx_functions.so
Reading symbols from /usr/lib/asterisk/modules/app_dial.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_dial.so
Reading symbols from /usr/lib/asterisk/modules/app_playback.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_playback.so
Reading symbols from /usr/lib/asterisk/modules/app_voicemail.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_voicemail.so
Reading symbols from /usr/lib/asterisk/modules/app_directory.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_directory.so
Reading symbols from /usr/lib/asterisk/modules/app_mp3.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_mp3.so
Reading symbols from /usr/lib/asterisk/modules/app_system.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_system.so
Reading symbols from /usr/lib/asterisk/modules/app_echo.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_echo.so
Reading symbols from /usr/lib/asterisk/modules/app_record.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_record.so
Reading symbols from /usr/lib/asterisk/modules/app_url.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_url.so
Reading symbols from /usr/lib/asterisk/modules/app_disa.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_disa.so
Reading symbols from /usr/lib/asterisk/modules/app_adsiprog.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_adsiprog.so
Reading symbols from /usr/lib/asterisk/modules/app_getcpeid.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_getcpeid.so
Reading symbols from /usr/lib/asterisk/modules/app_milliwatt.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_milliwatt.so
Reading symbols from /usr/lib/asterisk/modules/app_zapateller.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_zapateller.so
Reading symbols from /usr/lib/asterisk/modules/app_setcallerid.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_setcallerid.so
Reading symbols from /usr/lib/asterisk/modules/app_festival.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_festival.so
Reading symbols from /usr/lib/asterisk/modules/app_queue.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_queue.so
Reading symbols from /usr/lib/asterisk/modules/app_senddtmf.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_senddtmf.so
Reading symbols from
/usr/lib/asterisk/modules/app_parkandannounce.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_parkandannounce.so
Reading symbols from /usr/lib/asterisk/modules/app_striplsd.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_striplsd.so
Reading symbols from /usr/lib/asterisk/modules/app_setcidname.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_setcidname.so
Reading symbols from /usr/lib/asterisk/modules/app_lookupcidname.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_lookupcidname.so
Reading symbols from /usr/lib/asterisk/modules/app_substring.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_substring.so
Reading symbols from /usr/lib/asterisk/modules/app_macro.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_macro.so
Reading symbols from /usr/lib/asterisk/modules/app_authenticate.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_authenticate.so
Reading symbols from /usr/lib/asterisk/modules/app_softhangup.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_softhangup.so
Reading symbols from
/usr/lib/asterisk/modules/app_lookupblacklist.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_lookupblacklist.so
Reading symbols from /usr/lib/asterisk/modules/app_waitforring.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_waitforring.so
Reading symbols from /usr/lib/asterisk/modules/app_privacy.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_privacy.so
Reading symbols from /usr/lib/asterisk/modules/app_db.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_db.so
Reading symbols from /usr/lib/asterisk/modules/app_chanisavail.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_chanisavail.so
Reading symbols from /usr/lib/asterisk/modules/app_enumlookup.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_enumlookup.so
Reading symbols from /usr/lib/asterisk/modules/app_transfer.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_transfer.so
Reading symbols from /usr/lib/asterisk/modules/app_setcidnum.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_setcidnum.so
Reading symbols from /usr/lib/asterisk/modules/app_cdr.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_cdr.so
Reading symbols from
/usr/lib/asterisk/modules/app_hasnewvoicemail.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_hasnewvoicemail.so
Reading symbols from /usr/lib/asterisk/modules/app_sayunixtime.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_sayunixtime.so
Reading symbols from /usr/lib/asterisk/modules/app_cut.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_cut.so
Reading symbols from /usr/lib/asterisk/modules/app_read.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_read.so
Reading symbols from
/usr/lib/asterisk/modules/app_setcdruserfield.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_setcdruserfield.so
Reading symbols from /usr/lib/asterisk/modules/app_random.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_random.so
Reading symbols from /usr/lib/asterisk/modules/app_eval.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_eval.so
Reading symbols from /usr/lib/asterisk/modules/app_nbscat.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_nbscat.so
Reading symbols from /usr/lib/asterisk/modules/app_sendtext.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_sendtext.so
Reading symbols from /usr/lib/asterisk/modules/app_exec.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_exec.so
Reading symbols from /usr/lib/asterisk/modules/app_groupcount.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_groupcount.so
Reading symbols from /usr/lib/asterisk/modules/app_txtcidname.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_txtcidname.so
Reading symbols from
/usr/lib/asterisk/modules/app_controlplayback.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_controlplayback.so
Reading symbols from /usr/lib/asterisk/modules/app_talkdetect.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_talkdetect.so
Reading symbols from /usr/lib/asterisk/modules/app_alarmreceiver.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_alarmreceiver.so
Reading symbols from /usr/lib/asterisk/modules/app_userevent.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_userevent.so
Reading symbols from /usr/lib/asterisk/modules/app_verbose.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_verbose.so
Reading symbols from /usr/lib/asterisk/modules/app_test.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_test.so
Reading symbols from /usr/lib/asterisk/modules/app_forkcdr.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_forkcdr.so
Reading symbols from /usr/lib/asterisk/modules/app_math.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_math.so
Reading symbols from /usr/lib/asterisk/modules/app_realtime.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_realtime.so
Reading symbols from /usr/lib/asterisk/modules/app_dumpchan.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_dumpchan.so
Reading symbols from /usr/lib/asterisk/modules/app_waitforsilence.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_waitforsilence.so
Reading symbols from /usr/lib/asterisk/modules/app_while.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_while.so
Reading symbols from /usr/lib/asterisk/modules/app_setrdnis.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_setrdnis.so
Reading symbols from /usr/lib/asterisk/modules/app_md5.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_md5.so
Reading symbols from /usr/lib/asterisk/modules/app_readfile.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_readfile.so
Reading symbols from /usr/lib/asterisk/modules/app_chanspy.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_chanspy.so
Reading symbols from
/usr/lib/asterisk/modules/app_settransfercapability.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_settransfercapability.so
Reading symbols from /usr/lib/asterisk/modules/app_dictate.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_dictate.so
Reading symbols from /usr/lib/asterisk/modules/app_zapras.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_zapras.so
Reading symbols from /usr/lib/asterisk/modules/app_meetme.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_meetme.so
Reading symbols from /usr/lib/asterisk/modules/app_flash.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_flash.so
Reading symbols from /usr/lib/asterisk/modules/app_zapbarge.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_zapbarge.so
Reading symbols from /usr/lib/asterisk/modules/app_zapscan.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_zapscan.so
Reading symbols from /usr/lib/asterisk/modules/codec_ilbc.so...done.
Loaded symbols for /usr/lib/asterisk/modules/codec_ilbc.so
Reading symbols from /usr/lib/asterisk/modules/codec_gsm.so...done.
Loaded symbols for /usr/lib/asterisk/modules/codec_gsm.so
Reading symbols from /usr/lib/asterisk/modules/codec_adpcm.so...done.
Loaded symbols for /usr/lib/asterisk/modules/codec_adpcm.so
Reading symbols from /usr/lib/asterisk/modules/codec_ulaw.so...done.
Loaded symbols for /usr/lib/asterisk/modules/codec_ulaw.so
Reading symbols from /usr/lib/asterisk/modules/codec_alaw.so...done.
Loaded symbols for /usr/lib/asterisk/modules/codec_alaw.so
Reading symbols from /usr/lib/asterisk/modules/codec_a_mu.so...done.
Loaded symbols for /usr/lib/asterisk/modules/codec_a_mu.so
Reading symbols from /usr/lib/asterisk/modules/codec_g726.so...done.
Loaded symbols for /usr/lib/asterisk/modules/codec_g726.so
Reading symbols from /usr/lib/asterisk/modules/format_gsm.so...done.
Loaded symbols for /usr/lib/asterisk/modules/format_gsm.so
Reading symbols from /usr/lib/asterisk/modules/format_wav.so...done.
Loaded symbols for /usr/lib/asterisk/modules/format_wav.so
Reading symbols from /usr/lib/asterisk/modules/format_wav_gsm.so...done.
Loaded symbols for /usr/lib/asterisk/modules/format_wav_gsm.so
Reading symbols from /usr/lib/asterisk/modules/format_vox.so...done.
Loaded symbols for /usr/lib/asterisk/modules/format_vox.so
Reading symbols from /usr/lib/asterisk/modules/format_pcm.so...done.
Loaded symbols for /usr/lib/asterisk/modules/format_pcm.so
Reading symbols from /usr/lib/asterisk/modules/format_g729.so...done.
Loaded symbols for /usr/lib/asterisk/modules/format_g729.so
Reading symbols from /usr/lib/asterisk/modules/format_pcm_alaw.so...done.
Loaded symbols for /usr/lib/asterisk/modules/format_pcm_alaw.so
Reading symbols from /usr/lib/asterisk/modules/format_g726.so...done.
Loaded symbols for /usr/lib/asterisk/modules/format_g726.so
Reading symbols from /usr/lib/asterisk/modules/format_ilbc.so...done.
Loaded symbols for /usr/lib/asterisk/modules/format_ilbc.so
Reading symbols from /usr/lib/asterisk/modules/format_sln.so...done.
Loaded symbols for /usr/lib/asterisk/modules/format_sln.so
Reading symbols from /usr/lib/asterisk/modules/format_au.so...done.
Loaded symbols for /usr/lib/asterisk/modules/format_au.so
Reading symbols from /usr/lib/asterisk/modules/format_g723.so...done.
Loaded symbols for /usr/lib/asterisk/modules/format_g723.so
Reading symbols from /usr/lib/asterisk/modules/cdr_manager.so...done.
Loaded symbols for /usr/lib/asterisk/modules/cdr_manager.so
Reading symbols from /usr/lib/asterisk/modules/cdr_custom.so...done.
Loaded symbols for /usr/lib/asterisk/modules/cdr_custom.so
Reading symbols from /usr/lib/asterisk/modules/func_callerid.so...done.
Loaded symbols for /usr/lib/asterisk/modules/func_callerid.so
Reading symbols from /usr/lib/asterisk/modules/cdr_sqlite.so...done.
Loaded symbols for /usr/lib/asterisk/modules/cdr_sqlite.so
Reading symbols from /usr/lib/libsqlite.so.0...done.
Loaded symbols for /usr/lib/libsqlite.so.0
Reading symbols from /usr/lib/asterisk/modules/app_externalivr.so...done.
Loaded symbols for /usr/lib/asterisk/modules/app_externalivr.so
#0  local_hangup (ast=0x81fd8e0) at chan_local.c:403
403                             cur = cur->next;
(gdb) bt full
#0  local_hangup (ast=0x81fd8e0) at chan_local.c:403
        p = (struct local_pvt *) 0x81fdd80
        isoutbound = 1080412952
        f = {frametype = 4, subclass = 1, datalen = 0, samples = 0,
mallocd = 0, offset = 0, src = 0x0, data = 0x0,
  delivery = {tv_sec = 0, tv_usec = 0}, prev = 0x0, next = 0x0}
        cur = (struct local_pvt *) 0xe0
        prev = (struct local_pvt *) 0xe0
        ochan = (struct ast_channel *) 0x0
        glaredetect = 0
#1  0x0805f31d in ast_hangup (chan=0x81fd8e0) at channel.c:1025
        res = 0
#2  0x0808c09f in __ast_pbx_run (c=0x81fd8e0) at pbx.c:2386
        digit = -1
        exten = '\0' <repeats 255 times>
        pos = 0
        waittime = 0
        res = 0
#3  0x0808c9f8 in pbx_thread (data=0x81fd8e0) at pbx.c:2436
No locals.
#4  0x40025bbf in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
#5  0x401e295a in clone () from /lib/libc.so.6
No symbol table info available.
(gdb) thread apply all bt

Thread 103 (process 2008):
#0  0x00000246 in ?? ()
Cannot access memory at address 0x0
403                             cur = cur->next;


Any hint?

Thanks in advance,
    Tamas



More information about the asterisk-dev mailing list