Bug #72734 [Com]: memory-leak zend_objects.c(162)

From: Date: Tue, 02 Aug 2016 17:33:20 +0000
Subject: Bug #72734 [Com]: memory-leak zend_objects.c(162)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202837@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72734&edit=1

 ID:                 72734
 Comment by:         spam2 at rhsoft dot net
 Reported by:        spam2 at rhsoft dot net
 Summary:            memory-leak zend_objects.c(162)
 Status:             Feedback
 Type:               Bug
 Package:            Scripting Engine problem
 PHP Version:        7.0.9
 Block user comment: N
 Private report:     N

 New Comment:

[wwwcron@testserver:~]$ USE_ZEND_ALLOC=0 valgrind --leak-check=full /usr/bin/php
/Volumes/dune/updateservice/distribute/call_cronjob.php modules/podcast/cron.php
passthru,popen,pclose
==12145== Memcheck, a memory error detector
==12145== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==12145== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==12145== Command: /usr/bin/php /Volumes/dune/updateservice/distribute/call_cronjob.php
modules/podcast/cron.php passthru,popen,pclose
==12145== 
==12145== 
==12145== HEAP SUMMARY:
==12145==     in use at exit: 9,751 bytes in 115 blocks
==12145==   total heap usage: 183,379 allocs, 183,264 frees, 121,244,560 bytes allocated
==12145== 
==12145== 22 bytes in 1 blocks are definitely lost in loss record 24 of 106
==12145==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==12145==    by 0xCAD1940: ???
==12145==    by 0xCAEF79E: ???
==12145==    by 0xCAD6994: ???
==12145==    by 0xCAD69D8: ???
==12145==    by 0xCAEF176: ???
==12145==    by 0x41292C7: ???
==12145==    by 0x362188: zend_startup_module_ex (zend_API.c:1849)
==12145==    by 0x362233: zend_startup_module_zval (zend_API.c:1864)
==12145==    by 0x355708: zend_hash_apply (zend_hash.c:1534)
==12145==    by 0x35590C: zend_startup_modules (zend_API.c:1975)
==12145==    by 0x381A3B: php_module_startup (main.c:2217)
==12145==
==12145== 48 bytes in 1 blocks are definitely lost in loss record 71 of 106
==12145==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==12145==    by 0xCAD1940: ???
==12145==    by 0xCAD3C11: ???
==12145==    by 0xCAD67F8: ???
==12145==    by 0xCAD6989: ???
==12145==    by 0xCAD69D8: ???
==12145==    by 0xCAEF176: ???
==12145==    by 0x41292C7: ???
==12145==    by 0x362188: zend_startup_module_ex (zend_API.c:1849)
==12145==    by 0x362233: zend_startup_module_zval (zend_API.c:1864)
==12145==    by 0x355708: zend_hash_apply (zend_hash.c:1534)
==12145==    by 0x35590C: zend_startup_modules (zend_API.c:1975)
==12145==
==12145== 86 (64 direct, 22 indirect) bytes in 1 blocks are definitely lost in loss record 76 of 106
==12145==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==12145==    by 0x8E22545: gaih_inet (in /usr/lib64/libc-2.23.so)
==12145==    by 0x8E25FDA: getaddrinfo (in /usr/lib64/libc-2.23.so)
==12145==    by 0xCAD3B07: ???
==12145==    by 0xCAD67F8: ???
==12145==    by 0xCAD6989: ???
==12145==    by 0xCAD69D8: ???
==12145==    by 0xCAEF176: ???
==12145==    by 0x41292C7: ???
==12145==    by 0x362188: zend_startup_module_ex (zend_API.c:1849)
==12145==    by 0x362233: zend_startup_module_zval (zend_API.c:1864)
==12145==    by 0x355708: zend_hash_apply (zend_hash.c:1534)
==12145==
==12145== LEAK SUMMARY:
==12145==    definitely lost: 134 bytes in 3 blocks
==12145==    indirectly lost: 22 bytes in 1 blocks
==12145==      possibly lost: 0 bytes in 0 blocks
==12145==    still reachable: 9,595 bytes in 111 blocks
==12145==         suppressed: 0 bytes in 0 blocks
==12145== Reachable blocks (those to which a pointer was found) are not shown.
==12145== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==12145==
==12145== For counts of detected and suppressed errors, rerun with: -v
==12145== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)


Previous Comments:
------------------------------------------------------------------------
[2016-08-02 16:24:30] nikic@php.net

Additionally it would help to provide the output of "USE_ZEND_ALLOC=0 valgrind
--leak-check=full php code.php". This should at least tell us what precisely was leaked.

------------------------------------------------------------------------
[2016-08-02 16:09:27] kalle@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

In case it was the bug from #72724, then please either supply a zip or similar with the files,
although a small self contained script is prefable, thanks!

------------------------------------------------------------------------
[2016-08-02 14:18:47] spam2 at rhsoft dot net

