Bug #48781 [Com]: Cyclical garbage collector memory leak
| From: | jas at rephunter dot net | Date: | Sun, 03 Apr 2011 00:24:24 +0000 |
| Subject: | Bug #48781 [Com]: Cyclical garbage collector memory leak | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-159920@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=48781&edit=1
ID: 48781
Comment by: jas at rephunter dot net
Reported by: nate at frickenate dot com
Summary: Cyclical garbage collector memory leak
Status: Closed
Type: Bug
Package: Scripting Engine problem
Operating System: Debian 5.0 kernel 2.6.24-23-xen
PHP Version: 5.3.0
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
I believe this bug has regressed. We only recently upgraded from 5.3.2
to 5.3.5.
And now several scripts are broken that have been working for years. By
adding the
unset of the variable at the end of the loop as shown in the first
snippet below,
the problem is fixed.
So I believe that the symptom has regressed, although not necessarily
the cause.
Previous Comments:
------------------------------------------------------------------------
[2010-04-20 14:55:01] dmitry@php.net
Note that your test and expectation are not completely correct because
the actual garbage collection occurs at undefined moments of time. As
result the memory usage on different iteration will be different. To
avoid this ambiguity add explicit call to gc_collect_cycles() before
printing memory usage.
------------------------------------------------------------------------
[2010-04-20 14:50:54] dmitry@php.net
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2010-04-20 14:30:38] dmitry@php.net
Automatic comment from SVN on behalf of dmitry
Revision: http://svn.php.net/viewvc/?view=revision&revision=298213
Log: Fixed bug #48781 (Cyclical garbage collector memory leak)
------------------------------------------------------------------------
[2010-04-19 12:37:21] rquadling@php.net
That should have said ...
"So, it is _NOT_ completely losing the items, just not cleaning them
during the
cycle. At shutdown, they are cleaned."
------------------------------------------------------------------------
[2010-04-19 12:31:56] rquadling@php.net
If the loop is limited to 11111 items, using my code to report the
construct/use/destruct, the log ends with ...
11108:#3
11109:#3
11110:#3
11111:#3
04999:#3
09999:#3
10000:#3
So, it is completely losing the items, just not cleaning them during the
cycle.
At shutdown, they are cleaned.
------------------------------------------------------------------------
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
http://bugs.php.net/bug.php?id=48781
--
Edit this bug report at http://bugs.php.net/bug.php?id=48781&edit=1