Bug #81215 [Opn->Sus]: Possible memory leak with closure nested \array_filter()

From: Date: Fri, 02 Jul 2021 08:15:20 +0000
Subject: Bug #81215 [Opn->Sus]: Possible memory leak with closure nested \array_filter()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234752@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81215&edit=1

 ID:                 81215
 Updated by:         nikic@php.net
 Reported by:        berliozdavid at gmail dot com
 Summary:            Possible memory leak with closure nested
                     \array_filter()
-Status:             Open
+Status:             Suspended
 Type:               Bug
 Package:            Performance problem
 Operating System:   Fedora/Linux
 PHP Version:        8.0.8
 Block user comment: N
 Private report:     N

 New Comment:

I'd suggest reporting the issue to the xhprof extension. Most likely the problem is on their
side, and if not they can provide more information on the issue (possibly there is some bad
interaction between the observer API and closures? I have no idea what xhprof uses on PHP 8.)


Previous Comments:
------------------------------------------------------------------------
[2021-07-02 05:47:28] berliozdavid at gmail dot com

I've installed both exts with PHP80 and PHP74

php74 -n -dzend_extension=opcache -dopcache.enable=1 -dopcache.enable_cli=1 -dextension=xhprof.so
array_filter_short.php --> OK no increase

php80 -n -dzend_extension=opcache -dopcache.enable=1 -dopcache.enable_cli=1 -dextension=xhprof.so
array_filter_short.php --> KO increase

------------------------------------------------------------------------
[2021-07-02 05:42:10] berliozdavid at gmail dot com

On my rig the culprits are opcache + xhprof

php -n -dzend_extension=opcache -dopcache.enable=1 -dopcache.enable_cli=1 -dextension=xhprof.so
array_filter_short.php

------------------------------------------------------------------------
[2021-07-01 13:42:03] berliozdavid at gmail dot com

I can confirm that php -n is not affected.

So far I've tested separately

php -n -dextension=swoole.so

opcache
xhprof

No memory leak

I can test with a set of common modules if you provide me a list.

------------------------------------------------------------------------
[2021-07-01 13:20:37] nikic@php.net

Thanks! Some of those (e.g. xhprof, swoole) look potentially problematic in terms of modifying
engine behavior. Can you please check whether you still see when using "php -n" (i.e.
without ini file)?

------------------------------------------------------------------------
[2021-07-01 13:01:35] berliozdavid at gmail dot com

[PHP Modules]
apcu
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
imagick
inotify
intl
json
libxml
mbstring
memcached
mongodb
msgpack
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
ssh2
standard
swoole
sysvmsg
sysvsem
sysvshm
tokenizer
xhprof
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

------------------------------------------------------------------------


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=81215


--
Edit this bug report at https://bugs.php.net/bug.php?id=81215&edit=1


Thread (10 messages)

« previous php.bugs (#234752) next »