Bug #79519 [NEW]: Memory leak in PHP 7.4
From: kieran at miami-nice dot co dot uk
Operating system: Linux
PHP version: 7.4.5
Package: Performance problem
Bug Type: Bug
Bug description:Memory leak in PHP 7.4
Description:
------------
I'm running the same code through PHP Unit 8.5.2 on PHP 7.3 and PHP 7.4
and there's a huge memory leak in 7.4. Several others have confirmed a
similar issue in
https://github.com/sebastianbergmann/phpunit/issues/3915
PHPUnit 8.5.2 - PHP 7.3.17 - Memory: 769.00 MB
PHPUnit 8.5.2 - PHP 7.4.5 - Memory: 3.89 GB
Both instances are running in slightly modified images of docker php.
The same changes but based off php:7.3-cli-stretch and php:7.4-cli
respectively. I can provide full php.ini of both which shows nothing
special going on...
I have generated a blackfire profile to show the issue:
* PHP 7.3 -
https://blackfire.io/profiles/6b973d98-014a-4dd2-8b13-f0cf5842221c/graph
* PHP 7.4 -
https://blackfire.io/profiles/c80f648b-a778-4b3c-8acf-00a628e1630f/graph
Comparison of PHP 7.3 against 7.4 -
https://blackfire.io/profiles/compare/a2dfa36c-3203-4599-959b-95d87143776a/graph
--
I do note that since first running the tests (poss. PHP 7.4.4 or
earlier) it was returning 4.16 GB and on 7.4.5 it's now 3.89 GB so the
memory leak fixes in recent releases has helped some what...
Test script:
---------------
Unfortunately I cannot provide access to the code. It's a large Laravel
application.
I would be grateful if based on the memory profiles someone could point
in the right direction to help debug the issue.
Expected result:
----------------
n/a
Actual result:
--------------
n/a
--
Edit bug report at https://bugs.php.net/bug.php?id=79519&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79519&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79519&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79519&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79519&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79519&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79519&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79519&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79519&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79519&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79519&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79519&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79519&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79519&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79519&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79519&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79519&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79519&r=mysqlcfg
Thread (25 messages)
- kieran at miami-nice dot co dot uk
- nikic@php.netBug #79519 [Opn]: Memory leak in PHP 7.4
- cmb@php.netBug #79519 [Opn]: Memory leak in PHP 7.4
- kieran at miami-nice dot co dot ukBug #79519 [Com]: Memory leak in PHP 7.4
- kieran at miami-nice dot co dot ukBug #79519 [Com]: Memory leak in PHP 7.4
- kieran at miami-nice dot co dot ukBug #79519 [Com]: Memory leak in PHP 7.4
- maggus dot staab+php at gmail dot comBug #79519 [Com]: Memory leak in PHP 7.4
- cmb@php.netBug #79519 [Opn]: Memory leak in PHP 7.4
- kieran at miami-nice dot co dot ukBug #79519 [Com]: Memory leak in PHP 7.4
- jerome dot vieilledent at blackfire dot ioBug #79519 [Com]: Memory leak in PHP 7.4
- jerome dot vieilledent at blackfire dot ioBug #79519 [Com]: Memory leak in PHP 7.4
- kieran at supportpal dot comBug #79519 [Com]: Memory leak in PHP 7.4
- nikic@php.netBug #79519 [Opn]: Memory leak in PHP 7.4
- kieran at supportpal dot comBug #79519 [Com]: Memory leak in PHP 7.4
- nikic@php.netBug #79519 [Opn]: Memory leak in PHP 7.4
- nikic@php.netBug #79519 [Opn]: Memory leak in PHP 7.4
- kieran at supportpal dot comBug #79519 [Com]: Memory leak in PHP 7.4
- nikic@php.netBug #79519 [Opn]: Memory leak in PHP 7.4
- kieran at supportpal dot comBug #79519 [Com]: Memory leak in PHP 7.4
- kieran at supportpal dot comBug #79519 [Com]: Memory leak in PHP 7.4
- nikic@php.netBug #79519 [Opn]: Memory leak in PHP 7.4
- nikic@php.netBug #79519 [Opn->Csd]: Memory leak in PHP 7.4
- brendt at stitcher dot ioBug #79519 [Com]: Memory leak in PHP 7.4
- nikic@php.netBug #79519 [Csd]: Memory leak in PHP 7.4
- brendt at stitcher dot ioBug #79519 [Com]: Memory leak in PHP 7.4