Edit report at https://bugs.php.net/bug.php?id=78280&edit=1
ID: 78280
Updated by: nikic@php.net
Reported by: grzegorz129 at gmail dot com
Summary: _emalloc causes segfaults
-Status: Open
+Status: Assigned
Type: Bug
Package: Reproducible crash
Operating System: Linux
PHP Version: 7.3.7
-Assigned To:
+Assigned To: krakjoe
Block user comment: N
Private report: N
New Comment:
Assigning to Joe as it seems likely that this is related to parallel.
The valgrind log is cut off due to too many spurious zend_string_equal_val errors. Could you please
rerun with the suppressions file at https://gist.github.com/nikic/8d404c6799a1532b0c10280f5e57a888
and
USE_ZEND_ALLOC=0 ZEND_DONT_UNLOAD_MODULES=1 valgrind --suppressions=php73.supp php script.php
Previous Comments:
------------------------------------------------------------------------
[2019-07-12 16:51:39] grzegorz129 at gmail dot com
I asked around and the error is not a regress from a recent release. The code is pretty new so the
last logged crash was on 7.3.3, it also happens on 7.3.6 from Ubuntu PPA.
------------------------------------------------------------------------
[2019-07-12 16:48:15] grzegorz129 at gmail dot com
The code runs in CLI only via parallel. There's usually 5-8 copies running over different files
and always one of them crashes withing 10-15 minutes.
I checked the cli and it looks like opcache is enabled. I will try to disable it since it serves no
purpose in CLI (correct me if I'm wrong). I'm not sure if environment variable populated
properly but after longer than usual run I've got such a valgrind dump: https://pastebin.com/FA4vVxzz
------------------------------------------------------------------------
[2019-07-12 16:08:54] grzegorz129 at gmail dot com
Some clarifications:
- I ruled out hardware problem - this is reproducible on 3 AWS instances as well as 2 physical
machines (running Ubuntu on VMWare with Windows host)
- System is not pressured into OOM (~40/60GB of physical memory free). The PHP process has
memory_limit of 2GB of which it uses ~1.2-1.3GB
- The zbacktrace is almost always different while running the code. Originally the error presented
itself while throwing an exception, now after couple code changes it usually either happens during
Doctrine hydration but also in other places
- I tried both with gc enabled as well as gc_disable + gc_collect between big loops - no change
------------------------------------------------------------------------
[2019-07-12 16:04:53] nikic@php.net
Thanks for checking, must be a different problem then. Is this a regression from a recent release?
Does this occur under opcache?
If this is code callable from CLI, can you run PHP using "USE_ZEND_ALLOC=0 valgrind php
script.php" and provide the resulting log?
------------------------------------------------------------------------
[2019-07-12 15:58:49] grzegorz129 at gmail dot com
And another ones: https://pastebin.com/06fsMevR
I got my 7.3.7 yesterday from github tgz release. I double checked and the path is in the source I
compiled. I can try compiling latest master if that helps?
------------------------------------------------------------------------
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=78280
--
Edit this bug report at https://bugs.php.net/bug.php?id=78280&edit=1