ID: 47285 Updated by: der...@php.net Reported By: danger at FreeBSD dot org -Status: Assigned +Status: Feedback Bug Type: Date/time related Operating System: FreeBSD PHP Version: 5.2.8 Assigned To: derick New Comment:
Please send me account details (by email), as I still can't reproduce this. Previous Comments: ------------------------------------------------------------------------ [2009-02-13 11:02:06] maarten at vivesta dot com I have the same problem: PHP 5.2.9RC2-dev (cli) (built: Feb 12 2009 15:10:25) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies On FreeBSD 6.3. Built PHP without FreeBSD patches, just downloaded latest and did "cd php5.2-200902121330", "./configure", "make" and "./sapi/cli/php" <?php while (1) { $a=strtotime ( 'now', time() ); } Top shows the memory usage growing steadily. ------------------------------------------------------------------------ [2009-02-05 12:09:35] danger at FreeBSD dot org r...@[temp ~]# php -v PHP 5.2.9-dev (cli) (built: Feb 5 2009 13:04:42) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies still leaks. If you are interested in access to that box to debug, I will be glad to provide you with the login credentials. ------------------------------------------------------------------------ [2009-02-05 10:01:54] der...@php.net Like I said, I can not reproduce this. But please test without xcache being loaded! ------------------------------------------------------------------------ [2009-02-05 09:56:32] danger at FreeBSD dot org r...@[web1 ~]# php -v PHP 5.2.9-dev (cli) (built: Feb 5 2009 10:52:28) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies with XCache v1.2.2, Copyright (c) 2005-2007, by mOo I also applied distribution patches that come with FreeBSD (exluding the patch-ext_date_lib_timelib_structs.h one), you may find them at http://cvsweb.freebsd.org/ports/lang/php5/files. Verified that the above PHP version still leaks memory, slower but still. ------------------------------------------------------------------------ [2009-02-03 01:19:36] danger at FreeBSD dot org Description: ------------ The strtotime() function still leaks memory in patched PHP 5.2.8 after applying patches from http://news.php.net/php.cvs/55000. The memory leak itself is much smaller than before applying fixes. Before, it took a few seconds to leak 1gb of mem, now it takes some minutes however it's still there. This bug is related to http://bugs.php.net/bug.php?id=46889. Reproduce code: --------------- while (true) { $tmp = inc_stamp(time(), 1); } function inc_stamp($timestamp, $off_days) { return strtotime("+" . $off_days . " day", $timestamp); } Actual result: -------------- Memory leak reported by top(1). If the script runs for longer time, it gets killed by kernel since the system is going out of memory and swap. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47285&edit=1