Segfault in asterisk with freepbx

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 1.6.1.0, 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[31794]: segfault at 00000000400d9fc8 rip 00000000004e1f11 rsp 00000000400d9fd0 error 6
asterisk[31865]: segfault at 0000000041c48fc8 rip 00000000004e1f11 rsp 0000000041c48fd0 error 6
asterisk[32109]: segfault at 0000000041e85fc8 rip 00000000004e1f11 rsp 0000000041e85fd0 error 6
asterisk[32263]: 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########.

Thank you,

Tim

you would be best to check on an asterisk forum or IRC channel to try and troubleshoot and Asterisk segfault issue, you will find a lot more people who might be able to help you there then on this forum.