[Home]

Summary:ASTERISK-13559: Crash after run on FreeBSD 7.1
Reporter:Dmitry Brazhnikov (urpyllika)Labels:
Date Opened:2009-02-11 06:14:36.000-0600Date Closed:2009-02-24 11:45:28.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:OS: FreeBSD 7.1 x86
Asterisk: 1.4.23.1
After run crash and create core file

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

gdb /usr/local/sbin/asterisk asterisk.core
GNU gdb 6.1.1 [FreeBSD]
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-marcel-freebsd"...(no debugging symbols found)...
Core was generated by `asterisk'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libncurses.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libncurses.so.7
Reading symbols from /lib/libcrypto.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypto.so.5
Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/asterisk/modules/res_musiconhold.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/asterisk/modules/res_musiconhold.so
Reading symbols from /usr/local/lib/liblthread.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/liblthread.so.6
Reading symbols from /usr/local/lib/asterisk/modules/res_adsi.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/asterisk/modules/res_adsi.so
Reading symbols from /usr/local/lib/asterisk/modules/res_agi.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/asterisk/modules/res_agi.so
Reading symbols from /usr/local/lib/asterisk/modules/res_crypto.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/asterisk/modules/res_crypto.so
Reading symbols from /usr/lib/libssl.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libssl.so.5
Reading symbols from /usr/local/lib/asterisk/modules/res_indications.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/asterisk/modules/res_indications.so
Reading symbols from /usr/local/lib/asterisk/modules/res_monitor.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/asterisk/modules/res_monitor.so
Reading symbols from /usr/local/lib/asterisk/modules/res_smdi.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/asterisk/modules/res_smdi.so
Reading symbols from /usr/local/lib/asterisk/modules/res_snmp.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/asterisk/modules/res_snmp.so
Reading symbols from /usr/local/lib/libnetsnmpmibs.so.16...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libnetsnmpmibs.so.16
Reading symbols from /usr/local/lib/libnetsnmpagent.so.16...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libnetsnmpagent.so.16
Reading symbols from /usr/local/lib/libnetsnmphelpers.so.16...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libnetsnmphelpers.so.16
Reading symbols from /usr/local/lib/libnetsnmp.so.16...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libnetsnmp.so.16
Reading symbols from /usr/lib/libelf.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libelf.so.1
Reading symbols from /lib/libkvm.so.4...(no debugging symbols found)...done.
Loaded symbols for /lib/libkvm.so.4
Reading symbols from /lib/libdevstat.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libdevstat.so.6
Reading symbols from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
Reading symbols from /lib/libcrypt.so.4...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypt.so.4
Reading symbols from /lib/libutil.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libutil.so.7
Reading symbols from /usr/lib/libwrap.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libwrap.so.5
Reading symbols from /usr/local/lib/asterisk/modules/res_features.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/asterisk/modules/res_features.so
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x28534bcc in pthread_rwlock_unlock () from /usr/local/lib/liblthread.so.6
[New Thread 0x28601300 (LWP 100181)]
[New Thread 0x28601200 (LWP 100180)]
[New Thread 0x28601100 (LWP 100066)]
(gdb) bt
#0  0x28534bcc in pthread_rwlock_unlock () from /usr/local/lib/liblthread.so.6
#1  0x289ef543 in load_config () from /usr/local/lib/asterisk/modules/res_features.so
#2  0x289f089b in load_module () from /usr/local/lib/asterisk/modules/res_features.so
#3  0x0809f4c8 in ast_module_ref ()
#4  0x289f3a00 in __mod_info () from /usr/local/lib/asterisk/modules/res_features.so
ASTERISK-1  0x00000005 in ?? ()
ASTERISK-2  0x00000000 in ?? ()
ASTERISK-3  0x00000001 in ?? ()
ASTERISK-4  0x2861b130 in ?? ()
ASTERISK-5  0x00000008 in ?? ()
ASTERISK-6 0x00001000 in ?? ()
ASTERISK-7 0x00000000 in ?? ()
ASTERISK-8 0x20626546 in ?? ()
ASTERISK-9 0x28607450 in ?? ()
ASTERISK-10 0x30353a35 in ?? ()
ASTERISK-11 0x0032313a in ?? ()
ASTERISK-12 0x00000000 in ?? ()
ASTERISK-13 0x00000003 in ?? ()
ASTERISK-14 0xbfbfbf89 in ?? ()
ASTERISK-15 0x00000000 in ?? ()
ASTERISK-16 0x20030518 in ?? ()
ASTERISK-17 0x00000002 in ?? ()
ASTERISK-18 0x00201000 in ?? ()
ASTERISK-19 0x00000000 in ?? ()
ASTERISK-20 0x00000800 in ?? ()
ASTERISK-21 0x00000000 in ?? ()
ASTERISK-22 0x00004000 in ?? ()
ASTERISK-23 0x00000000 in ?? ()
ASTERISK-24 0x01ec3bd5 in ?? ()
ASTERISK-25 0x00000000 in ?? ()
ASTERISK-26 0x01c73063 in ?? ()
ASTERISK-27 0x00000000 in ?? ()
ASTERISK-28 0x019fcf71 in ?? ()
ASTERISK-29 0x00000000 in ?? ()
ASTERISK-30 0x007f37fe in ?? ()
ASTERISK-31 0x00000000 in ?? ()
ASTERISK-32 0x007ae753 in ?? ()
ASTERISK-33 0x00000000 in ?? ()
ASTERISK-34 0x00000000 in ?? ()
ASTERISK-35 0x00000000 in ?? ()
ASTERISK-36 0x00000000 in ?? ()
ASTERISK-37 0x281207fc in _rtld_error () from /libexec/ld-elf.so.1
Previous frame inner to this frame (corrupt stack?)
(gdb)
Comments:By: Dmitry Brazhnikov (urpyllika) 2009-02-11 08:42:56.000-0600

Asterisk steel run if not load

codec_adpcm.so
res_features.so
chan_h323.so

By: Michiel van Baak (mvanbaak) 2009-02-11 12:54:00.000-0600

How did you install asterisk? Because here the 1.4.23 and 1.4.23.1 tarball cant figure out how to use the freebsd h323 libs so chan_h323 is not compiled even though I have openh323 and friends installed.

I tried with trunk as well, and it runs fine (chan_h323 is not compiled but the rest is and it runs great)

Also, can you recompile with the DONT_OPTIMIZE flag set so the backtrace is a bit more usefull.
(./configure --enable-dev-mode; gmake menuselect (go to compiler flags and check DONT_OPTIMIZE); make install)

By: Michiel van Baak (mvanbaak) 2009-02-11 13:13:12.000-0600

and here asterisk 1.4.23.1 works on freebsd7 as well.

We really need that backtrace from an unoptimized build.

By: Dmitry Brazhnikov (urpyllika) 2009-02-11 23:38:38.000-0600

I`m build from ports

