Edit report at https://bugs.php.net/bug.php?id=78918&edit=1
ID: 78918
Updated by: nikic@php.net
Reported by: brent at spatie dot be
Summary: Segfault with preloading Laravel
-Status: Feedback
+Status: Closed
Type: Bug
Package: opcache
Operating System: macOS 10.14
PHP Version: 7.4.0
-Assigned To:
+Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Thanks brent for checking. I'll close this issue -- let's open new bugs for any followup
problems.
Previous Comments:
------------------------------------------------------------------------
[2019-12-20 13:16:54] brent at spatie dot be
Update: I've now also tested this with php-fpm, it also works.
------------------------------------------------------------------------
[2019-12-20 13:12:39] brent at spatie dot be
Hi Nikita
It's working now with the latest 7.4 build (7.4.2-dev). That's great! I'm getting
some "already declared class" warnings still, but I guess that has to do with my preload
script, stuff like ": Cannot declare interface Nette\DI\Config\IAdapter, because the name is
already in use in
/Users/brent/dev/spatie/aggregate.stitcher.io/vendor/nette/di/src/compatibility.php"
I guess this one can be closed though, thank you for looking into this :)
------------------------------------------------------------------------
[2019-12-18 11:12:14] nikic@php.net
Unfortunately I'm not able to reproduce the segfault on Ubuntu. To make sure we're on the
same page, here's what I do:
* Clone the git@github.com:brendt/aggregate.stitcher.io.git repo
* Run ~/php-7.4/sapi/cli/php composer.phar install
* Patch vendor/nesbot/carbon/src/Carbon/Traits/Date.php to comment out the problematic $days static
property.
* Run the following command:
~/php-7.4/sapi/cli/php -c ~/php-7.4/php.ini -d opcache.preload=preload.php -S localhost:8000 -t
public
* Open localhost:8000 in the browser
Does this match what you're doing?
> Using gdb I've got this (still no idea if this is useful at all for you)> > 0x00007fff7c4ec61a in ?? () from /usr/lib/system/libsystem_kernel.dylib
Is this the full backtrace? Do you get anything more when typing "backtrace" into gdb?
------------------------------------------------------------------------
[2019-12-17 15:36:40] bugreports at gmail dot com
> [2019-12-17 15:01 UTC] brent at spatie dot be> I've used PHP 7.4.1-dev now (commit https://github.com/php/php-src/commit/5ddcacac)
why?
7.4.1.dev is stone old when it comes to recent fixes
https://git.php.net/?p=php-src.git;a=shortlog;h=refs/heads/PHP-7.4
------------------------------------------------------------------------
[2019-12-17 15:01:17] brent at spatie dot be
Hi Nikita
I've used PHP 7.4.1-dev now (commit https://github.com/php/php-src/commit/5ddcacac)
I'm still getting a segfault:
[1] 86293 segmentation fault <php path>/bin/php -S localhost:8181 -t public
Using gdb I've got this (still no idea if this is useful at all for you)
0x00007fff7c4ec61a in ?? () from /usr/lib/system/libsystem_kernel.dylib
When I don't preload any classes, yet still provide a preload script, there's another
segfault:
[1] 90260 segmentation fault <php path>/bin/php -S localhost:8181 -t public
And finally, when opcache.preload and opcache.preload_user options are omitted in php.ini, the
server works fine.
------------------------------------------------------------------------
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