php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73889 memory leaks / valgrind report
Submitted: 2017-01-08 03:50 UTC Modified: 2017-03-19 04:22 UTC
Votes:5
Avg. Score:4.6 ± 0.8
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: spam2 at rhsoft dot net Assigned:
Status: No Feedback Package: MySQLi related
PHP Version: 7.1.3 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-01-08 03:50 UTC] spam2 at rhsoft dot net
Description:
------------
hopefully this helps somehow

after tuning my rpm-build for profile-guided-optimization and optional debug builds i recently added options to run "valgrind" on the application profiling

you can find the full log at http://access.thelounge.net/harry/php-valgrind.txt

/usr/bin/valgrind --tool=memcheck --leak-check=yes --leak-check=full --show-leak-kinds=all --log-file=$PROFILE_ROOT/logs/valgrind.log $HTTPD_BINARY -f "$PROFILE_ROOT/httpd.conf"

example:

==4295== 168 bytes in 1 blocks are definitely lost in loss record 95 of 128
==4295==    at 0x4C2DA60: calloc (vg_replace_malloc.c:711)
==4295==    by 0xC0A291C: ???
==4295==    by 0xC08F285: ???
==4295==    by 0xC099CED: ???
==4295==    by 0xA7FF364: ???
==4295==    by 0xA7D02E4: ???
==4295==    by 0x4193BBE: ???
==4295==    by 0x6C6A66D: zend_startup_module_ex (zend_API.c:1843)
==4295==    by 0x6C6A6CF: zend_startup_module_zval (zend_API.c:1858)
==4295==    by 0x6C7837A: zend_hash_apply (zend_hash.c:1508)
==4295==    by 0x6C6AC9B: zend_startup_modules (zend_API.c:1969)
==4295==    by 0x6BD1A10: php_module_startup (main.c:2256)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-08 10:34 UTC] nikic@php.net
-Status: Open +Status: Feedback
 [2017-01-08 10:34 UTC] nikic@php.net
Please run valgrind using ZEND_DONT_UNLOAD_MODULES=1, otherwise stack traces for shared objects are incomplete. Please also don't specify --show-leak-kinds=all. Reachable memory are not leaks and these entries cause a lot of noise.
 [2017-01-08 11:43 UTC] spam2 at rhsoft dot net
-Status: Feedback +Status: Open
 [2017-01-08 11:43 UTC] spam2 at rhsoft dot net
