Bug #76844 [Opn->Ana]: PHP crashes on big file with array inside
Edit report at https://bugs.php.net/bug.php?id=76844&edit=1
ID: 76844
Updated by: cmb@php.net
Reported by: denis at bitrix dot ru
Summary: PHP crashes on big file with array inside
-Status: Open
+Status: Analyzed
Type: Bug
Package: opcache
Operating System: Ubuntu 14.04.5 LTS
PHP Version: 7.2.9
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2019-06-29 13:09:02] cmb@php.net
Related To: Bug #77620
------------------------------------------------------------------------
[2018-09-06 08:40:52] nikic@php.net
@rhsoft: The interned strings buffer is not really relevant to this issue. As @cmb pointed out, this
is a stack overflow in zend_ssa_check_scc_var. The test script has a very long (and linear) chain of
uses, each of which results in another recursive call. This could be resolved either by making the
algorithm non-recursive or adding / changing some limits. E.g. we might want to punt on SSA
optimizations if there are too many SSA vars.
------------------------------------------------------------------------
[2018-09-06 08:31:07] spam2 at rhsoft dot net
"Fatal Error Zend OPcache cannot allocate buffer for interned strings" clearly indicates
that "opcache.memory_consumption" is way too small
frankly if you can allocate 18 MB i guess someone has lowered the default value
------
-rw-r--r-- 1 root root 198K 2018-03-05 16:37
/usr/share/phpMyAdmin/vendor/tecnickcom/tcpdf/fonts/dejavusans.ph
/usr/share/phpMyAdmin/vendor/tecnickcom/tcpdf/fonts/dejavusans.php allocates 1,36 MB in opcache so
your guess 16M should be enough for 12M file is pretty wrong
------------------------------------------------------------------------
[2018-09-06 08:24:47] denis at bitrix dot ru
opcache.interned_strings_buffer doesn't seem to affect:
$ php -i|grep opcache.interned_strings_buffer
opcache.interned_strings_buffer => 8 => 8
$ php -d opcache.enable_cli=1 -d opcache.interned_strings_buffer=16 restore.file_list.php
Segmentation fault
I guess, 16M should be enough for 12M file. And further I got an error:
$ php -d opcache.enable_cli=1 -d opcache.interned_strings_buffer=18 restore.file_list.php
Thu Sep 6 10:19:14 2018 (12707): Fatal Error Zend OPcache cannot allocate buffer for interned
strings
------------------------------------------------------------------------
[2018-09-05 18:13:41] cmb@php.net
On a quick glance, this looks like a stack overflow.
------------------------------------------------------------------------
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=76844
--
Edit this bug report at https://bugs.php.net/bug.php?id=76844&edit=1
Thread (8 messages)