Description:
------------
because of the horrible bug https://bugs.php.net/bug.php?id=72724 i have a
debug-build on a VM running and face the errors below all day long

Aug  2 14:20:02 testserver php: [Tue Aug  2 14:20:02 2016]  Script: 
'/Volumes/dune/www-servers/cms/cms/modules/podcast/cron.php'
Aug  2 14:20:02 testserver php: /home/builduser/rpmbuild/BUILD/php-7.0.9/Zend/zend_objects.c(162) : 
Freeing 0x7FA86E74E1C0 (360 bytes),
script=/Volumes/dune/www-servers/cms/cms/modules/podcast/cron.php
Aug  2 14:20:02 testserver php: === Total 1 memory leaks detected ===
Aug  2 14:40:01 testserver php: [Tue Aug  2 14:40:01 2016]  Script: 
'/Volumes/dune/www-servers/cms/cms/modules/podcast/cron.php'
Aug  2 14:40:01 testserver php: /home/builduser/rpmbuild/BUILD/php-7.0.9/Zend/zend_objects.c(162) : 
Freeing 0x7FB5C934E1C0 (360 bytes),
script=/Volumes/dune/www-servers/cms/cms/modules/podcast/cron.php
Aug  2 14:40:01 testserver php: === Total 1 memory leaks detected ===
Aug  2 15:00:01 testserver php: [Tue Aug  2 15:00:01 2016]  Script: 
'/Volumes/dune/www-servers/cms/cms/modules/podcast/cron.php'
Aug  2 15:00:01 testserver php: /home/builduser/rpmbuild/BUILD/php-7.0.9/Zend/zend_objects.c(162) : 
Freeing 0x7F4C2594E1C0 (360 bytes),
script=/Volumes/dune/www-servers/cms/cms/modules/podcast/cron.php
Aug  2 15:00:01 testserver php: === Total 1 memory leaks detected ===
Aug  2 15:02:01 testserver php: [Tue Aug  2 15:02:01 2016]  Script: 
'/Volumes/dune/www-servers/cms/cms/modules/podcast/cron.php'
Aug  2 15:02:01 testserver php: /home/builduser/rpmbuild/BUILD/php-7.0.9/Zend/zend_objects.c(162) : 
Freeing 0x7F524FB4E1C0 (360 bytes),
script=/Volumes/dune/www-servers/cms/cms/modules/podcast/cron.php
Aug  2 15:02:01 testserver php: === Total 1 memory leaks detected ===
Aug  2 15:20:01 testserver php: [Tue Aug  2 15:20:01 2016]  Script: 
'/Volumes/dune/www-servers/cms/cms/modules/podcast/cron.php'
Aug  2 15:20:01 testserver php: /home/builduser/rpmbuild/BUILD/php-7.0.9/Zend/zend_objects.c(162) : 
Freeing 0x7F5CFD54E1C0 (360 bytes),
script=/Volumes/dune/www-servers/cms/cms/modules/podcast/cron.php
Aug  2 15:20:01 testserver php: === Total 1 memory leaks detected ===
Aug  2 15:40:02 testserver php: [Tue Aug  2 15:40:02 2016]  Script: 
'/Volumes/dune/www-servers/cms/cms/modules/podcast/cron.php'
Aug  2 15:40:02 testserver php: /home/builduser/rpmbuild/BUILD/php-7.0.9/Zend/zend_objects.c(162) : 
Freeing 0x7F7B1234E1C0 (360 bytes),
script=/Volumes/dune/www-servers/cms/cms/modules/podcast/cron.php
Aug  2 16:00:01 testserver php: [Tue Aug  2 16:00:01 2016]  Script: 
'/Volumes/dune/www-servers/cms/cms/modules/podcast/cron.php'
Aug  2 16:00:01 testserver php: /home/builduser/rpmbuild/BUILD/php-7.0.9/Zend/zend_objects.c(162) : 
Freeing 0x7F095454E1C0 (360 bytes),
script=/Volumes/dune/www-servers/cms/cms/modules/podcast/cron.php
Aug  2 16:00:01 testserver php: === Total 1 memory leaks detected ===
Aug  2 16:02:01 testserver php: [Tue Aug  2 16:02:01 2016]  Script: 
'/Volumes/dune/www-servers/cms/cms/modules/podcast/cron.php'
Aug  2 16:02:01 testserver php: /home/builduser/rpmbuild/BUILD/php-7.0.9/Zend/zend_objects.c(162) : 
Freeing 0x7F884254E1C0 (360 bytes),
script=/Volumes/dune/www-servers/cms/cms/modules/podcast/cron.php
Aug  2 16:02:01 testserver php: === Total 1 memory leaks detected ===




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



--
Edit this bug report at https://bugs.php.net/bug.php?id=72734&edit=1


Thread (10 messages)

« previous php.bugs (#202837) next »