Several times a day, we are getting a segfault in our asterisk/FreePBX server, resulting in a restart. safe_asterisk does restart the system, however we would like to find the cause of the issue and resolve it.
We are running CentOS 5.3 x86_64 (Kernel 2.6.18-128.1.10.el5) with all current updates, Asterisk 220.127.116.11, FreePBX 2.5.1. Asterisk and FreePBX were built by hand following the outlines for CentOS 5.1 from the FreePBX website, with minor modifications to handle differences in 5.3. The server is a Dell 1850 with two dual-core Xeon procs at 3.20GHz, 4GB Dram, two 146GB SCSI disks on the integrated 3i RAID controller in RAID 1 configuration.
When it segfaults, it outputs one line of the following to syslog:
asterisk: segfault at 00000000400d9fc8 rip 00000000004e1f11 rsp 00000000400d9fd0 error 6
asterisk: segfault at 0000000041c48fc8 rip 00000000004e1f11 rsp 0000000041c48fd0 error 6
asterisk: segfault at 0000000041e85fc8 rip 00000000004e1f11 rsp 0000000041e85fd0 error 6
asterisk: segfault at 0000000041617fc8 rip 00000000004e1f11 rsp 0000000041617fd0 error 6
if I load the core file into gdb I get the following (trimmed for your convenience)
Core was generated by `/usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c’.
Program terminated with signal 11, Segmentation fault.
[New process 32712]
[New process 32571]
** Several other new processes listed by number here**
[New process 3508]
[New process 3504]
#0 0x00000000004e1f11 in tzload (name=0x5457c0 “posixrules”, sp=0x4145c180, doextend=0) at stdtime/localtime.c:292
292 if ((strlen§ + strlen(name) + 1) >= sizeof fullname)
Unfortunately the output of the debugger means exactly nothing to me. Any help would be greatly appreciated.
Oh, I have run the debugger against 4 or 5 random core files and the end statements are always the same except for the value of 'sp=0x########.