[php-src] Issue #9362: opcache.consistency_checks does not have expected effect

From: Date: Thu, 18 Aug 2022 06:07:07 +0000
Subject: [php-src] Issue #9362: opcache.consistency_checks does not have expected effect
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242239@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/9362 Author: ItsReddi ### Description The following code: ``` ; Check the cache checksum each N requests. ; The default value of "0" means that the checks are disabled. opcache.consistency_checks=1000 ``` First request: ``` [18-Aug-2022 05:53:13] NOTICE: fpm is running, pid 1 [18-Aug-2022 05:53:13] NOTICE: ready to handle connections Thu Aug 18 05:53:19 2022 (7): Message Cached script '/var/www/html/frontend/web/index.php' Thu Aug 18 05:53:19 2022 (7): Message Cached script '/var/www/html/vendor/autoload.php' Thu Aug 18 05:53:19 2022 (7): Message Added key '/var/www/html/frontend/web/../../vendor/autoload.php' Thu Aug 18 05:53:19 2022 (7): Message Cached script '/var/www/html/vendor/composer/autoload_real.php' Thu Aug 18 05:53:19 2022 (7): Message Cached script '/var/www/html/vendor/composer/platform_check.php' Thu Aug 18 05:53:19 2022 (7): Message Cached script '/var/www/html/vendor/composer/ClassLoader.php' Thu Aug 18 05:53:19 2022 (7): Message Cached script '/var/www/html/vendor/composer/autoload_static.php' Thu Aug 18 05:53:19 2022 (7): Message Cached script '/var/www/html/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php' Thu Aug 18 05:53:19 2022 (7): Message Added key '/var/www/html/vendor/composer/../phpunit/phpunit/src/Framework/Assert/Functions.php' Thu Aug 18 05:53:19 2022 (7): Message Cached script '/var/www/html/vendor/symfony/polyfill-php80/bootstrap.php' Thu Aug 18 05:53:19 2022 (7): Message Added key '/var/www/html/vendor/composer/../symfony/polyfill-php80/bootstrap.php' Thu Aug 18 05:53:19 2022 (7): Message Cached script '/var/www/html/vendor/symfony/deprecation-contracts/function.php' Thu Aug 18 05:53:19 2022 (7): Message Added key '/var/www/html/vendor/composer/../symfony/deprecation-contracts/function.php' Thu Aug 18 05:53:19 2022 (7): Message Cached script '/var/www/html/vendor/symfony/polyfill-mbstring/bootstrap.php' Thu Aug 18 05:53:19 2022 (7): Message Added key '/var/www/html/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php' Thu Aug 18 05:53:19 2022 (7): Message Cached script '/var/www/html/vendor/symfony/polyfill-mbstring/bootstrap80.php' Thu Aug 18 05:53:19 2022 (7): Message Cached script '/var/www/html/vendor/symfony/polyfill-ctype/bootstrap.php' Thu Aug 18 05:53:19 2022 (7): Message Added key '/var/www/html/vendor/composer/../symfony/polyfill-ctype/bootstrap.php' Thu Aug 18 05:53:19 2022 (7): Message Cached script '/var/www/html/vendor/symfony/polyfill-ctype/bootstrap80.php' Thu Aug 18 05:53:19 2022 (7): Message Cached script '/var/www/html/vendor/guzzlehttp/promises/src/functions_include.php' Thu Aug 18 05:53:19 2022 (7): Message Added key '/var/www/html/vendor/composer/../guzzlehttp/promises/src/functions_include.php' .... ``` Second Request allready a check was applied ``` hu Aug 18 05:54:42 2022 (8): Message Checksum failed for '/var/www/html/vendor/google/apiclient/src/aliases.php': expected=0x5e298221, found=0xa0bc82a4 Thu Aug 18 05:54:42 2022 (8): Message Cached script '/var/www/html/vendor/google/apiclient/src/aliases.php' Thu Aug 18 05:54:42 2022 (8): Message Added key '/var/www/html/vendor/composer/../google/apiclient/src/aliases.php' Thu Aug 18 05:54:42 2022 (8): Message Checksum failed for '/var/www/html/vendor/google/apiclient/src/Model.php': expected=0x2f90d8cb, found=0x91afda85 Thu Aug 18 05:54:42 2022 (8): Message Cached script '/var/www/html/vendor/google/apiclient/src/Model.php' Thu Aug 18 05:54:42 2022 (8): Message Added key '/var/www/html/vendor/composer/../google/apiclient/src/Model.php' Thu Aug 18 05:54:42 2022 (8): Message Checksum failed for '/var/www/html/vendor/google/apiclient/src/AuthHandler/Guzzle7AuthHandler.php': expected=0xe22db6b7, found=0x2920b7ca Thu Aug 18 05:54:42 2022 (8): Message Cached script '/var/www/html/vendor/google/apiclient/src/AuthHandler/Guzzle7AuthHandler.php' Thu Aug 18 05:54:42 2022 (8): Message Added key '/var/www/html/vendor/composer/../google/apiclient/src/AuthHandler/Guzzle7AuthHandler.php' Thu Aug 18 05:54:42 2022 (8): Message Checksum failed for '/var/www/html/vendor/google/apiclient/src/Task/Exception.php': expected=0x107aa0c5, found=0x9814a2b0 Thu Aug 18 05:54:42 2022 (8): Message Cached script '/var/www/html/vendor/google/apiclient/src/Task/Exception.php' Thu Aug 18 05:54:42 2022 (8): Message Added key '/var/www/html/vendor/composer/../google/apiclient/src/Task/Exception.php' Thu Aug 18 05:54:42 2022 (8): Message Checksum failed for '/var/www/html/vendor/google/apiclient/src/Exception.php': expected=0xb36f9cd0, found=0xb24c9e78 Thu Aug 18 05:54:42 2022 (8): Message Cached script '/var/www/html/vendor/google/apiclient/src/Exception.php' Thu Aug 18 05:54:42 2022 (8): Message Added key '/var/www/html/vendor/composer/../google/apiclient/src/Exception.php' Thu Aug 18 05:54:42 2022 (8): Message Checksum failed for '/var/www/html/vendor/google/apiclient/src/Collection.php': expected=0x02cb39cf, found=0xead03b3a ``` Expected: No Consistency check applied after 1 Request. (Also the files should not be inconsistent, since they are not changed but this is another issue https://github.com/php/php-src/issues/8065) With opcache.consistency_checks=1000 no check is applied on 2nd request ### PHP Version PHP 8.1.9 ### Operating System php:8.1.9-fpm-alpine

« previous php.bugs (#242239) next »