==30171== Memcheck, a memory error detector
==30171== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==30171== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==30171== Command: /usr/sbin/httpd -f /rpmbuild/PHP-PGO/httpd.conf
==30171== Parent PID: 30158
==30171== 
==30171== 
==30171== HEAP SUMMARY:
==30171==     in use at exit: 116,221 bytes in 130 blocks
==30171==   total heap usage: 386 allocs, 256 frees, 508,221 bytes allocated
==30171== 
==30171== LEAK SUMMARY:
==30171==    definitely lost: 0 bytes in 0 blocks
==30171==    indirectly lost: 0 bytes in 0 blocks
==30171==      possibly lost: 0 bytes in 0 blocks
==30171==    still reachable: 116,221 bytes in 130 blocks
==30171==         suppressed: 0 bytes in 0 blocks
==30171== Reachable blocks (those to which a pointer was found) are not shown.
==30171== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==30171== 
==30171== For counts of detected and suppressed errors, rerun with: -v
==30171== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==30175== 
==30175== HEAP SUMMARY:
==30175==     in use at exit: 369,323 bytes in 4,559 blocks
==30175==   total heap usage: 397,160 allocs, 392,601 frees, 91,565,690 bytes allocated
==30175== 
==30175== 32 bytes in 1 blocks are possibly lost in loss record 51 of 136
==30175==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==30175==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==30175==    by 0x6BDC5B5: zend_hash_str_add_mem (zend_hash.h:611)
==30175==    by 0x6BDEAD1: sapi_register_post_entry (SAPI.c:954)
==30175==    by 0x6BDEA3F: sapi_register_post_entries (SAPI.c:940)
==30175==    by 0x6BE2AD5: php_setup_sapi_content_types (php_content_types.c:64)
==30175==    by 0x6BDC6E9: sapi_globals_ctor (SAPI.c:66)
==30175==    by 0x6BDC753: sapi_startup (SAPI.c:89)
==30175==    by 0x6D4242E: php_apache_server_startup (sapi_apache2.c:497)
==30175==    by 0x1669F2: ap_run_post_config (in /usr/sbin/httpd)
==30175==    by 0x13230F: main (in /usr/sbin/httpd)
==30175== 
==30175== 32 bytes in 1 blocks are possibly lost in loss record 52 of 136
==30175==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==30175==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==30175==    by 0x6BDC5B5: zend_hash_str_add_mem (zend_hash.h:611)
==30175==    by 0x6BDEAD1: sapi_register_post_entry (SAPI.c:954)
==30175==    by 0x6BDEA3F: sapi_register_post_entries (SAPI.c:940)
==30175==    by 0xA66B9E4: OnUpdate_mbstring_encoding_translation (mbstring.c:1423)
==30175==    by 0x6C86093: zend_register_ini_entries (zend_ini.c:256)
==30175==    by 0xA66BD05: zm_startup_mbstring (mbstring.c:1554)
==30175==    by 0x6C6A66D: zend_startup_module_ex (zend_API.c:1843)
==30175==    by 0x6C6A6CF: zend_startup_module_zval (zend_API.c:1858)
==30175==    by 0x6C7837A: zend_hash_apply (zend_hash.c:1508)
==30175==    by 0x6C6AC9B: zend_startup_modules (zend_API.c:1969)
==30175== 
==30175== 48 bytes in 1 blocks are possibly lost in loss record 73 of 136
==30175==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==30175==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==30175==    by 0x6C7361A: zend_string_alloc (zend_string.h:122)
==30175==    by 0x6C736B0: zend_string_init (zend_string.h:158)
==30175==    by 0x6C75C0C: _zend_hash_str_add (zend_hash.c:666)
==30175==    by 0x6BDC590: zend_hash_str_add_mem (zend_hash.h:610)
==30175==    by 0x6BDEAD1: sapi_register_post_entry (SAPI.c:954)
==30175==    by 0x6BDEA3F: sapi_register_post_entries (SAPI.c:940)
==30175==    by 0x6BE2AD5: php_setup_sapi_content_types (php_content_types.c:64)
==30175==    by 0x6BDC6E9: sapi_globals_ctor (SAPI.c:66)
==30175==    by 0x6BDC753: sapi_startup (SAPI.c:89)
==30175==    by 0x6D4242E: php_apache_server_startup (sapi_apache2.c:497)
==30175== 
==30175== 64 bytes in 1 blocks are possibly lost in loss record 82 of 136
==30175==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==30175==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==30175==    by 0x6C7361A: zend_string_alloc (zend_string.h:122)
==30175==    by 0x6C736B0: zend_string_init (zend_string.h:158)
==30175==    by 0x6C75C0C: _zend_hash_str_add (zend_hash.c:666)
==30175==    by 0x6BDC590: zend_hash_str_add_mem (zend_hash.h:610)
==30175==    by 0x6BDEAD1: sapi_register_post_entry (SAPI.c:954)
==30175==    by 0x6BDEA3F: sapi_register_post_entries (SAPI.c:940)
==30175==    by 0xA66B9E4: OnUpdate_mbstring_encoding_translation (mbstring.c:1423)
==30175==    by 0x6C86093: zend_register_ini_entries (zend_ini.c:256)
==30175==    by 0xA66BD05: zm_startup_mbstring (mbstring.c:1554)
==30175==    by 0x6C6A66D: zend_startup_module_ex (zend_API.c:1843)
==30175== 
==30175== 288 bytes in 1 blocks are possibly lost in loss record 114 of 136
==30175==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==30175==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==30175==    by 0x6C73E81: zend_hash_real_init_ex (zend_hash.c:138)
==30175==    by 0x6C73FFD: zend_hash_check_init (zend_hash.c:161)
==30175==    by 0x6C755F5: _zend_hash_add_or_update_i (zend_hash.c:551)
==30175==    by 0x6C75C36: _zend_hash_str_add (zend_hash.c:667)
==30175==    by 0x6BDC590: zend_hash_str_add_mem (zend_hash.h:610)
==30175==    by 0x6BDEAD1: sapi_register_post_entry (SAPI.c:954)
==30175==    by 0x6BDEA3F: sapi_register_post_entries (SAPI.c:940)
==30175==    by 0x6BE2AD5: php_setup_sapi_content_types (php_content_types.c:64)
==30175==    by 0x6BDC6E9: sapi_globals_ctor (SAPI.c:66)
==30175==    by 0x6BDC753: sapi_startup (SAPI.c:89)
==30175== 
==30175== 155,168 bytes in 4,056 blocks are definitely lost in loss record 136 of 136
==30175==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==30175==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==30175==    by 0x6B7C730: zend_string_alloc (zend_string.h:122)
==30175==    by 0x6B7C7C6: zend_string_init (zend_string.h:158)
==30175==    by 0x6B845E5: php_mysqlnd_rset_field_read (mysqlnd_wireprotocol.c:1378)
==30175==    by 0x6BA9C69: mysqlnd_mysqlnd_res_meta_read_metadata_pub (mysqlnd_result_meta.c:76)
==30175==    by 0x6B9F0D8: mysqlnd_mysqlnd_res_read_result_metadata_pub (mysqlnd_result.c:385)
==30175==    by 0x6BA0252: mysqlnd_query_read_result_set_header (mysqlnd_result.c:539)
==30175==    by 0x6BB207A: mysqlnd_com_reap_result_run (mysqlnd_commands.c:764)
==30175==    by 0x6B6BBFC: mysqlnd_mysqlnd_conn_data_reap_query_pub (mysqlnd_connection.c:917)
==30175==    by 0x6B6B34F: mysqlnd_mysqlnd_conn_data_query_pub (mysqlnd_connection.c:859)
==30175==    by 0xA3E7B83: zif_mysqli_query (mysqli_nonapi.c:589)
==30175== 
==30175== LEAK SUMMARY:
==30175==    definitely lost: 155,168 bytes in 4,056 blocks
==30175==    indirectly lost: 0 bytes in 0 blocks
==30175==      possibly lost: 464 bytes in 5 blocks
==30175==    still reachable: 213,691 bytes in 498 blocks
==30175==         suppressed: 0 bytes in 0 blocks
==30175== Reachable blocks (those to which a pointer was found) are not shown.
==30175== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==30175== 
==30175== For counts of detected and suppressed errors, rerun with: -v
==30175== ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 0 from 0)
==30176== 
==30176== HEAP SUMMARY:
==30176==     in use at exit: 214,003 bytes in 499 blocks
==30176==   total heap usage: 24,891 allocs, 24,392 frees, 3,435,549 bytes allocated
==30176== 
==30176== 32 bytes in 1 blocks are possibly lost in loss record 51 of 133
==30176==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==30176==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==30176==    by 0x6BDC5B5: zend_hash_str_add_mem (zend_hash.h:611)
==30176==    by 0x6BDEAD1: sapi_register_post_entry (SAPI.c:954)
==30176==    by 0x6BDEA3F: sapi_register_post_entries (SAPI.c:940)
==30176==    by 0x6BE2AD5: php_setup_sapi_content_types (php_content_types.c:64)
==30176==    by 0x6BDC6E9: sapi_globals_ctor (SAPI.c:66)
==30176==    by 0x6BDC753: sapi_startup (SAPI.c:89)
==30176==    by 0x6D4242E: php_apache_server_startup (sapi_apache2.c:497)
==30176==    by 0x1669F2: ap_run_post_config (in /usr/sbin/httpd)
==30176==    by 0x13230F: main (in /usr/sbin/httpd)
==30176== 
==30176== 32 bytes in 1 blocks are possibly lost in loss record 52 of 133
==30176==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==30176==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==30176==    by 0x6BDC5B5: zend_hash_str_add_mem (zend_hash.h:611)
==30176==    by 0x6BDEAD1: sapi_register_post_entry (SAPI.c:954)
==30176==    by 0x6BDEA3F: sapi_register_post_entries (SAPI.c:940)
==30176==    by 0xA66B9E4: OnUpdate_mbstring_encoding_translation (mbstring.c:1423)
==30176==    by 0x6C86093: zend_register_ini_entries (zend_ini.c:256)
==30176==    by 0xA66BD05: zm_startup_mbstring (mbstring.c:1554)
==30176==    by 0x6C6A66D: zend_startup_module_ex (zend_API.c:1843)
==30176==    by 0x6C6A6CF: zend_startup_module_zval (zend_API.c:1858)
==30176==    by 0x6C7837A: zend_hash_apply (zend_hash.c:1508)
==30176==    by 0x6C6AC9B: zend_startup_modules (zend_API.c:1969)
==30176== 
==30176== 48 bytes in 1 blocks are possibly lost in loss record 72 of 133
==30176==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==30176==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==30176==    by 0x6C7361A: zend_string_alloc (zend_string.h:122)
==30176==    by 0x6C736B0: zend_string_init (zend_string.h:158)
==30176==    by 0x6C75C0C: _zend_hash_str_add (zend_hash.c:666)
==30176==    by 0x6BDC590: zend_hash_str_add_mem (zend_hash.h:610)
==30176==    by 0x6BDEAD1: sapi_register_post_entry (SAPI.c:954)
==30176==    by 0x6BDEA3F: sapi_register_post_entries (SAPI.c:940)
==30176==    by 0x6BE2AD5: php_setup_sapi_content_types (php_content_types.c:64)
==30176==    by 0x6BDC6E9: sapi_globals_ctor (SAPI.c:66)
==30176==    by 0x6BDC753: sapi_startup (SAPI.c:89)
==30176==    by 0x6D4242E: php_apache_server_startup (sapi_apache2.c:497)
==30176== 
==30176== 64 bytes in 1 blocks are possibly lost in loss record 81 of 133
==30176==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==30176==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==30176==    by 0x6C7361A: zend_string_alloc (zend_string.h:122)
==30176==    by 0x6C736B0: zend_string_init (zend_string.h:158)
==30176==    by 0x6C75C0C: _zend_hash_str_add (zend_hash.c:666)
==30176==    by 0x6BDC590: zend_hash_str_add_mem (zend_hash.h:610)
==30176==    by 0x6BDEAD1: sapi_register_post_entry (SAPI.c:954)
==30176==    by 0x6BDEA3F: sapi_register_post_entries (SAPI.c:940)
==30176==    by 0xA66B9E4: OnUpdate_mbstring_encoding_translation (mbstring.c:1423)
==30176==    by 0x6C86093: zend_register_ini_entries (zend_ini.c:256)
==30176==    by 0xA66BD05: zm_startup_mbstring (mbstring.c:1554)
==30176==    by 0x6C6A66D: zend_startup_module_ex (zend_API.c:1843)
==30176== 
==30176== 288 bytes in 1 blocks are possibly lost in loss record 112 of 133
==30176==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==30176==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==30176==    by 0x6C73E81: zend_hash_real_init_ex (zend_hash.c:138)
==30176==    by 0x6C73FFD: zend_hash_check_init (zend_hash.c:161)
==30176==    by 0x6C755F5: _zend_hash_add_or_update_i (zend_hash.c:551)
==30176==    by 0x6C75C36: _zend_hash_str_add (zend_hash.c:667)
==30176==    by 0x6BDC590: zend_hash_str_add_mem (zend_hash.h:610)
==30176==    by 0x6BDEAD1: sapi_register_post_entry (SAPI.c:954)
==30176==    by 0x6BDEA3F: sapi_register_post_entries (SAPI.c:940)
==30176==    by 0x6BE2AD5: php_setup_sapi_content_types (php_content_types.c:64)
==30176==    by 0x6BDC6E9: sapi_globals_ctor (SAPI.c:66)
==30176==    by 0x6BDC753: sapi_startup (SAPI.c:89)
==30176== 
==30176== LEAK SUMMARY:
==30176==    definitely lost: 0 bytes in 0 blocks
==30176==    indirectly lost: 0 bytes in 0 blocks
==30176==      possibly lost: 464 bytes in 5 blocks
==30176==    still reachable: 213,539 bytes in 494 blocks
==30176==         suppressed: 0 bytes in 0 blocks
==30176== Reachable blocks (those to which a pointer was found) are not shown.
==30176== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==30176== 
==30176== For counts of detected and suppressed errors, rerun with: -v
==30176== ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
==30172== 
==30172== HEAP SUMMARY:
==30172==     in use at exit: 213,195 bytes in 490 blocks
==30172==   total heap usage: 24,890 allocs, 24,400 frees, 3,435,357 bytes allocated
==30172== 
==30172== LEAK SUMMARY:
==30172==    definitely lost: 0 bytes in 0 blocks
==30172==    indirectly lost: 0 bytes in 0 blocks
==30172==      possibly lost: 0 bytes in 0 blocks
==30172==    still reachable: 213,195 bytes in 490 blocks
==30172==         suppressed: 0 bytes in 0 blocks
==30172== Reachable blocks (those to which a pointer was found) are not shown.
==30172== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==30172== 
==30172== For counts of detected and suppressed errors, rerun with: -v
==30172== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
 [2017-01-08 18:38 UTC] spam2 at rhsoft dot net
