6

I am manually migrating this question from drupal.stackexchange.com (has since been deleted).

I recently upgraded my local dev environment (Vagrant, Ubuntu 12.04) from PHP 5.3.X to 5.5.14 and Apache 2.2.X to 2.4.9. After the upgrade, whenever I the debug function dpm() is called it causes a segmentation fault. A snippet from the Apache logs:

[Wed Jul 09 14:33:11.474063 2014] [core:notice] [pid 6513] AH00051: child pid 6644 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Wed Jul 09 14:33:18.483516 2014] [core:notice] [pid 6513] AH00051: child pid 6640 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Wed Jul 09 14:33:25.494786 2014] [core:notice] [pid 6513] AH00051: child pid 6619 exit signal Segmentation fault (11), possible coredump in /etc/apache2

Note that after upgrading PHP and Apache, I later decided to upgrade Ubuntu to 14.04. The problem remains the same.

Drupal 7.30
Devel 7.x-1.5 (Drupal module)

Disabling OpCache did not solve the problem.

I installed gdb and got a core dump. Here are the results:

/vagrant/web [git::goomba *] [vagrant@dev] [9:04]
> gdb apache2 -core core
GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from apache2...(no debugging symbols found)...done.
[New LWP 8265]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/apache2 -k start'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fd091fda437 in ?? () from /usr/lib/apache2/modules/libphp5.so

And when I run (gdb) backtrace full:

#0  0x00007fd091fda437 in ?? () from /usr/lib/apache2/modules/libphp5.so
No symbol table info available.
#1  0x00007fd091fdb044 in vspprintf () from /usr/lib/apache2/modules/libphp5.so
No symbol table info available.
#2  0x00007fd092038537 in zend_error_noreturn ()
   from /usr/lib/apache2/modules/libphp5.so
No symbol table info available.
#3  0x00007fd09205d7ff in zend_std_read_property ()
   from /usr/lib/apache2/modules/libphp5.so
No symbol table info available.
#4  0x00007fd0920633c7 in ?? () from /usr/lib/apache2/modules/libphp5.so
No symbol table info available.
#5  0x00007fd0920a7178 in execute_ex () from /usr/lib/apache2/modules/libphp5.so
No symbol table info available.
#6  0x00007fd092027e86 in dtrace_execute_ex ()
   from /usr/lib/apache2/modules/libphp5.so
No symbol table info available.
#7  0x00007fd0920e2f27 in ?? () from /usr/lib/apache2/modules/libphp5.so
No symbol table info available.
#8  0x00007fd0920a7178 in execute_ex () from /usr/lib/apache2/modules/libphp5.so
No symbol table info available.
#9  0x00007fd092027e86 in dtrace_execute_ex ()
   from /usr/lib/apache2/modules/libphp5.so
No symbol table info available.
#10 0x00007fd0920e2f27 in ?? () from /usr/lib/apache2/modules/libphp5.so
No symbol table info available.
#11 0x00007fd0920a7178 in execute_ex () from /usr/lib/apache2/modules/libphp5.so
No symbol table info available.
#12 0x00007fd092027e86 in dtrace_execute_ex ()

dpm() Details

This is a debug function that pretty-prints a PHP variable. Underneath the hood, it uses Krumo, specifically, it calls krumo::dump().

donut
  • 9,427
  • 5
  • 36
  • 53
  • Drupal does not [list a maximum version](https://www.drupal.org/requirements/php#7 "PHP requirements version 7") for php, however PHP has breaking changes between minor versions. 5.3 is the recommended version for Drupal 7. Have you confirmed your version can work with 5.5? – Amgine Sep 02 '14 at 17:57
  • I have it working fine on other servers. It just seems to be something about my little vagrant VM. Also, I don't think "breaking changes" would imply segment faults. – donut Sep 02 '14 at 18:16
  • 1
    This isn't an answer to your problem, but Kint might be a good alternative, if you cannot solve the issue: http://raveren.github.io/kint/ – kfriend Sep 03 '14 at 19:16
  • 1
    Make sure all your php modules are up to date. These crashes often happen when one of the loaded modules is out of date. – Alexander Langer Sep 04 '14 at 11:05
  • They are all up-to-date. Again, I have the exact same code working fine on other servers. – donut Sep 04 '14 at 20:03
  • Could be an issue with Vagrant. Do they control the kernel, is it upgradeable? It's possible the bug is there. – beiller Sep 05 '14 at 15:21
  • I don't think Vagrant controls the kernal. I've upgraded Vagrant to the latest version, 1.6.5, and am still encountering the issues. – donut Sep 05 '14 at 17:44
  • 1
    Same issue here. Linux Mint 17. The only "solution" I found was to compile PHP 5.3 :\ – progzy Sep 09 '14 at 18:09
  • PHP 5.5 is really good but if you meet issues, maybe you should use a deb package for 5.3 after uninstalling the current version ? – Loenix Sep 25 '14 at 20:33
  • I'm only having problems with that one function and it's necessary for operation and it's only one a dev server. I'm enjoying the PHP 5.5 features too much to give up for easier debugging. – donut Sep 26 '14 at 00:18
  • I used to work for a Drupal agency, and on our very configured server the highest we were able to push PHP was to 5.4 without breaking things in Drupal 7. Drupal 8 however is supposed to have full 5.5 support. – JustSteveKing Nov 03 '14 at 11:30

2 Answers2

7

I had a very similar problem here Error (lots of it):

[core:notice] [pid 1550] AH00051: child pid 2226 exit signal Segmentation fault (11), possible coredump in /etc/apache2

the culprit was xcache removed by:

apt-get --purge remove php5-xcache

Using Apache 2.4.7

php -v output:

PHP 5.5.9-1ubuntu4.5 (cli) (built: Oct 29 2014 11:59:10)

Waldir Leoncio
  • 10,853
  • 19
  • 77
  • 107
Braconnot_P
  • 181
  • 3
  • 8
0

I stopped pursuing this issue for a while and so stopped using the dpm() function that was triggering the problems. At some point, this problem went away for me. I'm not sure what fixed it. My guess is updates to PHP/Apache/Drupal, but I can't say for sure.

donut
  • 9,427
  • 5
  • 36
  • 53