PHP Crashes Caused By Extensions II

As I wrote about previously, I have had problems with Apache and PHP crashing due to various PHP Extensions. I have come upon another combination that triggers a problem, but after investigating it a little I see that it’s been reported before, and nobody wants to fix it. PHP blames PHP accelerator systems, and Zend claims it’s a shared memory configuration problem (it isn’t — at least on my system)

The error happens whenever attempting a graceful restart of Apache via “apachectl graceful”:

  • [notice] seg fault or similar nasty error detected in the parent process

The environment:

  • Apache 2.2.4
  • PHP 5.2.1
  • Zend Optimizer 3.2.8

The culprit:

  • Some interaction between the Zend Optimizer being loaded along with the PHP pspell module.

If I disable one or the other, the crash goes away. Since this particular installation does not require the pspell module, I disabled it and things have been stable ever since.

I did follow Zend’s recommendations for increasing certain shared memory tunables on FreeBSD, as well as trying to recompile everything involved. For more information on shared memory tuning check the FreeBSD man page tuning(7) as well as this Zend Knowledge Base article. Note that certain sysctl settings may only be modified at boot time via /boot/loader.conf and/or /etc/sysctl.conf.

More information to come if I can find anything else…

Update 11/21/2007 – I found that in more recent version of PHP (Around 5.2.4-5.2.5) having pspell.so loaded before spl.so in extensions.ini will result in crashes when an httpd process is stopped/killed. Moving pspell anywhere after spl will clear this up (so far…).

2 thoughts on “PHP Crashes Caused By Extensions II

  1. same problem:
    FreeBSD lapos 6.2-STABLE FreeBSD 6.2-STABLE #1: Tue Aug 14 13:38:58 CEST 2007 root@lapos:/usr/obj/usr/src/sys/SMP amd64

Leave a Reply

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image