Segmentation Fault


I have using asterisk 1.4 from last six months without any problem but from last two days asterisk will crash with message segmentation fault.

I have make no change from last 6 months.

Please help.



Probably something to do with your ram. Check your hardware, take a look at dmesg if you see seg fault maybe some ram bank can be broken.



Actully asterisk will not crash imediatly it will crash after 24 hours or more
and my system 1 gb ram.



Actully asterisk will not crash imediatly it will crash after 24 hours or more
and my system showing 1 gb ram.


Ok general segfault error is when asterisk try to access memory no more available fot it or due to a program error of asterisk.

So the 2 more probably causes of it can be. Corrupted mem area used by asterisk, or bug in asterisk.

Solution check you ram, maybe try to exchange the ram banks as a test, or update asterisk to see if it solves. Else, but not hoped, reinstall your entire machine.


Asterisk sits on top of a bunch of other stuff. You may have updated your system and changed something asterisk sits on top of. You can see the librbaries asterisk is linked against with:

root@dogod 11:36:11 # ldd /usr/sbin/asterisk => (0x00923000) => /lib/tls/ (0x00987000) => /usr/lib/ (0x009c5000) => /lib/tls/ (0x008fe000) => /lib/ (0x00929000) => /lib/tls/ (0x007d0000)
/lib/ (0x007b6000)

If you are using a redhat derivitive that uses rpm, you can use rpm to find out which package these libraries are part of as follows:

root@dogod 11:38:18 # rpm -qf /lib/
root@dogod 11:38:31 #

You can then use RPM to check the vailidity of the installed package as follows:

root@dogod 11:41:18 # rpm -qV glibc-2.3.4-2.39
…C /usr/lib/gconv/gconv-modules.cache
root@dogod 11:41:36 #

In my case I have had one file that has changed from what was installed.

You can try doing a “global” system update and see if that helps:

up2date -u --force

This will get the latest version of any new packages and any new kernels. Note that while asterisk is pretty much independent of the kernel, the zaptel stuff is not. If you update the kernel, you need to rebuild the zap modules.

Could you perhaps have updated the kernel and not rebuiilt the zap modules and asterisk is crashing when it trys to use the now unreachable zap hardware? You can try:

/etc/init.d/zaptel restart

If it does not start up happy, and you have it installed and if you use zap hardware that might be the problem.

If things are still not happy after a system update, I would tar up my asterisk install and save the tarball offline, then rebuild zap and asterisk against the newly updated system.

Now if you have a “big nasty” on the system and it really goes down for the count, you have the stuff you worked hard to get backed up.

One other thing you might want to consider doing is create a tarball of your entire system so you can clone it onto a new piece of hardware if you need to. I run a bunch of asterisk servers and they are all clones, and I run an rsync job between them that backs up the “personalized” parts of each one to the rest. If any one blows up I can clone it back from my master image, restore the host name and IP, copy the few directories back in place, and I am good to go.

The things I back up are:

/etc/asterisk Configuration files
/var/lib/asterisk Custom prompts /agi scripts etc
/var/spool/asterisk voicemail

Am I missing anything?