-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Opcache breaks autoloading after E_COMPILE_ERROR #8063
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
Comments
This looks like an unintended side-effect of dd86987. |
Recorded errors may be attached to the wrong cached script when a fatal error occurs during recording. This happens because the fatal error will cause a bailout, which may prevent the recorded errors from being freed. If an other script is compiled after bailout, or if a class is linked after bailout, the recorded errors will be attached to it. This change fixes this by freeing recorded errors before executing shutdown functions. Fixes GH-8063
Recorded errors may be attached to the wrong cached script when a fatal error occurs during recording. This happens because the fatal error will cause a bailout, which may prevent the recorded errors from being freed. If an other script is compiled after bailout, or if a class is linked after bailout, the recorded errors will be attached to it. This change fixes this by freeing recorded errors before executing shutdown functions. Fixes phpGH-8063
Recorded errors may be attached to the wrong cached script when a fatal error occurs during recording. This happens because the fatal error will cause a bailout, which may prevent the recorded errors from being freed. If an other script is compiled after bailout, or if a class is linked after bailout, the recorded errors will be attached to it. This change fixes this by freeing recorded errors before executing shutdown functions. Fixes phpGH-8063
Recorded errors may be attached to the wrong cached script when a fatal error occurs during recording. This happens because the fatal error will cause a bailout, which may prevent the recorded errors from being freed. If an other script is compiled after bailout, or if a class is linked after bailout, the recorded errors will be attached to it. This change fixes this by freeing recorded errors before executing shutdown functions. Fixes phpGH-8063
Recorded errors may be attached to the wrong cached script when a fatal error occurs during recording. This happens because the fatal error will cause a bailout, which may prevent the recorded errors from being freed. If an other script is compiled after bailout, or if a class is linked after bailout, the recorded errors will be attached to it. This change fixes this by freeing recorded errors before executing shutdown functions. Fixes phpGH-8063
Recorded errors may be attached to the wrong cached script when a fatal error occurs during recording. This happens because the fatal error will cause a bailout, which may prevent the recorded errors from being freed. If an other script is compiled after bailout, or if a class is linked after bailout, the recorded errors will be attached to it. This change fixes this by freeing recorded errors before executing shutdown functions. Fixes GH-8063
Fixed in #8297 |
I'm on PHP 8.3.9 and I'm still receiving the error. The log says: As soon as I hit opcache_reset(). It fixes the issue. It happens only after deployment. I have added opcache_reset() as a part of our deployment script. It does not break everytime. It happens randomly after 10-15 deployments. |
Uh oh!
There was an error while loading. Please reload this page.
Description
If an
E_COMPILE_ERROR
is raised during autoloading with opcache enabled, it breaks autoloading during the shutdown process in subsequent requests.Multiple files are required to reproduce this, so I've put them in this gist:
https://gist.github.com/shira-374/d2077e5581ce5ec53c655c7373846147
With opcache enabled, the script works once, then it always fatals twice. Without opcache it always works as expected.
Resulted in this output:
But I expected this output instead:
PHP Version
8.1.2
Operating System
Debian 11.2
The text was updated successfully, but these errors were encountered: