php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47022 Update of Bug 47000.
Submitted: 2009-01-06 16:32 UTC Modified: 2009-04-30 20:27 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: alan at binarystars dot com Assigned:
Status: Not a bug Package: IMAP related
PHP Version: 5.2.8 OS: linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alan at binarystars dot com
New email:
PHP Version: OS:

 

 [2009-01-06 16:32 UTC] alan at binarystars dot com
Description:
------------
Update of Bug 47000. I tried to update the bug report but wouldn't 
let me.

shell> php phpinfo.php | grep Configure
Configure Command =>  './configure'  '--with-mysql=/usr/local/mysql' 
'--with-mysqli=/usr/local/mysql/bin/mysql_config' '--with-mysql-
sock=/tmp/mysql.sock' '--with-imap=/root/bin/imap-2007e' '--enable-
mbstring=all' '--enable-debug'

shell> export USE_ZEND_ALLOC=0

shell> export | grep ZEND
declare -x USE_ZEND_ALLOC="0"

shell> php -v
PHP 5.2.8 (cli) (built: Dec 20 2008 05:26:51)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

shell> uname -r
2.6.25-14.fc9.i686

shell> valgrind --tool=memcheck --num-callers=30 --leak-check=full --
log-file=imap_bug.log /usr/local/bin/php imap_bug.php

Old test run:
http://home.binarystars.com/~alan/imap_bug/archive/




Reproduce code:
---------------
Colorized imap_bug.html with line numbers:
http://home.binarystars.com/~alan/imap_bug/imap_bug.html (34k)

Text version:
http://home.binarystars.com/~alan/imap_bug/imap_bug.txt (3.6k)

Expected result:
----------------
See Bug 47000.
http://bugs.php.net/bug.php?id=47000




Actual result:
--------------
Method 1 results (w/ USE_ZEND_ALLOC=0):
http://home.binarystars.com/~alan/imap_bug/method1_results.txt (2.1k)

Method 2 results (w/ USE_ZEND_ALLOC=0): 
http://home.binarystars.com/~alan/imap_bug/method2_results.txt (2.1k)

Valgrind results (v3.4.0):
http://home.binarystars.com/~alan/imap_bug/imap_bug.log (2.4k)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-06 17:55 UTC] scottmac@php.net
Check memory_get_usage() to see what PHP is using, my guess is that there is a copy of the data in c-client and another for PHP. Immediately after that line has executed I'm assuming the c-client version is released.
 [2009-01-06 18:57 UTC] alan at binarystars dot com
I assume you mean if I enable Zend Memory. If you check the Old test 
run where USE_ZEND_ALLOC=1 you can see PHP is cleared the memory 
successfully after an unset.

http://home.binarystars.com/~alan/imap_bug/archive/method1_results.tx
t

However, the resident memory (RSS) remains high. Its almost like c-
client keeps the email data in memory without flushing the memory.

Again, this is a huge problem with systems that do not have a lot of 
free memory. Is there any way to flush the memory without exiting the 
script?
 [2009-01-06 18:59 UTC] alan at binarystars dot com
I'll try posting the URL again... the 't' is missing at the end of 
the line.

http://home.binarystars.com/~alan/imap_bug/archive/method1_results.tx
t
 [2009-01-14 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-04-30 20:27 UTC] pajoye@php.net
Duplicate of #47940, which is now fixed in cvs (all active branches).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 05:01:30 2024 UTC