So some pages on the server seem to crash PHP, causing a segfault and all.
Infinite recursion in a preg_* function?
Locally, my server crashes as well on these pages. I connected gdb to the process to figure out where PHP failed, and it failed in a
match() function which is part of PCRE, the library that powers the
preg_* functions of PHP.
It also failed on a huge stack, which leads me to believe that there might be something related to infinite recursion with either recursive regular expressions or PHP callbacks.
However, I have not yet been able to find which functions are called on the bad pages, but are not on the good ones.
Possible things to try
- Connect gdb to a
php -S localhost:9000with debug symbols and find out where exactly PHP is in the script when it crashes
- Figure out what all the bad pages contain that the good pages do not.
- Figure out when this started occurring? Is it some update of PHP (my current assumption) or did it start after a certain commit?