Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

PHP memory leaks and invalid pointers on exit

When closing an application that uses PHP, there seems to be a problem with memory leaks and invalid pointers (huge amount of them actually, like a 100kB of invalid pointers each time the app is closed).

Is there something I could be doing wrong?

[Fri Mar 26 16:19:55 2010] Script: '-'
/Users/martin/app/php-5.3-svn/Zend/zend_objects.c(31) : Freeing 0x16EF8C14 (44 bytes), script=-
[Fri Mar 26 16:19:55 2010] Script: '-'
/Users/martin/app/php-5.3-svn/Zend/zend_objects.c(32) : Freeing 0x16EF8C70 (32 bytes), script=-
/Users/martin/app/php-5.3-svn/Zend/zend_alloc.c(2412) : Actual location (location was relayed)
=== Total 2 memory leaks detected ===
[Fri Mar 26 16:19:55 2010] Script: '-'
---------------------------------------
/Users/martin/app/php-5.3-svn/Zend/zend_variables.c(175) : Block 0x171650b0 status:
/Users/martin/app/php-5.3-svn/Zend/zend_execute_API.c(436) : Actual location (location was relayed)
Invalid pointer: ((thread_id=0xB030B000) != (expected=0xA0789500))
---------------------------------------
[Fri Mar 26 16:19:55 2010] Script: '-'
---------------------------------------
/Users/martin/app/php-5.3-svn/Zend/zend_hash.c(531) : Block 0x171684cc status:
Invalid pointer: ((thread_id=0xB030B000) != (expected=0xA0789500))
---------------------------------------
[Fri Mar 26 16:19:55 2010] Script: '-'
---------------------------------------
/Users/martin/app/php-5.3-svn/Zend/zend_hash.c(533) : Block 0x171681f0 status:
Invalid pointer: ((thread_id=0xB030B000) != (expected=0xA0789500))
[...]
— asked March 26th 2010 by Dieter Wimberger
  • desktop
  • invalidpointer
  • memoryleak
  • php
1 Comment
  • I'm having the same problem. Odd thing is that there is no User called martin on this computer, so that would explain the invalid pointers, but where are those calls coming from?

    — commented July 12th 2010 by Robert Lagerveld

3 Answers

  • This is normal for now. Debugging is turned on in the build of PHP we use, because we're still ironing out some of the bugs with it. It will probably be turned off in one of the upcoming releases.

    — answered March 27th 2010 by Martin Robinson
    permalink
    0 Comments
  • Martin:

    On some machines this freezes the application when closing (seems to take a while to write the huge amount of debug messages).

    Is there any workaround for the moment?

    — answered March 30th 2010 by Dieter Wimberger
    permalink
    0 Comments
  • Is there any timeframe for when this will be fixed?

    I tried to work around an issue with > 2GB files by using PHP, but it seems that doesn't work either due to memory leaks in PHP. (Seems that one can only call PHP functions around 9500 times total before PHP uses up more than the 128M its allowed).

    If nothing else, it would be really nice if packaged builds didn't have this issue.

    — answered April 6th 2010 by David Ward
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.