Segmentation fault on certain WordPress pages on Ubuntu / Apache / PHP

  • Posted February 3, 2015

I’m getting reproducible errors when trying to access certain parts of a WordPress instance. This identical behavior occurs on two WordPress instances hosted on the same box.

The two actions that fail (and lead to an error page in Chrome (Error code: ERR_EMPTY_RESPONSE), and an error logged on server) are:

  • Attempting to access the “General” settings page (/wp-admin/options-general.php)
  • Attempting to confirm the deletion of any plugin

Apache2 error.log:

[core:notice] [pid 9173] AH00052: child pid 9181 exit signal Segmentation fault (11)```

Server Info:
```Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-24-generic x86_64)```

```PHP 5.5.9-1ubuntu4.5 (cli) (built: Oct 29 2014 11:59:10)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
    with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans```

Please let me know what other information may be helpful. Thanks in advance.

I have a few, one of the instances has the following list:

  • Akismet
  • Google Analytics by Yoast
  • Google Apps Login
  • ImageInject
  • Jetpack by
  • Maintenance
  • WP Retina 2x

I’ve tried deactivating them all, but the error still occurs when no plugins are active.

The other has more, haven’t tried deactivating them all on this one:

  • Akismet
  • Contact Form 7
  • Digg Digg
  • Disable Comments
  • Download Monitor
  • Enable Media Replace
  • Google Analytics by Toast
  • Google Apps Login
  • ImageInject
  • Maintenance
  • Membership
  • MyThemeShop Connect
  • Really Simple CAPTCHA
  • Regenerate Thumbnails
  • Remove Dashboard Access
  • Responsive Lightbox
  • UpdraftPlus - Backup/Restore
  • WordPress SEO
  • WP-Mail-SMTP
  • WP Retina 2x
  • WP Shortcode by MyThemeShop
  • WP Tab Widget

Do you have any additional plugins installed in these Wordpress instances?

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I found a fix for this, it requires a patch update of libssh2-php. See this thread here:

apt-get source libssh2-php
cd php-ssh2-0.12/
apt-get build-dep php-ssh2
apt-get install build-essential fakeroot devscripts
patch -p1 < fix-segfault.patch 
rm fix-segfault.patch 
debchange -i
dpkg-buildpackage -b

Restarted my Droplet (you could probably just restart Apache) and it works now!

After an entire day of trying to trace this down, no solutions worked. I eventually however turned Apache to debug level logging and immediately noticed hundreds of notices/warnings with Google’s mod_pagespeed for Apache trying to rewrite images from Jetpack’s Photon images.

I did a simple a2dismod pagespeed and immediately there were no more segmentation faults.

Have also noticed my sites are actually running faster now with mod pagespeed turned off.

There seems to be quite a few bug reports about pagespeed causing segmentation faults.

Not sure if its just mod_pagespeed or the combination of mod_pagespeed, wordpress and php … but turned off now problem gone.

I am done with it for now and in the process of moving everything to Nginx now. Tracing faults on Apache always turns into a nightmare, with Nginx I can find errors in a few seconds to a minute. Already spent the last 6 weeks getting to know Nginx and it rocks and now going back to my Apache server to try and diagnose this segfault error felt like I was in a different world where I could not speak the language anymore.

you absolute legend this fixed and issue i was having with a script!!

This comment has been deleted

@emilyhorsman: Found my error - was a a silly one. Thanks so much for your help!

@emilyhorsman - Thanks, this worked great.

I had followed this tutorial on secure updates, and had the same issue.

Be sure to sudo on the commands (if needed) – I also found that I just needed to restart Apache, not the droplet.

@emilyhorsman - THANK YOU.

@emilyhorsman YOU are such a life saver.

Thank You so much! I was able to solve this issue that was getting me really frustrated after setting up ssh/wordpress on DigitalOcean.

Thanks for your help Emily. Unfortunately after applying that patch, same issue seems to recur. The bug description really sounded like it was exactly my problem. Wonder if I’m doing something wrong applying the patch.

I did try restarting Apache, and also the entire box.