[php-src] Issue #7817: JIT segmentation fault in PHP 8.1
| From: | meinemitternacht | Date: | Tue, 28 Dec 2021 17:17:13 +0000 |
| Subject: | [php-src] Issue #7817: JIT segmentation fault in PHP 8.1 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-238608@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/7817
Comment Author: meinemitternacht
@dstogov Troubleshooting this issue is quite tedious.
~~~~
root@v180:~# cat /var/log/php_log |grep 10642
[28-Dec-2021 11:43:51] NOTICE: [pool vtl] child 10642 started
[28-Dec-2021 11:46:13] WARNING: [pool vtl] child 10642 said into stderr: "---- TRACE 36 start
(loop) Composer\Autoload\ClassLoader::findFileWithExtension()
/api/vendor/composer/ClassLoader.php:501"
-- snip --
[28-Dec-2021 11:46:13] WARNING: [pool vtl] child 10642 said into stderr: "0045 RETURN
CV9($file) ; op1(string)"
[28-Dec-2021 11:46:13] WARNING: [pool vtl] child 10642 said into stderr: "---- TRACE 41 abort
(exit from loop)"
[28-Dec-2021 11:46:17] WARNING: [pool vtl] child 10642 exited on signal 11 (SIGSEGV) after
145.578650 seconds from start
~~~~
~~~~
root@v180:~# cat /var/log/php_log |grep 10643
[28-Dec-2021 11:43:51] NOTICE: [pool vtl] child 10643 started
[28-Dec-2021 11:46:13] WARNING: [pool vtl] child 10643 exited on signal 11 (SIGSEGV) after
141.926396 seconds from start
~~~~
It seems that JIT debug output immediately preceding a segfault has no bearing on if it actually
caused the segfault or not. In this case, no debug output was gathered while the child was alive
(but other FPM processes did produce output). However, with JIT tracing turned off, I never receive
a segfault from PHP-FPM.
This is a self-contained build environment (Yocto), and all target machines share the same
architecture (X86_64). I am going to attempt to generate some useful core files, or to run php-fpm
under gdb. Do you have any suggestions to make this process easier? Are there compile-time flags
that I can turn on, or extra debugging options that I can enable?
How does
ZEND_JIT_DEBUG_GDB affect debug output?