Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opcache crashes on Ubuntu 21.10 - php 8.0.8 (segfault) both within apache2 and cli #8193

Closed
pk-fr opened this issue Mar 12, 2022 · 7 comments

Comments

@pk-fr
Copy link

pk-fr commented Mar 12, 2022

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

@devnexen
Copy link
Member

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 ?

@pk-fr
Copy link
Author

pk-fr commented Mar 12, 2022

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.

@nikic
Copy link
Member

nikic commented Mar 12, 2022

PHP 8.0.8 is a quite old patch release. I can't reproduce this with a current PHP 8.0 build.

@devnexen
Copy link
Member

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.

@pk-fr
Copy link
Author

pk-fr commented Mar 12, 2022

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... )

@nikic
Copy link
Member

nikic commented Mar 12, 2022

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.

@pk-fr
Copy link
Author

pk-fr commented Mar 12, 2022

For your information, I just made 2 tests within 2 new VMs ...

  • with Ubuntu 21.10 php 8.0.8 : bug occurs...
  • with Ubuntu 22.04 alpha php 8.1.0 : no bug!

I will report it tomorrow to Ubuntu bugtracker as @nikic suggested ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants