I upgrade one of my Ubuntu 16.04.5 LTS server from PHP 5.6 to 7.2. I use Ondrej PPA : https://launchpad.net/~ondrej/+archive/ubuntu/php

After the upgrade, I found some segmentation fault with production traffic ...

I try to use gdb with coredump but don't really understand it :

#0  0x00007ff113f35542 in zend_update_class_constants () from /usr/lib/apache2/modules/libphp7.2.so
#1  0x00007ff113f35563 in zend_update_class_constants () from /usr/lib/apache2/modules/libphp7.2.so
#2  0x00007ff113f35cc1 in _object_and_properties_init () from /usr/lib/apache2/modules/libphp7.2.so
#3  0x00007ff113fd4e1c in ?? () from /usr/lib/apache2/modules/libphp7.2.so
#4  0x00007ff113fde90b in execute_ex () from /usr/lib/apache2/modules/libphp7.2.so
#5  0x00007ff113fe4d1e in zend_execute () from /usr/lib/apache2/modules/libphp7.2.so
#6  0x00007ff113f331e3 in zend_execute_scripts () from /usr/lib/apache2/modules/libphp7.2.so
#7  0x00007ff113ece330 in php_execute_script () from /usr/lib/apache2/modules/libphp7.2.so
#8  0x00007ff113fe6ed2 in ?? () from /usr/lib/apache2/modules/libphp7.2.so
#9  0x00005562052ef140 in ap_run_handler ()
#10 0x00005562052ef6c6 in ap_invoke_handler ()
#11 0x0000556205305e2c in ap_internal_redirect ()
#12 0x00007ff10fdfaa92 in ?? () from /usr/lib/apache2/modules/mod_rewrite.so
#13 0x00005562052ef140 in ap_run_handler ()
#14 0x00005562052ef6c6 in ap_invoke_handler ()
#15 0x0000556205305e2c in ap_internal_redirect ()
#16 0x00007ff10fdfaa92 in ?? () from /usr/lib/apache2/modules/mod_rewrite.so
#17 0x00005562052ef140 in ap_run_handler ()
#18 0x00005562052ef6c6 in ap_invoke_handler ()
#19 0x0000556205306ba2 in ap_process_async_request ()
#20 0x0000556205306d50 in ap_process_request ()
#21 0x0000556205302e1e in ?? ()
#22 0x00005562052f90f0 in ap_run_process_connection ()
#23 0x00007ff1145537e9 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#24 0x00007ff114553a74 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#25 0x00007ff114553aeb in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#26 0x00007ff114554ac7 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#27 0x00005562052d179e in ap_run_mpm ()
#28 0x00005562052ca690 in main ()

I use Apache 2.4.18 with PHP 7.2.13 with Pecl packages :

Installed packages, channel pecl.php.net:
Package  Version State
amqp     1.9.4   stable
igbinary 2.0.8   stable
mongodb  1.4.4   stable
oauth    2.0.3   stable
redis    4.2.0   stable
zmq      1.1.3   beta

I also use NewRelic PHP Agent, full list of installed PHP packages :

php-common/xenial,xenial,now 2:69+ubuntu16.04.1+deb.sury.org+1 all  [installé, automatique]
php-pear/xenial,xenial,now 1:1.10.6+submodules+notgz-1+ubuntu16.04.1+deb.sury.org+2 all  [installé, automatique]
php-xml/xenial,xenial,now 2:7.2+69+ubuntu16.04.1+deb.sury.org+1 all  [installé, automatique]
php7.2/xenial,xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 all  [installé]
php7.2-bcmath/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64  [installé]
php7.2-cli/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64  [installé, automatique]
php7.2-common/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64  [installé, automatique]
php7.2-curl/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64  [installé]
php7.2-dev/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64  [installé]
php7.2-gd/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64  [installé]
php7.2-json/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64  [installé, automatique]
php7.2-mbstring/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64  [installé]
php7.2-mysql/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64  [installé]
php7.2-opcache/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64  [installé, automatique]
php7.2-pspell/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64  [installé]
php7.2-readline/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64  [installé, automatique]
php7.2-soap/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64  [installé]
php7.2-tidy/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64  [installé]
php7.2-xml/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64  [installé, automatique]
php7.2-zip/xenial,now 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 amd64  [installé]

To migrate my PHP, I remove and purge packages and Pecl packages ...

I'm starting to think that I may have done a bad job during migration ... If someone can help me ...

  • Did you upgrade Apache from the same source? – Tero Kilkanen Jan 2 at 22:40
  • Yes, I already use Ondrej PPA – jColfej Jan 2 at 23:00

Could you switch to LogLevel debug in your http.conf and post the output? This will show you the PID that executes right before the segmentation fault. In my case, Dynatrace was causing mod_authz_core to segfault. More than likely, it is a dependency being used by a separate process causing the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.