|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2019-12-03 20:50 UTC] chartjes at grumpy-learning dot com
Description: ------------ I have been testing out PHP 7.4 with OpenCFP (https://github.com/opencfp/opencfp) and my test suite that uses PHPUnit is crashing with "Allowed memory size" errors that do not occur when using PHP 7.3. I am using PHP 7.4.0 installed using Homebrew Here are the modules that are installed [PHP Modules] bcmath bz2 calendar Core ctype curl date dba dom exif FFI fileinfo filter ftp gd gettext gmp hash iconv intl json ldap libxml mbstring mysqli mysqlnd odbc openssl pcntl pcre PDO pdo_dblib pdo_mysql PDO_ODBC pdo_pgsql pdo_sqlite pgsql Phar phpdbg_webhelper posix pspell readline Reflection session shmop SimpleXML soap sockets sodium SPL sqlite3 standard sysvmsg sysvsem sysvshm tidy tokenizer xml xmlreader xmlrpc xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Zend OPcache My default memory_limit setting is 768M I get the following error: PHP Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes) If I change memory_limit to be 1024M I get "bus error" when running the tests PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 18:00:01 2025 UTC |
Initial analysis suggests that this is caused by an RTD key collision. While a closure is being executed, the file that defines the closure is re-compiled and a colliding RTD key is generated, replacing the original closure. This is a long-standing problem without an easy fix, but we can at least mitigate this in a similar way we do for anon classes. This likely also indicates a bug/inefficiency in Laravel, because it likely shouldn't be loading the same file twice. [0x7fac0481b5d0] Illuminate\Database\Eloquent\Factory->load("/home/nikic/repos/opencfp/tests/../factories") /home/nikic/repos/opencfp/vendor/illuminate/database/Eloquent/Factory.php:202 [0x7fac0481b500] Illuminate\Database\Eloquent\Factory->construct(object[0x7fac0481b550], "/home/nikic/repos/opencfp/tests/../factories") /home/nikic/repos/opencfp/vendor/illuminate/database/Eloquent/Factory.php:54 [0x7fac0481b310] factory(object[0x7fac0481b360]) /home/nikic/repos/opencfp/tests/helpers.php:28 [0x7fac0481b280] Illuminate\Database\Eloquent\Factory->{closure}() /home/nikic/repos/opencfp/factories/Common.php:36