|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-10-03 07:34 UTC] hugo at leisink dot net
Description: ------------ If PHP is started as a FastCGI server, it crashes when a large amount of request are being send. I used /usr/sbin/ab -n 10000 -c 10 <URL> to stresstest it. It crashes after about 3000 requests. Reproduce code: --------------- Start PHP as a FastCGI server. Configure a FastCGI-enabled webserver. Use /usr/sbin/ab -n 10000 -c 10 <URL> to stress-test it. PHP will crash after a few thousand requests. Expected result: ---------------- No crash.... Actual result: -------------- Valgrind output: ==13767== Memcheck, a memory error detector for x86-linux. ==13767== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. ==13767== Using valgrind-2.4.0, a program supervision framework for x86-linux. ==13767== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. ==13767== For more details, rerun with: -v ==13767== ==13767== ==13767== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 100 from 3) ==13767== malloc/free: in use at exit: 19166 bytes in 1225 blocks. ==13767== malloc/free: 898027 allocs, 896802 frees, 340213828 bytes allocated. ==13767== For counts of detected errors, rerun with: -v ==13767== searching for pointers to 1225 not-freed blocks. ==13767== checked 1415844 bytes. ==13767== ==13767== 4 bytes in 1 blocks are definitely lost in loss record 1 of 7 ==13767== at 0x1B90459D: malloc (vg_replace_malloc.c:130) ==13767== by 0x1B8E9346: (within /lib/ld-2.3.2.so) ==13767== by 0x1B8EA5A5: _dl_map_object (in /lib/ld-2.3.2.so) ==13767== by 0x1B8EEB08: (within /lib/ld-2.3.2.so) ==13767== by 0x1B8F0015: _dl_catch_error (in /lib/ld-2.3.2.so) ==13767== by 0x1B8EF580: _dl_map_object_deps (in /lib/ld-2.3.2.so) ==13767== by 0x1BF61EDF: (within /lib/libc-2.3.2.so) ==13767== by 0x1B8F0015: _dl_catch_error (in /lib/ld-2.3.2.so) ==13767== by 0x1BF62675: _dl_open (in /lib/libc-2.3.2.so) ==13767== by 0x1BF639B2: (within /lib/libc-2.3.2.so) ==13767== by 0x1B8F0015: _dl_catch_error (in /lib/ld-2.3.2.so) ==13767== by 0x1BF6396D: (within /lib/libc-2.3.2.so) ==13767== ==13767== ==13767== 54 bytes in 2 blocks are definitely lost in loss record 4 of 7 ==13767== at 0x1B90459D: malloc (vg_replace_malloc.c:130) ==13767== by 0x1C388F81: ??? ==13767== by 0x1C388E4A: ??? ==13767== by 0x1C35AFC1: ??? ==13767== by 0x1C352128: ??? ==13767== by 0x1C2F4995: ??? ==13767== by 0x1C2F4B0A: ??? ==13767== by 0x1C2F349E: ??? ==13767== by 0x1C2F3729: ??? ==13767== by 0x1BF472A3: getprotobyname_r (in /lib/libc-2.3.2.so) ==13767== by 0x1BF4714E: getprotobyname (in /lib/libc-2.3.2.so) ==13767== by 0x81C1E2D: zm_startup_sockets (in /usr/bin/php5-cgi) ==13767== ==13767== LEAK SUMMARY: ==13767== definitely lost: 58 bytes in 3 blocks. ==13767== possibly lost: 0 bytes in 0 blocks. ==13767== still reachable: 19108 bytes in 1222 blocks. ==13767== suppressed: 0 bytes in 0 blocks. ==13767== Reachable blocks (those to which a pointer was found) are not shown. ==13767== To see them, rerun with: --show-reachable=yes PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 20 19:00:01 2025 UTC |
#0 0x4028daff in memcpy () from /lib/libc.so.6 #1 0x082343d9 in zend_strndup (s=0xe485454 <Address 0xe485454 out of bounds>, length=3221225471) at /usr/src/php/php5.2-200610030830/Zend/zend_alloc.c:1779 #2 0x082adaa3 in fcgi_get_params (req=0xe485454, p=0xbffedc20 "P_COOKIEpma_collation_connection=utf8_unicode_ci; pma_lang=en-iso-8859-1; pma_charset=iso-8859-1; pma_cookie_username-1=wckGFw8uHyROd%2Bz3D6DaiQ%3D%3D", end=0xbffedcb6 "") at /usr/src/php/php5.2-200610030830/sapi/cgi/fastcgi.c:422 #3 0x082ae092 in fcgi_read_request (req=0xbfffdc20) at /usr/src/php/php5.2-200610030830/sapi/cgi/fastcgi.c:506 #4 0x082ae673 in fcgi_accept_request (req=0xbfffdc20) at /usr/src/php/php5.2-200610030830/sapi/cgi/fastcgi.c:703 #5 0x082b042b in main (argc=3, argv=0xbffffd24) at /usr/src/php/php5.2-200610030830/sapi/cgi/cgi_main.c:1361