PHP 4.0 Bug #8446 Updated: PHP/apache process is in infinite loop or appears to suck CPU

From: Date: Tue, 02 Jan 2001 14:25:12 +0000
Subject: PHP 4.0 Bug #8446 Updated: PHP/apache process is in infinite loop or appears to suck CPU
Groups: php.dev 
Request: Send a blank email to php-dev+get-42573@lists.php.net to get a copy of this message
ID: 8446 Updated by: sniper Reported By: michael@audiogalaxy.com Old-Status: Open Status: Feedback Bug Type: *General Issues Assigned To: Comments: Yes, you should reconfigure/compile php with --enable-debug in configure line. And please add also shortest possible script which causes this infinite loop. --Jani Previous Comments: --------------------------------------------------------------------------- [2000-12-28 14:04:42] michael@audiogalaxy.com Below is the requested information on one of the processes. I am not running php with --enable-debug - is this a problem? Should I go back and recompile everything? Thanks Attaching to program: /usr/sbin/httpd, Pid 28916 0x2ac1ce2b in ?? () (gdb) bt #0 0x2ac1ce2b in ?? () #1 0x2ac1cc94 in ?? () #2 0x80dcf59 in do_foreach_cont (value=0xb4b201c, key=0x2acbe8a0, as_token=0x80eecb8) at zend_compile.c:2095 #3 0x80dd41b in do_extended_fcall_begin () at zend_compile.c:2291 #4 0x807e708 in php_execute_script (primary_file=0x0) at main.c:1150 #5 0x807e6bb in php_execute_script (primary_file=0x81a5920) at main.c:1144 #6 0x807cdb5 in php_info_apache (zend_module=0x81ea024) at php_apache.c:269 #7 0x812556e in usage () #8 0x812b4fb in ap_read_request () #9 0x812e0b2 in ap_rprintf () #10 0x812e6fb in ap_send_error_response () #11 0x812ea78 in ap_send_error_response () #12 0x812efdd in check_safe_file () #13 0x812f607 in directory_walk () #14 0x2abbae21 in ?? () --------------------------------------------------------------------------- [2000-12-28 05:31:37] derick@php.net Rasmus replyed: We cannot possibly track this down for you based on this. You will need to attach gdb to one of these looped processes and see where it is looping. --------------------------------------------------------------------------- [2000-12-27 19:31:40] michael@audiogalaxy.com Below is a report from top for a SMP machine. This happens to all of our webservers every day or so a few machine have one two httpd processes eating CPU. This same problem also happens on the last two or more previous versions of php. A simple kill -9 pid removes it w/o killing the whole webserver. Below are the apache and httpd configuration lines: ./configure --with-mysql --enable-track-vars --with-zlib --with-apache=$apachedir --with-gd=$gddir --with-jpeg-dir=$gddir --with-config-file-path=/common/globalconfig/php --enable-memory-limit ./configure --with-layout=production --activate-module=src/modules/php4/libphp4.a An interesting aspect that is amount of memory each processing using 100% CPU is around 50megs. We have the memory limit set in php as 30M. 1 processes: 85 sleeping, 6 running, 0 zombie, 0 stopped CPU0 states: 70.0% user, 4.0% system, 0.0% nice, 25.0% idle CPU1 states: 53.0% user, 4.0% system, 0.0% nice, 41.0% idle Mem: 1036464K av, 1006188K used, 30276K free, 149244K shrd, 32068K buff Swap: 136512K av, 1124K used, 135388K free 677272K cached PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND 7763 nobody 9 0 53808 52M 2172 R 99.9 5.1 1527m httpd 6825 nobody 0 0 4320 4320 2272 S 9.2 0.4 0:00 httpd 6779 nobody 0 0 4912 4912 2276 S 6.4 0.4 0:00 httpd 6830 root 4 0 1036 1036 812 R 6.4 0.0 0:00 top Thanks for your help - this has been a real nagging problem for us that we keep thinking is resolved in the next version. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8446

« previous php.dev (#42573) next »