i optimized the environment to use "httpd -X" (no forking) and ignore the loop-settings for code-coverage in case 'valgrind' is part of the game - finally that leads to easily profile every php-build with one call for each page of a sample cms-setup and report memleaks with minimized output
____________________________________________

this one looks serious

==17212== 78,144 bytes in 2,016 blocks are definitely lost in loss record 136 of 136
==17212==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==17212==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==17212==    by 0x6B7C730: zend_string_alloc (zend_string.h:122)
==17212==    by 0x6B7C7C6: zend_string_init (zend_string.h:158)
==17212==    by 0x6B845E5: php_mysqlnd_rset_field_read (mysqlnd_wireprotocol.c:1378)
==17212==    by 0x6BA9C69: mysqlnd_mysqlnd_res_meta_read_metadata_pub (mysqlnd_result_meta.c:76)
==17212==    by 0x6B9F0D8: mysqlnd_mysqlnd_res_read_result_metadata_pub (mysqlnd_result.c:385)
==17212==    by 0x6BA0252: mysqlnd_query_read_result_set_header (mysqlnd_result.c:539)
==17212==    by 0x6BB207A: mysqlnd_com_reap_result_run (mysqlnd_commands.c:764)
==17212==    by 0x6B6BBFC: mysqlnd_mysqlnd_conn_data_reap_query_pub (mysqlnd_connection.c:917)
==17212==    by 0x6B6B34F: mysqlnd_mysqlnd_conn_data_query_pub (mysqlnd_connection.c:859)
==17212==    by 0xA3E7B83: zif_mysqli_query (mysqli_nonapi.c:589)
____________________________________________

