Server 500 errors

Create issue
Issue #48 resolved
Jelmer van der Linde created an issue

So some pages on the server seem to crash PHP, causing a segfault and all.

Possible clues

Bad pages

Good pages

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

  1. Connect gdb to a php -S localhost:9000 with debug symbols and find out where exactly PHP is in the script when it crashes
  2. Figure out what all the bad pages contain that the good pages do not.
  3. Figure out when this started occurring? Is it some update of PHP (my current assumption) or did it start after a certain commit?
  4. Magic

Comments (5)

  1. Jelmer van der Linde reporter
    • edited description

    Add info about trying to figure out what is wrong based on the stack trace

  2. Log in to comment