Bug #18564 Updated: PHP 4.2.1+ hangs on certain pages

From: Date: Fri, 26 Jul 2002 09:25:57 +0000
Subject: Bug #18564 Updated: PHP 4.2.1+ hangs on certain pages
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-15314@lists.php.net to get a copy of this message
ID: 18564 Updated by: james@stealthnet.co.uk Reported By: james@stealthnet.co.uk Status: Open Bug Type: Reproducible crash Operating System: FreeBSD 4.5 PHP Version: 4.2.2 New Comment: With the site hung: 9:19AM up 2 days, 11:55, 1 user, load averages: 2.08, 1.99, 1.70 With the site showing a plain html page for maintenance: 9:24AM up 2 days, 12 hrs, 1 user, load averages: 0.01, 0.69, 1.17 Previous Comments: ------------------------------------------------------------------------ [2002-07-26 05:23:48] james@stealthnet.co.uk Trying to reproduce this but it is very random. FWIW, the site (free4phones.com) is currently down due to the hanging, and a ps ax shows the following: 8260 ?? Ss 0:10.06 /usr/local/sbin/httpd 8262 ?? I 22:11.14 /usr/local/sbin/httpd 8265 ?? I 1:51.65 /usr/local/sbin/httpd 8267 ?? I 43:36.37 /usr/local/sbin/httpd 8269 ?? I 1:33.23 /usr/local/sbin/httpd 8273 ?? I 8:22.31 /usr/local/sbin/httpd 8294 ?? I 1:32.05 /usr/local/sbin/httpd 8342 ?? I 0:26.78 /usr/local/sbin/httpd 8460 ?? I 5:23.44 /usr/local/sbin/httpd 8470 ?? I 5:38.83 /usr/local/sbin/httpd 8494 ?? I 1:57.36 /usr/local/sbin/httpd 8525 ?? I 0:58.25 /usr/local/sbin/httpd 8539 ?? I 6:53.54 /usr/local/sbin/httpd 8740 ?? I 1:31.74 /usr/local/sbin/httpd 8839 ?? I 3:34.29 /usr/local/sbin/httpd 9012 ?? I 23:09.84 /usr/local/sbin/httpd 9083 ?? I 2:21.43 /usr/local/sbin/httpd 9240 ?? I 1:23.04 /usr/local/sbin/httpd 9295 ?? I 1:43.14 /usr/local/sbin/httpd 9310 ?? I 0:31.92 /usr/local/sbin/httpd 9349 ?? I 1:30.91 /usr/local/sbin/httpd 9400 ?? I 1:33.04 /usr/local/sbin/httpd 9520 ?? I 2:54.29 /usr/local/sbin/httpd 9684 ?? I 24:10.87 /usr/local/sbin/httpd 11194 ?? I 1:00.40 /usr/local/sbin/httpd 11195 ?? I 10:04.76 /usr/local/sbin/httpd 11235 ?? I 14:39.19 /usr/local/sbin/httpd 11450 ?? I 0:46.55 /usr/local/sbin/httpd 11454 ?? I 0:54.18 /usr/local/sbin/httpd 11536 ?? I 0:57.52 /usr/local/sbin/httpd 11537 ?? I 0:57.79 /usr/local/sbin/httpd 11553 ?? I 1:04.38 /usr/local/sbin/httpd 11879 ?? I 1:47.63 /usr/local/sbin/httpd 11983 ?? I 4:41.52 /usr/local/sbin/httpd 12183 ?? S 19:23.89 /usr/local/sbin/httpd 12245 ?? I 4:14.40 /usr/local/sbin/httpd 12287 ?? I 7:44.76 /usr/local/sbin/httpd 12323 ?? I 13:32.37 /usr/local/sbin/httpd 12395 ?? I 0:49.69 /usr/local/sbin/httpd 12426 ?? I 6:46.30 /usr/local/sbin/httpd 12883 ?? I 0:31.24 /usr/local/sbin/httpd 12919 ?? I 4:19.26 /usr/local/sbin/httpd 12927 ?? I 2:03.11 /usr/local/sbin/httpd 12985 ?? I 0:59.90 /usr/local/sbin/httpd 13184 ?? I 2:11.55 /usr/local/sbin/httpd 13364 ?? S 2:25.69 /usr/local/sbin/httpd 13431 ?? Ss 0:00.42 sshd: jmkg@ttyp0 (sshd) 13484 ?? S 0:20.71 /usr/local/sbin/httpd 13485 ?? S 0:17.73 /usr/local/sbin/httpd 13487 ?? S 0:20.49 /usr/local/sbin/httpd 13488 ?? S 0:14.93 /usr/local/sbin/httpd 13491 ?? S 0:16.97 /usr/local/sbin/httpd 13492 ?? S 0:06.63 /usr/local/sbin/httpd 13499 ?? S 0:10.34 /usr/local/sbin/httpd 13502 ?? S 0:10.06 /usr/local/sbin/httpd 13522 ?? S 0:00.09 /usr/local/sbin/httpd 13523 ?? S 0:00.01 /usr/local/sbin/httpd 13524 ?? S 0:00.01 /usr/local/sbin/httpd 13525 ?? S 0:00.16 /usr/local/sbin/httpd 13526 ?? S 0:00.01 /usr/local/sbin/httpd 13527 ?? S 0:00.14 /usr/local/sbin/httpd 13528 ?? S 0:00.09 /usr/local/sbin/httpd 13529 ?? S 0:00.11 /usr/local/sbin/httpd 13533 ?? S 0:00.08 /usr/local/sbin/httpd 13534 ?? S 0:00.01 /usr/local/sbin/httpd 13535 ?? S 0:00.00 /usr/local/sbin/httpd 13536 ?? S 0:00.01 /usr/local/sbin/httpd 13537 ?? S 0:00.00 /usr/local/sbin/httpd 13538 ?? S 0:00.00 /usr/local/sbin/httpd 13540 ?? S 0:00.00 /usr/local/sbin/httpd 13543 ?? S 0:00.00 /usr/local/sbin/httpd This was after a graceful restart. Other sites on the same server doing light traffic. I've had to install a maintenance page on the free4phones.com site (a small html file) to prevent php kicking in and hanging mysqld and httpd. Bear with me whilst I attempt to get useful info. ------------------------------------------------------------------------ [2002-07-26 01:56:59] rverlander@php.net What were the segfault errors? ------------------------------------------------------------------------ [2002-07-25 08:30:03] james@stealthnet.co.uk I believe that after several hours of head-scratching I've located a problem that causes one entire website to stop loading (all pages), and one additional unrelated script to experience the same problem. Here goes... We were informed that one of our domains had stopped responding. We checked, and we were getting zero bytes returned to the browser. Sometimes even Apache's error/access logs were failing to log our accesses. Other sites on the same server were working fine. Then a few hours later, without any intervention from us, we discovered that the site was back up. Then a few days later, it was back down again. We checked the server, and we had several httpds that were busy but hung. The load on the machine is usually 0.00 (very light), but now it was close to 2.00, most of which was down to mysqld for some reason. We ran a thorough check over the databases and found no problems. Several head-scratching hours later of watching the site go down, come up, etc., we recompiled the whole lot and rebooted. Still no change. And then we discovered today about the unrelated web page that was also hanging. So I took down apache, let the load drop to 0.25, then ran php -f <the script that hangs> and indeed it was hanging still. Then PHP spewed out numerous recursive calls to free() and then segfaulted. I repeated the the cgi test on a dev box, and it worked. I found out that the cgi on the production box that didn't work was 4.2.1, the dev box's was 4.2.0. So I installed 4.2.0 as an apache module on our dev box, and indeed the full site came back up. I'm therefore of the belief that PHP 4.2.1+ is sometimes hanging on pages accessing a MySQL database. I've spoken to someone else, who's telling me he's had the same problem, but on a Linux server whereas his FreeBSD box was fine with it. He's had to downgrade PHP to 4.1.2. I shall follow this report up with a link to the script as a .phps, and hopefully the database it's supposed to work on (it outputs the database in XML) once I get clearance. The unrelated entire site also works on a mysql database on every page view, however it uses a different database. All very bizarre, but they all worked perfectly prior to installing 4.2.1+. Hope to follow this up in a few hours with more details and testcase. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18564&edit=1

« previous php.bugs (#15314) next »