FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=18031&edit=1

ID: 18031
Updated by: kvz@php.net
Reported By: krzysztof dot klinikowski at cantstopgames dot com
Summary: Memleak in System_Daemon
-Status: Open
+Status: Closed
Type: Bug
Package: System_Daemon
Operating System: Linux Ubuntu 10.04
Package Version: 0.10.3
PHP Version: 5.3.2
-Assigned To:
+Assigned To: kvz
Roadmap Versions:
New Comment:

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: kvz
This bug has been fixed in SVN.

If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should
be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.

http://stackoverflow.com/questions/4113776/php-daemon-possible-memory-
leak/4132951#4132951


Previous Comments:
------------------------------------------------------------------------

[2010-11-08 16:45:19] #fb0039a505d7a76ed9b

Description:
------------
Hello.

As I noticed System_Deamon have memleak for some versions. We can read
about it at:

http://stackoverflow.com/questions/4113776/php-daemon-possible-memory-leak

As You propably see theres a good example of script that could cause a
memleak, I attached it to that bug report too.

Anyone have solution how to fix it?

Test script:
---------------
#!/usr/bin/php -q

<?php
require_once "System/Daemon.php";
System_Daemon::setOption("appName", "smsd");
System_Daemon::start();
while(!System_Daemon::isDying()) {
System_Daemon::info("debug: memory_get_peak_usage:
".memory_get_peak_usage());
System_Daemon::info("debug: memory_get_usage: ".memory_get_usage());
System_Daemon::iterate(2);
}


Actual result:
--------------
[Nov 08 16:34:57] info: debug: memory_get_peak_usage: 967796
[Nov 08 16:34:57] info: debug: memory_get_usage: 934688
[Nov 08 16:34:59] info: debug: memory_get_peak_usage: 969164
[Nov 08 16:34:59] info: debug: memory_get_usage: 934644
[Nov 08 16:35:01] info: debug: memory_get_peak_usage: 969260
[Nov 08 16:35:01] info: debug: memory_get_usage: 934644
[Nov 08 16:35:03] info: debug: memory_get_peak_usage: 969356
[Nov 08 16:35:03] info: debug: memory_get_usage: 934644
[Nov 08 16:35:05] info: debug: memory_get_peak_usage: 969452
[Nov 08 16:35:05] info: debug: memory_get_usage: 934644
...

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedNov 9, '10 at 11:11a
activeNov 9, '10 at 11:11a
posts1
users1
websitepear.php.net

1 user in discussion

Kvz: 1 post

People

Translate

site design / logo © 2022 Grokbase