complete result

 CMS_AUTOTESTS="0"
 export ZEND_DONT_UNLOAD_MODULES=1
 /usr/bin/valgrind --tool=memcheck --leak-check=yes --leak-check=full --log-file=$PROFILE_ROOT/logs/valgrind.log $HTTPD_BINARY -X -f "$PROFILE_ROOT/httpd.conf" &

==17212== Memcheck, a memory error detector
==17212== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==17212== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==17212== Command: /usr/sbin/httpd -X -f /rpmbuild/PHP-PGO/httpd.conf
==17212== Parent PID: 17194
==17212== 
==17212== 
==17212== HEAP SUMMARY:
==17212==     in use at exit: 292,291 bytes in 2,519 blocks
==17212==   total heap usage: 278,014 allocs, 275,495 frees, 62,878,401 bytes allocated
==17212== 
==17212== 32 bytes in 1 blocks are possibly lost in loss record 52 of 136
==17212==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==17212==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==17212==    by 0x6BDC5B5: zend_hash_str_add_mem (zend_hash.h:611)
==17212==    by 0x6BDEAD1: sapi_register_post_entry (SAPI.c:954)
==17212==    by 0x6BDEA3F: sapi_register_post_entries (SAPI.c:940)
==17212==    by 0x6BE2AD5: php_setup_sapi_content_types (php_content_types.c:64)
==17212==    by 0x6BDC6E9: sapi_globals_ctor (SAPI.c:66)
==17212==    by 0x6BDC753: sapi_startup (SAPI.c:89)
==17212==    by 0x6D4242E: php_apache_server_startup (sapi_apache2.c:497)
==17212==    by 0x1669F2: ap_run_post_config (in /usr/sbin/httpd)
==17212==    by 0x13230F: main (in /usr/sbin/httpd)
==17212== 
==17212== 32 bytes in 1 blocks are possibly lost in loss record 53 of 136
==17212==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==17212==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==17212==    by 0x6BDC5B5: zend_hash_str_add_mem (zend_hash.h:611)
==17212==    by 0x6BDEAD1: sapi_register_post_entry (SAPI.c:954)
==17212==    by 0x6BDEA3F: sapi_register_post_entries (SAPI.c:940)
==17212==    by 0xA66B9E4: OnUpdate_mbstring_encoding_translation (mbstring.c:1423)
==17212==    by 0x6C86093: zend_register_ini_entries (zend_ini.c:256)
==17212==    by 0xA66BD05: zm_startup_mbstring (mbstring.c:1554)
==17212==    by 0x6C6A66D: zend_startup_module_ex (zend_API.c:1843)
==17212==    by 0x6C6A6CF: zend_startup_module_zval (zend_API.c:1858)
==17212==    by 0x6C7837A: zend_hash_apply (zend_hash.c:1508)
==17212==    by 0x6C6AC9B: zend_startup_modules (zend_API.c:1969)
==17212== 
==17212== 48 bytes in 1 blocks are possibly lost in loss record 73 of 136
==17212==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==17212==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==17212==    by 0x6C7361A: zend_string_alloc (zend_string.h:122)
==17212==    by 0x6C736B0: zend_string_init (zend_string.h:158)
==17212==    by 0x6C75C0C: _zend_hash_str_add (zend_hash.c:666)
==17212==    by 0x6BDC590: zend_hash_str_add_mem (zend_hash.h:610)
==17212==    by 0x6BDEAD1: sapi_register_post_entry (SAPI.c:954)
==17212==    by 0x6BDEA3F: sapi_register_post_entries (SAPI.c:940)
==17212==    by 0x6BE2AD5: php_setup_sapi_content_types (php_content_types.c:64)
==17212==    by 0x6BDC6E9: sapi_globals_ctor (SAPI.c:66)
==17212==    by 0x6BDC753: sapi_startup (SAPI.c:89)
==17212==    by 0x6D4242E: php_apache_server_startup (sapi_apache2.c:497)
==17212== 
==17212== 64 bytes in 1 blocks are possibly lost in loss record 82 of 136
==17212==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==17212==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==17212==    by 0x6C7361A: zend_string_alloc (zend_string.h:122)
==17212==    by 0x6C736B0: zend_string_init (zend_string.h:158)
==17212==    by 0x6C75C0C: _zend_hash_str_add (zend_hash.c:666)
==17212==    by 0x6BDC590: zend_hash_str_add_mem (zend_hash.h:610)
==17212==    by 0x6BDEAD1: sapi_register_post_entry (SAPI.c:954)
==17212==    by 0x6BDEA3F: sapi_register_post_entries (SAPI.c:940)
==17212==    by 0xA66B9E4: OnUpdate_mbstring_encoding_translation (mbstring.c:1423)
==17212==    by 0x6C86093: zend_register_ini_entries (zend_ini.c:256)
==17212==    by 0xA66BD05: zm_startup_mbstring (mbstring.c:1554)
==17212==    by 0x6C6A66D: zend_startup_module_ex (zend_API.c:1843)
==17212== 
==17212== 288 bytes in 1 blocks are possibly lost in loss record 114 of 136
==17212==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==17212==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==17212==    by 0x6C73E81: zend_hash_real_init_ex (zend_hash.c:138)
==17212==    by 0x6C73FFD: zend_hash_check_init (zend_hash.c:161)
==17212==    by 0x6C755F5: _zend_hash_add_or_update_i (zend_hash.c:551)
==17212==    by 0x6C75C36: _zend_hash_str_add (zend_hash.c:667)
==17212==    by 0x6BDC590: zend_hash_str_add_mem (zend_hash.h:610)
==17212==    by 0x6BDEAD1: sapi_register_post_entry (SAPI.c:954)
==17212==    by 0x6BDEA3F: sapi_register_post_entries (SAPI.c:940)
==17212==    by 0x6BE2AD5: php_setup_sapi_content_types (php_content_types.c:64)
==17212==    by 0x6BDC6E9: sapi_globals_ctor (SAPI.c:66)
==17212==    by 0x6BDC753: sapi_startup (SAPI.c:89)
==17212== 
==17212== 78,144 bytes in 2,016 blocks are definitely lost in loss record 136 of 136
==17212==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==17212==    by 0x6C2EBB7: __zend_malloc (zend_alloc.c:2820)
==17212==    by 0x6B7C730: zend_string_alloc (zend_string.h:122)
==17212==    by 0x6B7C7C6: zend_string_init (zend_string.h:158)
==17212==    by 0x6B845E5: php_mysqlnd_rset_field_read (mysqlnd_wireprotocol.c:1378)
==17212==    by 0x6BA9C69: mysqlnd_mysqlnd_res_meta_read_metadata_pub (mysqlnd_result_meta.c:76)
==17212==    by 0x6B9F0D8: mysqlnd_mysqlnd_res_read_result_metadata_pub (mysqlnd_result.c:385)
==17212==    by 0x6BA0252: mysqlnd_query_read_result_set_header (mysqlnd_result.c:539)
==17212==    by 0x6BB207A: mysqlnd_com_reap_result_run (mysqlnd_commands.c:764)
==17212==    by 0x6B6BBFC: mysqlnd_mysqlnd_conn_data_reap_query_pub (mysqlnd_connection.c:917)
==17212==    by 0x6B6B34F: mysqlnd_mysqlnd_conn_data_query_pub (mysqlnd_connection.c:859)
==17212==    by 0xA3E7B83: zif_mysqli_query (mysqli_nonapi.c:589)
==17212== 
==17212== LEAK SUMMARY:
==17212==    definitely lost: 78,144 bytes in 2,016 blocks
==17212==    indirectly lost: 0 bytes in 0 blocks
==17212==      possibly lost: 464 bytes in 5 blocks
==17212==    still reachable: 213,683 bytes in 498 blocks
==17212==         suppressed: 0 bytes in 0 blocks
==17212== Reachable blocks (those to which a pointer was found) are not shown.
==17212== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==17212== 
==17212== For counts of detected and suppressed errors, rerun with: -v
==17212== ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 0 from 0)
 [2017-01-11 10:57 UTC] spam2 at rhsoft dot net
