Bug #78918 [Fbk]: Segfault with preloading Laravel

From: Date: Tue, 10 Dec 2019 13:19:45 +0000
Subject: Bug #78918 [Fbk]: Segfault with preloading Laravel
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224195@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78918&edit=1 ID: 78918 Updated by: cmb@php.net Reported by: brent at spatie dot be Summary: Segfault with preloading Laravel Status: Feedback Type: Bug Package: opcache Operating System: macOS 10.14 PHP Version: 7.4.0 Block user comment: N Private report: N New Comment: > You will not get a fatal error […] That is supposed to be "You will now get a fatal error […]". Previous Comments: ------------------------------------------------------------------------ [2019-12-10 12:59:02] nikic@php.net Support for class aliases has been added, and issues relating to classes with unresolved initializers fixed. You will not get a fatal error if you try to preload a class with unresolved initializers under the "require" model (under the opcache_compile_file() model a graceful fallback is possible). However, opcache will try harder to make sure everything can be resolved. I was not able to test preloading Laravel due to https://github.com/briannesbitt/Carbon/blob/298d9f0e8e369301b0ca647f3ce9c92b53ad3a82/src/Carbon/Traits/Date.php#L541-L556. This references constants that are not defined in the trait and are only available in the class using the trait. This will need to either be fixed, or the trait and it's dependencies skipped. ------------------------------------------------------------------------ [2019-12-10 10:40:10] fosron at gmail dot com I've tested preloading Laravel too, and i'm getting "zend_mm_heap corrupted" with this script (https://github.com/brendt/laravel-preload/blob/master/preload.php) on a Docker container (both require and opcache_compile_file options don't work). ------------------------------------------------------------------------ [2019-12-09 17:05:09] themohamedsaid at gmail dot com Unfortunately I keep getting a segfault even when switching to opcache_compile_file() and restarting php-fpm. Wish I had more input to provide ------------------------------------------------------------------------ [2019-12-09 14:03:13] nikic@php.net We've found some fundamental design problems in the preloading functionality today ... The tl;dr is that you need to use opcache_compile_file() based preloading for now. Preloading based on require calls has a whole series of issues that may result in crashes. ------------------------------------------------------------------------ [2019-12-09 13:43:35] themohamedsaid at gmail dot com After disabling all aliases and making sure class_alias is not used, I still get a segfault. WARNING: [pool www] child 18450 exited on signal 11 (SIGSEGV - core dumped) after 1.191760 seconds from start ------------------------------------------------------------------------ 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=78918 -- Edit this bug report at https://bugs.php.net/bug.php?id=78918&edit=1

« previous php.bugs (#224195) next »