Bug #80853 [Opn]: Apparent memory leak in PHP 8 not present in 7.4
| From: | nikic@php.net | Date: | Wed, 17 Mar 2021 10:01:39 +0000 |
| Subject: | Bug #80853 [Opn]: Apparent memory leak in PHP 8 not present in 7.4 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-232806@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80853&edit=1
ID: 80853
Updated by: nikic@php.net
Reported by: zach at yembo dot ai
Summary: Apparent memory leak in PHP 8 not present in 7.4
Status: Open
Type: Bug
Package: Reproducible crash
Operating System: Alpine Linux
PHP Version: 8.0.3
Block user comment: N
Private report: N
New Comment:
I'd usually run the program under "USE_ZEND_ALLOC=0 valgrind --tool=massif php" to
get memory profile, but I'm not sure if that works well for this kind of long-running code.
Previous Comments:
------------------------------------------------------------------------
[2021-03-10 19:59:51] zach at yembo dot ai
Description:
------------
Our product has an AWS SQS queue listener microservice that is an infinite loop that long polls SQS
and processes messages as they come in. When using the php:7.4-fpm-alpine3.13 image from Docker Hub,
the code runs indefinitely with no issues. However, when running the exact same application code
using the php:8.0-fpm-alpine3.13 base image, we are seeing Kubernetes kill the pod due to exhausting
the upper memory limit.
We plotted the output of
kubectl top pods over time, and found a long, slow climb over
the course of 3-4 hours until the pod reaches the memory limit. Like many memory issues, I
don't see any one smoking gun in the code. Since the 7.4 image works ok, I suspect there is a
memory leak either introduced or exacerbated in PHP 8.
The codebase is fairly large and I'm not sure what particular area is causing the issue. Does
anyone have ideas on how to pinpoint or where to look?
These links look generally related, but I'm not sure if there's any good way to tell if
this is the same issue we are facing:
1. https://phabricator.wikimedia.org/T247990
2. https://bugs.php.net/bug.php?id=79519
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80853&edit=1