Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

memory leak using Apache2 + Smarty 2.6.5 + PHP 4.3.9

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
jet-jock
Smarty Regular


Joined: 11 Sep 2003
Posts: 48
Location: Connecticut, USA

PostPosted: Wed Oct 13, 2004 4:18 pm    Post subject: memory leak using Apache2 + Smarty 2.6.5 + PHP 4.3.9 Reply with quote

I'm getting the following in my error log whenever I load a smarty template. Note that I have no errors when using plain PHP. The following output is for a single page.

Environment: I realize that I am operating on the near-bleeding edge, here, but FWIW:

RedHat Enterprise Linux 3
MySQL 4.1.2-beta
Apache 2.0.52
PHP 4.3.9
Smarty 2.6.5

I had similar output using Apache 2.0.49 & PHP 4.3.7.

Any constructive help would be appreciated.

Output as follows:

    /www/htdocs/index.php
    Last leak repeated 2 times
    /opt/php-4.3.9/Zend/zend_hash.c(199) : Freeing 0x09C9BD64 (32 bytes), script=/home/www/htdocs/index.php
    Last leak repeated 1 time
    /opt/php-4.3.9/Zend/zend_execute.c(2007) : Freeing 0x09E8DB74 (12 bytes), script=/home/www/htdocs/index.php
    Last leak repeated 1 time
    /opt/php-4.3.9/Zend/zend_hash.c(453) : Freeing 0x09C9CFFC (64 bytes), script=/home/www/htdocs/index.php
    /opt/php-4.3.9/Zend/zend_execute.c(501) : Freeing 0x09BB046C (44 bytes), script=/home/www/htdocs/index.php
    /opt/php-4.3.9/Zend/zend_variables.c(111) : Actual location (location was relayed)
    Last leak repeated 1 time
    /opt/php-4.3.9/Zend/zend_compile.c(1676) : Freeing 0x09E052EC (12 bytes), script=/home/www/htdocs/index.php
    Last leak repeated 14 times
    Zend/zend_language_scanner.c(4728) : Freeing 0x09E36254 (1 bytes), script=/home/www/htdocs/index.php
    Last leak repeated 8 times
    /opt/php-4.3.9/Zend/zend_execute.c(2061) : Freeing 0x09E36064 (8 bytes), script=/home/www/htdocs/index.php
    /opt/php-4.3.9/Zend/zend_variables.c(111) : Actual location (location was relayed)
    Last leak repeated 2 times
    /opt/php-4.3.9/Zend/zend_execute.c(2058) : Freeing 0x09EE981C (12 bytes), script=/home/www/htdocs/index.php
    Last leak repeated 2 times
    /opt/php-4.3.9/Zend/zend_execute.c(1786) : Freeing 0x09D9F26C (12 bytes), script=/home/www/htdocs/index.php
    Last leak repeated 1 time
    Zend/zend_language_scanner.c(4637) : Freeing 0x09E5F8B4 (6 bytes), script=/home/www/htdocs/index.php
    /opt/php-4.3.9/Zend/zend_execute.c(1789) : Freeing 0x09DD9C34 (14 bytes), script=/home/www/htdocs/index.php
    /opt/php-4.3.9/Zend/zend_variables.c(111) : Actual location (location was relayed)
    /opt/php-4.3.9/Zend/zend_execute.c(456) : Freeing 0x09BDD62C (44 bytes), script=/home/www/htdocs/index.php
    /opt/php-4.3.9/Zend/zend_variables.c(138) : Actual location (location was relayed)
    /opt/php-4.3.9/Zend/zend_hash.c(199) : Freeing 0x09BDCA5C (32 bytes), script=/home/www/htdocs/index.php
    Last leak repeated 5 times
    /opt/php-4.3.9/Zend/zend_execute.c(1635) : Freeing 0x09C7310C (12 bytes), script=/home/www/htdocs/index.php
    Last leak repeated 5 times
    /opt/php-4.3.9/Zend/zend_hash.c(453) : Freeing 0x09C71DDC (256 bytes), script=/home/www/htdocs/index.php
    Last leak repeated 2 times
    /opt/php-4.3.9/ext/standard/array.c(2074) : Freeing 0x09D490E4 (44 bytes), script=/home/www/htdocs/index.php
    /opt/php-4.3.9/Zend/zend_API.c(562) : Actual location (location was relayed)
    Last leak repeated 1 time
    /opt/php-4.3.9/Zend/zend_execute.c(498) : Freeing 0x09D48E84 (12 bytes), script=/home/www/htdocs/index.php
    Last leak repeated 3 times
    /opt/php-4.3.9/Zend/zend_execute.c(2058) : Freeing 0x09D48E44 (12 bytes), script=/home/www/htdocs/index.php
    Last leak repeated 9 times
    /opt/php-4.3.9/Zend/zend_hash.c(275) : Freeing 0x09BD0774 (47 bytes), script=/home/www/htdocs/index.php
    Last leak repeated 50 times
    /opt/php-4.3.9/Zend/zend_execute.c(509) : Freeing 0x09BD0574 (12 bytes), script=/home/www/htdocs/index.php
    Last leak repeated 5 times
    /opt/php-4.3.9/Zend/zend_API.c(594) : Freeing 0x09BC179C (44 bytes), script=/home/www/htdocs/index.php
    /opt/php-4.3.9/Zend/zend_API.c(582) : Actual location (location was relayed)
    Last leak repeated 3 times
    /opt/php-4.3.9/Zend/zend_execute.c(2007) : Freeing 0x09C75954 (12 bytes), script=/home/www/htdocs/index.php
    Last leak repeated 3 times
    /opt/php-4.3.9/Zend/zend_execute.c(1749) : Freeing 0x09BC29A4 (12 bytes), script=/home/www/htdocs/index.php
    /opt/php-4.3.9/Zend/zend_execute_API.c(341) : Freeing 0x09E6DA8C (44 bytes), script=/home/www/htdocs/index.php
    /opt/php-4.3.9/Zend/zend_variables.c(123) : Actual location (location was relayed)
    Last leak repeated 1 time
    /opt/php-4.3.9/Zend/zend_compile.c(1676) : Freeing 0x09DCF9DC (12 bytes), script=/home/www/htdocs/index.php
    Last leak repeated 19 times
    /opt/php-4.3.9/Zend/zend_compile.c(2006) : Freeing 0x09F0A2C4 (12 bytes), script=/home/www/htdocs/index.php
    /opt/php-4.3.9/Zend/zend_execute_API.c(314) : Freeing 0x09E6D63C (12 bytes), script=/home/www/htdocs/index.php
    /opt/php-4.3.9/Zend/zend_hash.c(41
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Oct 13, 2004 5:53 pm    Post subject: Reply with quote

Hi jet-jock,

I think both apache and php leak. In prefork mode, I don't think it is a huge deal. Even if this is being triggered by some Smarty code (it would be helpful if you included some issue reproducing examples) it is still more suitable for a PHP discussion list, I'd say. I wouldn't be surprised if it was PCRE that was leaking.

What does this mean: "Note that I have no errors when using plain PHP"?Smarty is plain PHP.
Back to top
View user's profile Send private message
jet-jock
Smarty Regular


Joined: 11 Sep 2003
Posts: 48
Location: Connecticut, USA

PostPosted: Wed Oct 13, 2004 6:20 pm    Post subject: Reply with quote

Boots,

Thanks for the reply.

boots wrote:
Hi jet-jock,

I think both apache and php leak. In prefork mode, I don't think it is a huge deal. Even if this is being triggered by some Smarty code (it would be helpful if you included some issue reproducing examples) it is still more suitable for a PHP discussion list, I'd say. I wouldn't be surprised if it was PCRE that was leaking.


Well, sorry about that, then. If I come across the offending code, I'll upload it, but the pages are WAY too large to post here. I did check the bug list at PHP before posting, but there was nothing obvious to me.

boots wrote:
What does this mean: "Note that I have no errors when using plain PHP"?Smarty is plain PHP.


I mean that when I am not using Smarty (and this is quite preliminary), I do not get the errors. I tried preg_match in a plain PHP page just to see if I got any errors from that...none. I also tried connecting/querying MySQL...still none.

As far as Smarty goes, it may be PHP, but it certainly is not 'plain' in my estimation. Wink

PS FWIW, I'm getting the same problem on RH Linux 9 w/ PHP 4.3.7 & Apache 2.0.49
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Wed Oct 13, 2004 7:03 pm    Post subject: Reply with quote

the apache2 sapi is tagged "experimental".
for a reason, i think.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP