Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault in apache child process in libphp5 #859

Closed
jlaba opened this issue Sep 1, 2014 · 2 comments
Closed

segfault in apache child process in libphp5 #859

jlaba opened this issue Sep 1, 2014 · 2 comments

Comments

@jlaba
Copy link

jlaba commented Sep 1, 2014

On ubuntu 14.04.1 LTS (apache 2.4.7-1ubuntu4.1, php 5.5.9+dfsg-1ubuntu4.3) zenphoto (1.4.6) produces segfaults sometimes (e.g. gallery mainpage). Most times it works, but refreshing it a few times, an apache child is crashing.

The crashdump is attached, but the only thing I could extract is:
#0 0xb5134828 in ?? () from /usr/lib/apache2/modules/libphp5.so
#1 0xb515cc1c in _zval_dtor_func () from /usr/lib/apache2/modules/libphp5.so
#2 0xb5188937 in ?? () from /usr/lib/apache2/modules/libphp5.so
#3 0xb518a377 in execute_ex () from /usr/lib/apache2/modules/libphp5.so
#4 0xb514d3dd in dtrace_execute_ex () from /usr/lib/apache2/modules/libphp5.so
#5 0xb5214ba5 in zend_execute () from /usr/lib/apache2/modules/libphp5.so
#6 0xb5216012 in ?? () from /usr/lib/apache2/modules/libphp5.so
#7 0xb518a377 in execute_ex () from /usr/lib/apache2/modules/libphp5.so
#8 0xb514d3dd in dtrace_execute_ex () from /usr/lib/apache2/modules/libphp5.so
#9 0xb5214ba5 in zend_execute () from /usr/lib/apache2/modules/libphp5.so
#10 0xb5216012 in ?? () from /usr/lib/apache2/modules/libphp5.so
#11 0xb518a377 in execute_ex () from /usr/lib/apache2/modules/libphp5.so
#12 0xb514d3dd in dtrace_execute_ex () from /usr/lib/apache2/modules/libphp5.so
#13 0xb5214ba5 in zend_execute () from /usr/lib/apache2/modules/libphp5.so
#14 0xb5216012 in ?? () from /usr/lib/apache2/modules/libphp5.so
#15 0xb518a377 in execute_ex () from /usr/lib/apache2/modules/libphp5.so
#16 0xb514d3dd in dtrace_execute_ex () from /usr/lib/apache2/modules/libphp5.so
#17 0xb5214ba5 in zend_execute () from /usr/lib/apache2/modules/libphp5.so
#18 0xb515f55e in zend_execute_scripts () from /usr/lib/apache2/modules/libphp5.so
#19 0xb50fad35 in php_execute_script () from /usr/lib/apache2/modules/libphp5.so
#20 0xb5218a48 in ?? () from /usr/lib/apache2/modules/libphp5.so
#21 0xb773a6b6 in ap_run_handler ()
#22 0xb773ac37 in ap_invoke_handler ()
#23 0xb775233a in ap_process_async_request ()
#24 0xb7752611 in ap_process_request ()
#25 0xb774eb5f in ?? ()
#26 0xb7744c96 in ap_run_process_connection ()
#27 0xb6ae3e31 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#28 0xb6ae40c1 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#29 0xb6ae412d in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#30 0xb6ae4fff in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#31 0xb771f296 in ap_run_mpm ()
#32 0xb771805b in main ()

I do not really know, whether it is a zenphoto problem or a apache and libphp5 problem, but on another php5 site on the same host crashes had not appeared until now.

Regards,

Joachim

@trisweb
Copy link
Collaborator

trisweb commented Sep 1, 2014

PHP should most certainly never segfault, so it's likely a problem with the server configuration. I would squarely put this as an apache/libphp5 problem that's being triggered randomly by the execution of zenphoto, perhaps by a specific PHP module such as gd (image processing) or just by chance.

I would try three things:

  1. Upgrade everything by the normal method on your server - ensure all php5, apache2, and associated modules (libphp5 for apache) are upgraded to the latest version.
  2. The fresh versions or recompilation by step (1) may have achieved this, but if problems still exist, recompile starting from the lowest level. Remove and freshly install the mod_php5 module. Then apache itself.
  3. If it still has issues, I recommend switching to a fastcgi php-fpm setup to further decouple apache from the problem. This is a faster, more modular approach anyway, so I generally recommend it. Here's a good article on the subject.

Thanks and please let us know if you need more help. Closing as I'm fairly certain this is not a bug in zenphoto itself, but feel free to continue discussion.

@trisweb trisweb closed this as completed Sep 1, 2014
@acca
Copy link

acca commented Sep 27, 2016

I've discovered a very similar error using this vagrant environment based on Ubuntu 14.04.5 LTS: https://github.com/acca/zenphoto-vagrant.

Steps to reproduce (Apache2 Segmentation fault) the crash are:

  1. Deploy locally with Vagrant
  2. Complete installation
  3. Go to Admin -> Plugins -> Try to enable a plugin -> Apply

The only solution I've found is to update php to 5.6, using this: https://github.com/acca/zenphoto-vagrant/blob/master/functions.sh#L66

cd zenphoto-vagrant
source functions.sh
upgrade_php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants