opcache crashes on Ubuntu 21.10 - php 8.0.8 (segfault) both within apache2 and cli
pk-fr opened this issue · 7 comments
Description
The following code:
<?php
echo "before<br>";
include "obfuscated.php";
echo "after<br>";
?>
obfuscated.php file is here : https://3v4l.org/EUeM7
Normal output with opcache disabled is :
before
after
with opcache enabled and cli:
php test.php
before<br>Segfault (core dumped)
with opcache enabled and apache : connexion reset within the browser...
[core:notice] [pid 374147] AH00051: child pid 374181 exit signal Segmentation fault (11), possible coredump in /etc/apache2
PHP Version
PHP 8.0.8
Operating System
Ubuntu 21.10
is there any specific opcache setting involved (e.g. JIT) ? would it be possible to see if this still crash with, for example, the 8.0.16 release ? Did you only try with the obfuscated version of your code ?
no specific opcache settings with my cli version , only opcache.enable_cli=1
I have no system with other php version to test with..
I'm the developer of the https://github.com/pk-fr/yakpro-po Obfuscator...
The problem occurs only whith it's Shuffles Statements option which randomize code statements ordering by inserting a goto to the next logical statement to keep the same code workflow.
PHP 8.0.8 is a quite old patch release. I can't reproduce this with a current PHP 8.0 build.
I could not reproduce it with PHP 8.0.16 build from source nor with the 8.1.2 package version provided by ubuntu 22.04.
I am currently migrating my dedicated server as my old one is at end of life and will be desactivated at the end ot this month...
I was on Ubuntu 16.04 LTS php 7.0 and I took the newest ubunntu release available which is 21.10 with php 8.0.8
I hope I will migrate in a few months to Ubuntu 22.04 LTS with php8.1...
but anyway, there is a problem on my Ubuntu 21.10 which is officially supported until July 2022... ( 4 months... )
In that case you need to report this on the Ubuntu bugtracker, so they can backport whatever patch is necessary. Or you could use the ondrej PPA and get a recent PHP version.
In any case, I don't think there's anything actionable here from our side, but please do let us know if you still see an issue on a current patch release.