Re: How to debug a segmentation fault?
| From: | Nikita Popov | Date: | Wed, 29 Jan 2020 10:59:15 +0000 |
| Subject: | Re: How to debug a segmentation fault? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-108317@lists.php.net to get a copy of this message | ||
On Tue, Jan 28, 2020 at 5:29 PM Benjamin Morel <benjamin.morel@gmail.com>
wrote:
> Hi internals,
>
> I'm encountering a SIGSEGV in PHP-FPM on PHP 7.4.2 in a Symfony app. The
> bug seems to happen during the rendering of a Twig template; this makes it
> hard for me to pinpoint the code that triggers the segfault.
>
> Could you please tell me what the procedure to collect information is, so
> that I can file a useful bug report?
>
As the first step, I would always suggest to reproduce this issue with the
CLI binary (this includes the builtin server under -S localhost:8000 -t
public). That way you don't have to deal with multi-process FPM.
Once that is done, the easiest way to get some useful debugging information
is to run PHP under valgrind, this is done using "USE_ZEND_ALLOC=0 valgrind
php ...".
Nikita