Asterisk 13.3.0 Compiled With Clang On FreeBSD Crashes
Hi,
I’m maintaining the FreeBSD ports for asterisk(With madpilot@FreeBSD.org as identity). Here’s a link to the asterisk13 port for your reference:
http://www.freshports.org/net/asterisk13/
I performed some tests with RC1 and am doing some final tests with the final release before committing the update.
Up to now the ports forced using gcc, version 4.8 lately, to compile it. And for this update I’ll keep things unmodified.
I tested compiling it with clang, on FreeBSD releases using it by default (10.0 onward).
I discovered that on FreeBSD 10.1 amd64, asterisk 13.3.0-RC1 compiled with clang 3.4.1 crashes at startup, while it seems to work quite fine when compiled with gcc 4.8.
Some data follows, trimmed down a little, but if any more in depth analysis is required I’ll try to provide it.
Here’s a verbose log of the crash (only the final part):
== Registered custom function ‘AMI_CLIENT’
== Parsing ‘/usr/local/etc/asterisk/manager.conf’: Found
== Parsing ‘/usr/local/etc/asterisk/users.conf’: Found
== Parsing ‘/usr/local/etc/asterisk/enum.conf’: Found
== Registered application ‘CallCompletionRequest’
== Registered application ‘CallCompletionCancel’
== Parsing ‘/usr/local/etc/asterisk/ccss.conf’: Found
== Parsing ‘/usr/local/etc/asterisk/ccss.conf’: Found Segmentation fault (core dumped)
root@asterisk:~ #
I used gdb, to get some backtrace data:
(gdb) bt
#0 0x0000000803261970 in strcasecmp_l () from /lib/libc.so.7
#1 0x0000000000532926 in media_info_cmp ()
#2 0x0000000000459bdc in internal_ao2_traverse ()
#3 0x0000000000459f49 in __ao2_find ()
#4 0x0000000000533bdf in process_file ()
#5 0x00000000005330cc in media_index_update ()
#6 0x00000000005890a2 in update_index_cb ()
#7 0x0000000000459bdc in internal_ao2_traverse ()
#8 0x0000000000459925 in __ao2_callback ()
#9 0x0000000000588ea9 in ast_sounds_reindex ()
#10 0x00000000005890ca in ast_sounds_index_init ()
#11 0x0000000000452836 in main ()
So it looks like it crashes in main/media_index.c line 140.
Anyone has some insight, suggestions, or ways to better diagnose this?
Thanks in advance.