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: "Allowed memory size" and "bus error" crashes in 7.4
that do not appear in 7.3
Status: Open
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:
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.
Previous Comments:
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
[2019-12-03 22:46:32] chartjes at grumpy-learning dot com
The command I use to run the integration test suite is:
SYMFONY_DEPRECATIONS_HELPER=disabled CFP_ENV=testing vendor/bin/phpunit --testsuite integration
If I set memory_limit in my phpunit.xml file to be -1, it crashes with a bus error.
gdb has issues on macOS Catalina where it needs to be codesigned and I have tried numerous fixes to
get it to work and have been unsuccessful.
------------------------------------------------------------------------
[2019-12-03 21:38:41] derick@php.net
It'd be really helpful if you explained how to run the test suite in there. I also thought you
mentioned memory_limit=-1 and a bus error? The latter comes with segfault usually, which you can
make with gdb: https://bugs.php.net/bugs-generating-backtrace.php
You can run that as:
gdb --args php which phpunit
And then "run" on the gdb prompt
------------------------------------------------------------------------
[2019-12-03 20:50:55] 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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78903&edit=1