php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71990 ArrayObject memory leak
Submitted: 2016-04-08 15:55 UTC Modified: 2016-08-14 04:22 UTC
From: littlexiang521 at gmail dot com Assigned:
Status: No Feedback Package: SPL related
PHP Version: 5.5.34 OS: CentOS / OSX
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2016-04-08 15:55 UTC] littlexiang521 at gmail dot com
Description:
------------
if some class extends ArrayObject, in some circular reference conditions gc failed to recycle it.

see codes below, if class B is a stdClass everything works fine

Test script:
---------------
https://0bin.net/paste/CvMSmhUeaKgaE1iU#eQLFPuTHJ56KeveFKaPWoTetXtq+qgeWw+uGDjVbhiU



Expected result:
----------------
memory usage keeps low

9175040
9175040
9175040
9175040
9175040
9175040
9175040
9175040
9175040
9175040
9175040
9175040

Actual result:
--------------
OOM...

121896960
122945536
124256256
125304832
126615552
127664128
128974848
130285568
131334144
132644864
133693440

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /home/data/songxiang/haojing/htdocs/pages/test_mem.php on line 40

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-08 16:15 UTC] littlexiang521 at gmail dot com
It's works fine with php 7.0 latest
 [2016-08-06 04:16 UTC] kalle@php.net
-Status: Open +Status: Feedback
 [2016-08-06 04:16 UTC] kalle@php.net
Please try using this snapshot:

  http://snaps.php.net/php-trunk-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Considering there is only 4 months left of PHP 5.5's active cycle, and with all the gc improvements made to php7, it is not very likely to get fixed. So please try again and confirm if it works with PHP7. thanks!
 [2016-08-14 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC