Bug #78512 [Com]: Cannot make preload work

From: Date: Mon, 16 Sep 2019 16:00:17 +0000
Subject: Bug #78512 [Com]: Cannot make preload work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222771@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78512&edit=1 ID: 78512 Comment by: jhdxr@php.net Reported by: nicolas dot grekas+php at gmail dot com Summary: Cannot make preload work Status: Open Type: Bug Package: opcache PHP Version: 7.4.0RC1 Block user comment: N Private report: N New Comment: I confirm I can reproduce this issue with latest devilbox/php-fpm-7.4 docker image(588dad05d58f). however, I got another error when I tried with my dev environment (latest 7.4 branch, 6417c507ce511ecfc5d3f3818ffb01435f3086ee). ./configure --disable-all --disable-cgi --disable-phpdbg --enable-cli --enable-debug --enable-opcache ./sapi/cli/php -S localhost:8000 -t ~/proj/php-src-tests/bug78512/preload-failures/public/ -dopcache.preload=~/proj/php-src-tests/bug78512/preload-failures/var/cache/prod/srcApp_KernelProdContainer.php php: /home/jhdxr/proj/php-src/Zend/zend_string.c:264: zend_string_init_interned_permanent: Assertion `permanent' failed. I'll try a full build later in my dev env to see if I can reproduce this issue. Previous Comments: ------------------------------------------------------------------------ [2019-09-13 07:58:02] nikic@php.net I've tried with the prod env now to see if that makes a difference, but can't reproduce with that either. In that case I get a 404 page, but no errors. ------------------------------------------------------------------------ [2019-09-12 18:17:51] nicolas dot grekas+php at gmail dot com built: Sep 11 2019 23:45:59 doesn't work yet for me: This is gone: Error Internal error: wrong size calculation php -S starts, but I still have Class 'ComposerAutoloaderInit...' not found when I access http://localhost:8000 afterwards. When I call get_declared_classes(), the class is not listed. But when I call opcache_get_status(), I see the class listed in preload_statistics. Basically, the original issue description still applies to me sorry... ------------------------------------------------------------------------ [2019-09-11 07:57:59] nikic@php.net After https://github.com/php/php-src/commit/0a24cd4e7c38d7565905152d4286ef0404d9d591 I get: Warning: Can't preload already declared class Symfony\Bundle\FrameworkBundle\DependencyInjection\CompatibilityServiceSubscriberInterface in /home/nikic/repos/preload-test/vendor/symfony/framework-bundle/DependencyInjection/CompatibilityServiceSubscriberInterface.php on line 28 Warning: Can't preload already declared class Symfony\Contracts\EventDispatcher\EventDispatcherInterface in /home/nikic/repos/preload-test/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php on line 20 Warning: Can't preload unlinked class Symfony\Component\DependencyInjection\ExpressionLanguage: Unknown parent Symfony\Component\ExpressionLanguage\ExpressionLanguage in /home/nikic/repos/preload-test/vendor/symfony/dependency-injection/ExpressionLanguage.php on line 28 But otherwise it works. Do you see any further issues? ------------------------------------------------------------------------ [2019-09-10 16:48:54] nikic@php.net I had to use -d opcache.preload=var/cache/dev/srcApp_KernelDevDebugContainer.preload.php. php: /home/nikic/php-7.4/ext/opcache/ZendAccelerator.c:4293: accel_preload: Assertion `zend_gc_refcount(&(ht)->gc) == 1' failed. ------------------------------------------------------------------------ [2019-09-10 16:07:51] nicolas dot grekas+php at gmail dot com I merged the needed code in Symfony so that it becomes easier to experiment with this. Today, I get: (514): Error Internal error: wrong size calculation: $PRELOAD$ start=0x00007fad51433380, end=0x00007fad51595870, real=0x00007fad515959e8 Here is my reproducer: composer create-project symfony/skeleton:4.4.x@dev preload-test cd preload-test php -S localhost:8000 -t public/ -dopcache.preload=var/cache/prod/srcApp_KernelProdContainer.preload.php -dopcache.preload_user=root FYI, I'm using docker pull devilbox/php-fpm-7.4 to get the code (built: Sep 9 2019 23:44:24). ------------------------------------------------------------------------ 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=78512 -- Edit this bug report at https://bugs.php.net/bug.php?id=78512&edit=1

« previous php.bugs (#222771) next »