Bug #80322 [Opn->Csd]: Preloader does not work as expected
Edit report at https://bugs.php.net/bug.php?id=80322&edit=1
ID: 80322
Updated by: nikic@php.net
Reported by: sametsahindogan at gmail dot com
Summary: Preloader does not work as expected
-Status: Open
+Status: Closed
Type: Bug
Package: opcache
Operating System: Ubuntu 20.04.1 LTS
PHP Version: 7.4.12
-Assigned To:
+Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
The preloading regression (or at least *a* preloading regression) introduced in PHP 7.4.12 has
already been fixed. The fix is part of PHP 7.4.13, currently in RC phase.
If you still see an issue with PHP 7.4.13, please do tell me.
Previous Comments:
------------------------------------------------------------------------
[2020-11-12 16:00:12] ricardo dot cescon at panthermedia dot net
in addition to my last comments:
removing "php7.4-uopz" solve all our problems with opcache
------------------------------------------------------------------------
[2020-11-12 14:41:02] ricardo dot cescon at panthermedia dot net
We also see another problem with enabled opcache:
traits not will be used correctly.
Error: Call to undefined method XYZ::do_something()
Sample:
################################
trait tX{
protected function do_something(){
}
}
//---------
abstract class Y extends Z{
use tX;
}
//---------
class XYZ extends Y{
function __construct(){
$this->do_something();
}
}
################################
Version PHP 7.3.24 work as expected
------------------------------------------------------------------------
[2020-11-12 12:13:13] ricardo dot cescon at panthermedia dot net
We have currently a similar problem switching to PHP version 7.4.12, but without Laravel and on
Ubuntu 18.04.5 LTS.
We get the following error with enabled opcache:
Call to undefined method SphinxClient::SetServer()
This occurs on the following of code sample
############################################
class sphinxAPI extends SphinxClient {
...
function SetServer($host, $port = null) {
...
parent::SetServer($this->_servers[0][0], $this->_servers[0][1]);
...
############################################
with opcache.enable = Off everything works as expacted
PHP 7.3.24 also work as expacted
------------------------------------------------------------------------
[2020-11-06 16:54:16] jon dot johnson at ucsf dot edu
This may be the same as reported in https://github.com/symfony/symfony/issues/39010
where
ArgumentCountError: Too few arguments to function
Symfony\Component\Cache\Adapter\AbstractAdapter::throwError(), 2 passed in and exactly 4
expected
is thrown when pre-loading is enabled.
I wasn't able to distill this to a PHP script case, but using symfony I created a docker based
reproduction of this at https://github.com/jrjohnson/reproduction-symfony-error-apc-opcache
the error can be reproduced there by doing:
composer install
docker-compose build
docker-compose up
Then visit http://127.0.0.1:8000/ which will fail with a 500
error and messages logged to the console running docker-compose.
------------------------------------------------------------------------
[2020-11-06 10:31:59] nikic@php.net
There's been quite a few reports of preloading issues with this release. I believe the problem
has been introduced by https://github.com/php/php-src/commit/3928b6b435f6c7c818e8211b2ecdeeb7191310d1
(this commit by itself is correct, but it exposed a pre-existing issue) and will be fixed by https://github.com/php/php-src/commit/6808968c896a18d2b9f309b2fe63d529058b78b4
(in 7.4.13).
If you are able to test current PHP-7.4 HEAD, it would be great to confirm the issue is indeed
resolved.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=80322
--
Edit this bug report at https://bugs.php.net/bug.php?id=80322&edit=1
Thread (10 messages)