Force core dump generation – example with php

We can use SEGV signal to force creation of core dump file.

Simple example with PHP

Let’s create running php script:

we need to check that creation of core file enabled:

In case when not:

we can run it in bg mode:

When everything successfully done we can figure out in running directory or in core-dir specialized by sysctl parameters core dump of crashed php script

Let’s run GDB:

In our case it crashed on nanosleep ()

Author: GergunD

Leave a Reply