7.1.1 RC1 some line numbers changed

==28074== 82,976 bytes in 2,124 blocks are definitely lost in loss record 136 of 136
==28074==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==28074==    by 0x6C89E18: __zend_malloc (zend_alloc.c:2820)
==28074==    by 0x6BDABC8: zend_string_alloc (zend_string.h:122)
==28074==    by 0x6BDAC5E: zend_string_init (zend_string.h:158)
==28074==    by 0x6BE2A2C: php_mysqlnd_rset_field_read (mysqlnd_wireprotocol.c:1378)
==28074==    by 0x6C07F07: mysqlnd_mysqlnd_res_meta_read_metadata_pub (mysqlnd_result_meta.c:76)
==28074==    by 0x6BFD3CC: mysqlnd_mysqlnd_res_read_result_metadata_pub (mysqlnd_result.c:385)
==28074==    by 0x6BFE546: mysqlnd_query_read_result_set_header (mysqlnd_result.c:539)
==28074==    by 0x6C1016B: mysqlnd_com_reap_result_run (mysqlnd_commands.c:764)
==28074==    by 0x6BCA0E3: mysqlnd_mysqlnd_conn_data_reap_query_pub (mysqlnd_connection.c:917)
==28074==    by 0x6BC9836: mysqlnd_mysqlnd_conn_data_query_pub (mysqlnd_connection.c:859)
==28074==    by 0xA3C0BE5: zif_mysqli_query (mysqli_nonapi.c:593)
 [2017-01-21 18:28 UTC] spam2 at rhsoft dot net