in /usr/ports/net/asterisk/Makefile add
CONFIGURE_ARGS= --with-gsm=${LOCALBASE} --enable-dev-mode

next step
make configure

after
cd /usr/ports/net/asterisk/work/asterisk-1.4.23.1
less config.log
==
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by asterisk configure 1.4, which was
generated by GNU Autoconf 2.61.  Invocation command line was

 $ ./configure --with-gsm=/usr/local --enable-dev-mode --with-h323=/usr/local --with-zaptel --with-odbc --with-ltdl --with-tds=/usr/local --with-postgres --with-ogg --with-radius --with-netsnmp --with-iksemel --with-sqlite --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/ --build=i386-portbld-freebsd7.1
==

gmake menuselect (go to compiler flags and check DONT_OPTIMIZE - checked)

cd /usr/ports/net/asterisk && make
Error in compilation
gmake[1]: Entering directory `/usr/ports/net/asterisk/work/asterisk-1.4.23.1/res'
cc -o /dev/null -c res_features.i -D_THREAD_SAFE  -I/usr/ports/net/asterisk/work/asterisk-1.4.23.1/include -O2 -fno-strict-aliasing -pipe  -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations  -Werror -Wunused -Wdeclaration-after-statement -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Wmissing-format-attribute -I/usr/local/include   -fPIC -DAST_MODULE=\"res_features\"   -O6
cc1: warnings being treated as errors
res_features.c: In function 'ast_features_lock':
res_features.c:1140: warning: passing argument 1 of 'ast_mutex_lock' from incompatible pointer type
res_features.c: In function 'ast_features_unlock':
res_features.c:1145: warning: passing argument 1 of 'ast_mutex_unlock' from incompatible pointer type
res_features.c: In function 'handle_parkedcalls':
res_features.c:2349: warning: format '%6ld' expects type 'long int', but argument 8 has type 'time_t'
gmake[1]: *** [res_features.o] Error 1
gmake[1]: Leaving directory `/usr/ports/net/asterisk/work/asterisk-1.4.23.1/res'
gmake: *** [res] Error 2
*** Error code 2

gcc -v
Using built-in specs.
Target: i386-undermydesk-freebsd
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070719  [FreeBSD]

By: Dmitry Brazhnikov (urpyllika) 2009-02-11 23:44:34.000-0600

build from source

  [LD] res_crypto.o -> res_crypto.so
  [CPP] res_features.c -> res_features.i
  [CCi] res_features.i -> res_features.o
cc1: warnings being treated as errors
res_features.c: In function 'handle_parkedcalls':
res_features.c:2307: warning: format '%6ld' expects type 'long int', but argument 8 has type 'time_t'
gmake[1]: *** [res_features.o] Error 1
gmake[1]: Leaving directory `/usr/home/ast/asterisk-1.4.23.1/res'
gmake: *** [res] Error 2

By: Leif Madsen (lmadsen) 2009-02-12 08:53:04.000-0600

Please test with a vanilla checkout of Asterisk from subversion, or install from an official tarball package, as with BSD ports, we have no idea what patches have been incorporated from upstream, so it may be an issue with the port itself, and not with Asterisk.

By: Leif Madsen (lmadsen) 2009-02-12 08:54:07.000-0600

BTW: If vanilla asterisk works, then you need to report your issue upstream with the FreeBSD team, not here.

By: Michiel van Baak (mvanbaak) 2009-02-21 07:40:17.000-0600

Everything works fine on freebsd 7 amd64
Since I dont have a 32bit system I cannot do more here.

By: Leif Madsen (lmadsen) 2009-02-24 11:45:13.000-0600

Thank you for the bug report. However I am unable to reproduce this issue. We are now going to close this report - please feel free to reopen when you have more information at hand.