Edit report at https://bugs.php.net/bug.php?id=78903&edit=1
ID: 78903
Updated by: nikic@php.net
Reported by: chartjes at grumpy-learning dot com
Summary: Conflict in RTD key for closures results in crash
-Status: Open
+Status: Closed
Type: Bug
Package: Reproducible crash
Operating System: macOS 10.15.1
PHP Version: 7.4.0
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=b55033fa18afd9bb60fc4537270266d808ec0868
Log: Fixed bug #78903: Conflict in RTD key for closures results in crash
Previous Comments:
------------------------------------------------------------------------
[2019-12-11 11:29:52] nikic@php.net
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
------------------------------------------------------------------------
[2019-12-04 13:25:30] chartjes at grumpy-learning dot com
My apologies for not providing clearer instructions for running the tests.
You could copy phpunit.xml.dist to phpunit.xml and change the memory_limit value in there, which the
tests will then use.
------------------------------------------------------------------------
[2019-12-04 08:33:36] nikic@php.net
Turns out the memory_limit is set in the phpunit.xml.dist, and removing it there does produce a
segfault. There is no useful trace because a corrupted function causes a jump to an invalid address.
Unfortunately there are no warnings under valgrind.
------------------------------------------------------------------------
[2019-12-04 07:32:32] nikic@php.net
After creating a cfp_test mysql user and database and running "make integration" first, I
now get:
Fatal error: Allowed memory size of 805306368 bytes exhausted at
/home/nikic/php-7.4/Zend/zend_hash.c:2079 (tried to allocate 1048616 bytes) in
/home/nikic/repos/opencfp/vendor/fzaninotto/faker/src/Faker/Provider/Text.php on line 84
I was not able to set memory_limit=-1 to produce the bus error, because the test runner apparently
ignores ini files and options specified on the command line.
------------------------------------------------------------------------
[2019-12-04 07:17:42] nikic@php.net
Can't reproduce memory limit / bus error, presumably because the test suite does not work
correctly: I get a lot of "RuntimeException: The config file
"/home/nikic/repos/opencfp/config/testing.yml" does not exist" errors.
------------------------------------------------------------------------
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=78903
--
Edit this bug report at https://bugs.php.net/bug.php?id=78903&edit=1