any news here?

memleaks are really serious because you need to configure the server be it httpd or fpm to more often restart forkers and that has a performance impact up to not even get the machine to 100% CPU because it's busy with fork processes

"MaxRequestsPerChild 100" - 70% CPU
Concurrency Level: 150
Time taken for tests: 31.819 seconds
Complete requests: 100000
Failed requests: 0
Total transferred: 397837794 bytes
HTML transferred: 360737544 bytes
Requests per second: 3142.74 [#/sec] (mean)
Time per request: 47.729 [ms] (mean)
Time per request: 0.318 [ms] (mean, across all concurrent requests)
Transfer rate: 12209.95 [Kbytes/sec] received

"MaxRequestsPerChild 100000" - 90% CPU
Concurrency Level: 150
Time taken for tests: 24.304 seconds
Complete requests: 100000
Failed requests: 0
Total transferred: 397835334 bytes
HTML transferred: 360735110 bytes
Requests per second: 4114.62 [#/sec] (mean)
Time per request: 36.455 [ms] (mean)
Time per request: 0.243 [ms] (mean, across all concurrent requests)
Transfer rate: 15985.74 [Kbytes/sec] received
 [2017-03-03 11:08 UTC] spam2 at rhsoft dot net
frankly this still exists with 7.1.3RC1 and no feedback at all after trying to provide the requested informations is not cool

==28119== 86,312 bytes in 2,201 blocks are definitely lost in loss record 137 of 137
==28119==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==28119==    by 0x6C83555: __zend_malloc (zend_alloc.c:2820)
==28119==    by 0x6BD4244: zend_string_alloc (zend_string.h:122)
==28119==    by 0x6BD42DA: zend_string_init (zend_string.h:158)
==28119==    by 0x6BDC0A8: php_mysqlnd_rset_field_read (mysqlnd_wireprotocol.c:1378)
==28119==    by 0x6C01598: mysqlnd_mysqlnd_res_meta_read_metadata_pub (mysqlnd_result_meta.c:76)
==28119==    by 0x6BF6A5D: mysqlnd_mysqlnd_res_read_result_metadata_pub (mysqlnd_result.c:385)
==28119==    by 0x6BF7BD7: mysqlnd_query_read_result_set_header (mysqlnd_result.c:539)
==28119==    by 0x6C097FC: mysqlnd_com_reap_result_run (mysqlnd_commands.c:764)
==28119==    by 0x6BC375F: mysqlnd_mysqlnd_conn_data_reap_query_pub (mysqlnd_connection.c:917)
==28119==    by 0x6BC2EB2: mysqlnd_mysqlnd_conn_data_query_pub (mysqlnd_connection.c:859)
==28119==    by 0x12BEC857: zif_mysqli_query (mysqli_nonapi.c:593)
 [2017-03-03 11:09 UTC] spam2 at rhsoft dot net
-Package: Unknown/Other Function +Package: MySQLi related -PHP Version: 7.1.0 +PHP Version: 7.1.3
 [2017-03-03 11:09 UTC] spam2 at rhsoft dot net
updated component and version
 [2017-03-09 17:16 UTC] nikic@php.net
-Status: Open +Status: Feedback
 [2017-03-09 17:16 UTC] nikic@php.net
I was not able to determine the source of this leak by just looking at the code. What is leaking here are field names from result metadata, but I was not able to find the codepath where these are not freed. I'm afraid this is not going to move forward without a reproduce case.
 [2017-03-09 19:01 UTC] spam2 at rhsoft dot net
:-( 

it's running the complete testsuite / crwaling of our core-cms originally setup for profile-guided-optimization whichin the rpmbuild-process
 [2017-03-19 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 10:01:25 2019 UTC