Bug #78280 [Opn]: _emalloc causes segfaults
| From: | grzegorz129 at gmail dot com | Date: | Fri, 12 Jul 2019 16:08:54 +0000 |
| Subject: | Bug #78280 [Opn]: _emalloc causes segfaults | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-221736@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78280&edit=1
ID: 78280
User updated by: grzegorz129 at gmail dot com
Reported by: grzegorz129 at gmail dot com
Summary: _emalloc causes segfaults
Status: Open
Type: Bug
Package: Reproducible crash
Operating System: Linux
PHP Version: 7.3.7
Block user comment: N
Private report: N
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[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?
------------------------------------------------------------------------
[2019-07-12 15:47:40] nikic@php.net
Where did you get this 7.3.7 release? It was retagged due to a critical opcache bug, and I suspect
your build does not include https://github.com/php/php-src/commit/21465ec0e1c1401751b35a21f45f1d57255d5be9.
------------------------------------------------------------------------
[2019-07-12 15:43:31] grzegorz129 at gmail dot com
Description:
------------
From the start I have to say I don't have a reproducer which I can share, since problem only
demonstrates itself in a large codebase. However, I'm able to consistently reproduce the
problem and I was able to gather couple core dumps.
- https://pastebin.com/AD7Gtv4k
- https://pastebin.com/iG9djuPi
- https://pastebin.com/yMNHsgF2
- https://pastebin.com/PEyBwdry
- https://pastebin.com/bBjPaAEy
The only consistent element I see is the top frames on the chain: _emalloc -> zend_mm_alloc_heap
-> zend_mm_alloc_small
Test script:
---------------
Not available
Expected result:
----------------
-
Actual result:
--------------
Segfault
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78280&edit=1