Suhosin Patch

Posted on 2008-01-16 12:10:03 EET.

I have been asked to look at random segfaults which started to appear after Midgard 1.8.5 upgrade. I checked many places and was wondering what really triggers them.

Fortunatelly I was able to run Apache through gdb and was much more wondered. Backtraces pointed to ( randomly ) : xdebug, eaccelerator, php5 library itself. Even Fatal Error like "Cannot redeclare class" caused segfaults.

So, I was completely out of ideas, when I noticed this one in Apache's log file:

PHP/5.2.4-0.dotdeb.0 with Suhosin-Patch

Suhosin, the one I started to blame. And looks like I was right. Server is perfectly fine when php5 has been replaced with the one without Suhosin Patch.

I did google a bit and found how many people reported segfaults with PHP5 with Suhosin Patch. However Suhosin itself is not blamed for segfaults I think I should ask few questions:

  • If I have at least 5 extensions loaded , which one triggers segfault if Suhosin is enabled ?
  • Which one is badly written if PHP doesn't segfault without Suhosin?
  • If one extension is badly written where can I find documentation how it should be written well to work fine with Suhosin?
  • Who made detailed tests and is sure that all extensions corrupts memory? All but Suhosin ?

Back

Layout Copyright © 2006 Finnish Teleservice Center Ltd Oy - Site Powered by Midgard CMS