Core dump - segmentation fault

192 views
Skip to first unread message

Steven

unread,
May 13, 2011, 6:11:23 PM5/13/11
to asteris...@googlegroups.com
Buenas tardes amigos,

Les cuento que tengo una central Asterisk 1.4.24.1 que me esta presentando problema a la hora de ejecutar un 'service aserisk stop'.
arroja lo siguiente:

safe_asterisk: no process killed
asterisk: no process killed

Y luego cuando va el start arroja esto:

/usr/sbin/safe_asterisk: line 125: 29617 Segmentation fault      (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >&/dev/${
TTY} < /dev/${TTY}
mpg123: no process killed
/usr/sbin/safe_asterisk: line 125: 29659 Segmentation fault      (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >&/dev/${
TTY} < /dev/${TTY}
mpg123: no process killed

Encontre que en el directorio /tmp  estaba dejando los core dump.
Leyendo la documentación de "asterisk debugging" encontre hacer de debug con gdb, lo cual me arroja el siguiente resultado:

# gdb asterisk core.xxxx
GNU gdb Red Hat Linux (6.5-37.el5rh)
Copyright (C) 2006 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-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".


warning: 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/libcap.so.1...done.
Loaded symbols for /lib/libcap.so.1
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libtermcap.so.2...done.
Loaded symbols for /lib/libtermcap.so.2
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 /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/asterisk/modules/res_musiconhold.so...done.
Loaded symbols for /usr/lib/asterisk/modules/res_musiconhold.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_adsi.so...done.
Loaded symbols for /usr/lib/asterisk/modules/res_adsi.so
Reading symbols from /usr/lib/asterisk/modules/res_smdi.so...done.
Loaded symbols for /usr/lib/asterisk/modules/res_smdi.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 /lib/libssl.so.6...done.
Loaded symbols for /lib/libssl.so.6
Reading symbols from /lib/libcrypto.so.6...done.
Loaded symbols for /lib/libcrypto.so.6
Reading symbols from /usr/lib/libgssapi_krb5.so.2...done.
Loaded symbols for /usr/lib/libgssapi_krb5.so.2
Reading symbols from /usr/lib/libkrb5.so.3...done.
Loaded symbols for /usr/lib/libkrb5.so.3
Reading symbols from /lib/libcom_err.so.2...done.
Loaded symbols for /lib/libcom_err.so.2
Reading symbols from /usr/lib/libk5crypto.so.3...done.
Loaded symbols for /usr/lib/libk5crypto.so.3
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/libkrb5support.so.0...done.
Loaded symbols for /usr/lib/libkrb5support.so.0
Reading symbols from /lib/libkeyutils.so.1...done.
Loaded symbols for /lib/libkeyutils.so.1
Reading symbols from /lib/libselinux.so.1...done.
Loaded symbols for /lib/libselinux.so.1
Reading symbols from /lib/libsepol.so.1...done.
Loaded symbols for /lib/libsepol.so.1
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_snmp.so...done.
Loaded symbols for /usr/lib/asterisk/modules/res_snmp.so
Reading symbols from /usr/lib/libnetsnmpmibs.so.10...done.
Loaded symbols for /usr/lib/libnetsnmpmibs.so.10
Reading symbols from /usr/lib/libnetsnmpagent.so.10...done.
Loaded symbols for /usr/lib/libnetsnmpagent.so.10
Reading symbols from /usr/lib/libnetsnmphelpers.so.10...done.
Loaded symbols for /usr/lib/libnetsnmphelpers.so.10
Reading symbols from /usr/lib/libnetsnmp.so.10...done.
Loaded symbols for /usr/lib/libnetsnmp.so.10
Reading symbols from /usr/lib/librpm-4.4.so...done.
Loaded symbols for /usr/lib/librpm-4.4.so
Reading symbols from /usr/lib/librpmio-4.4.so...done.
Loaded symbols for /usr/lib/librpmio-4.4.so
Reading symbols from /usr/lib/libpopt.so.0...done.
Loaded symbols for /usr/lib/libpopt.so.0
Reading symbols from /usr/lib/libsensors.so.3...done.
Loaded symbols for /usr/lib/libsensors.so.3
Reading symbols from /usr/lib/libwrap.so.0...done.
Loaded symbols for /usr/lib/libwrap.so.0
Reading symbols from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so...done.
Loaded symbols for /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libutil.so.1...done.
Loaded symbols for /lib/libutil.so.1
Reading symbols from /usr/lib/librpmdb-4.4.so...done.
Loaded symbols for /usr/lib/librpmdb-4.4.so
Reading symbols from /usr/lib/libbeecrypt.so.6...done.
Loaded symbols for /usr/lib/libbeecrypt.so.6
Reading symbols from /lib/librt.so.1...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /usr/lib/libbz2.so.1...done.
Loaded symbols for /usr/lib/libbz2.so.1
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /usr/lib/libsysfs.so.2...done.
Loaded symbols for /usr/lib/libsysfs.so.2
Reading symbols from /usr/lib/libsqlite3.so.0...done.
Loaded symbols for /usr/lib/libsqlite3.so.0
Reading symbols from /usr/lib/libelf.so.1...done.
Loaded symbols for /usr/lib/libelf.so.1
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /usr/lib/asterisk/modules/res_monitor.so...done.
Loaded symbols for /usr/lib/asterisk/modules/res_monitor.so
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Core was generated by `/usr/sbin/asterisk -f -vvvg -c'.
Program terminated with signal 11, Segmentation fault.
#0  0x0016b8db in strlen () from /lib/ld-linux.so.2

La verdad soy novato en este tema del debugging y no se que pueda significar eso.

Para que asterisk arranque bien, cada vez que paro el servicio debo hacer un killall -9 safe_asterisk asterisk y luego si ejecutar el start. El lio es que tengo una tarea de backup configurada para q pare el servico en la noche y lo inicie, y cuando llego a la mañana siguiente me doy cuenta q mis clientes no tienen el servicio, y toca hacer lo que ya describi. Por ahora decidi adjuntarle el kill al script de backup, pero la verdad quiero encontrarle la solución de raiz al problema.

Alguien me podría regalar pistas para encontrar el fallo, Mil gracias.




Saúl Ibarra Corretgé

unread,
May 13, 2011, 6:35:14 PM5/13/11
to asteris...@googlegroups.com
2011/5/14 Steven <esf...@gmail.com>

El backtrace no enseña nada :-S Recompile Asterisk con el flag
DONT_OPTIMIZE (lo eliges en el menuselect) y prueba de nuevo, pero sin
safe_asterisk :-)

--
/Saúl
http://saghul.net | http://sipdoc.net

Reply all
Reply to author
Forward
0 new messages