Bug #79194 [Com]: Segmentation fault
| From: | benjamin dot morel at gmail dot com | Date: | Wed, 29 Jan 2020 23:16:56 +0000 |
| Subject: | Bug #79194 [Com]: Segmentation fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-225233@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79194&edit=1
ID: 79194
Comment by: benjamin dot morel at gmail dot com
Reported by: benjamin dot morel at gmail dot com
Summary: Segmentation fault
Status: Open
Type: Bug
Package: Reproducible crash
Operating System: Fedora 31
PHP Version: 7.4.2
Block user comment: N
Private report: N
New Comment:
OK, adding breakpoints to the generated Twig view made me find the error: a memory exhaustion due to
a recursive function call in an entity:
public function isSubscribed() : bool
{
return $this->isSubscribed();
}
Instead of:
return $this->isSubscribed;
Now, a few questions remain:
- I'm surprised I didn't get a line in the php-fpm error log; is this expected in this
case?
- I guess the segfault occurring when memory is exhausted is a bug; should I file a bug with
Blackfire?
Previous Comments:
------------------------------------------------------------------------
[2020-01-29 22:54:04] benjamin dot morel at gmail dot com
Description:
------------
I'm experiencing a segfault occurring during the rendering of a Twig template in a Symfony app.
I pinpointed it to the blackfire extension:
php-fpm[4131]: segfault at 7ffd4502efd8 ip 00007f7ea5fdc6d1 sp 00007ffd4502efe0 error 6 in
blackfire-20190902.so[7f7ea5fc4000+5f000]
I originally thought I'd report the bug with Blackfire, but I think there's more to it:
when I disable the blackfire extension, I get no segfault anymore, but I receive a white page
(Symfony in prod mode) or a partial HTML page (dev mode) after 10 seconds, without any error in the
PHP-FPM logs.
gdb output for the segfault: (only showing the first 10 entries, it goes on and on for more than
20000 entriesâthere may be many more, I gave up after that)
Reading symbols from /usr/sbin/php-fpm...
Reading symbols from /usr/lib/debug/usr/sbin/php-fpm-7.4.2-1.fc31.remi.x86_64.debug...
[New LWP 4132]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `php-fpm: pool www '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f7ea5fdc6d1 in bf_zend_execute () from /usr/lib64/php/modules/blackfire.so
(gdb) bt
#0 0x00007f7ea5fdc6d1 in bf_zend_execute () from /usr/lib64/php/modules/blackfire.so
#1 0x0000560bec0b20c0 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at
/usr/src/debug/php-7.4.2-1.fc31.remi.x86_64/Zend/zend_vm_execute.h:1714
#2 execute_ex (ex=0x7f7e99d6b2c0) at
/usr/src/debug/php-7.4.2-1.fc31.remi.x86_64/Zend/zend_vm_execute.h:53821
#3 0x00007f7ea5fdc6f8 in bf_zend_execute () from /usr/lib64/php/modules/blackfire.so
#4 0x0000560bec0b20c0 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at
/usr/src/debug/php-7.4.2-1.fc31.remi.x86_64/Zend/zend_vm_execute.h:1714
#5 execute_ex (ex=0x7f7e99d6b2c0) at
/usr/src/debug/php-7.4.2-1.fc31.remi.x86_64/Zend/zend_vm_execute.h:53821
#6 0x00007f7ea5fdc6f8 in bf_zend_execute () from /usr/lib64/php/modules/blackfire.so
#7 0x0000560bec0b20c0 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at
/usr/src/debug/php-7.4.2-1.fc31.remi.x86_64/Zend/zend_vm_execute.h:1714
#8 execute_ex (ex=0x7f7e99d6b2c0) at
/usr/src/debug/php-7.4.2-1.fc31.remi.x86_64/Zend/zend_vm_execute.h:53821
#9 0x00007f7ea5fdc6f8 in bf_zend_execute () from /usr/lib64/php/modules/blackfire.so
#10 0x0000560bec0b20c0 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at
/usr/src/debug/php-7.4.2-1.fc31.remi.x86_64/Zend/zend_vm_execute.h:1714
Not sure how I can further detail the bug, please let me know what you need!
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79194&edit=1