Bug #18564 Updated: PHP 4.2.1+ hangs on certain pages
| From: | alan_k@php.net | Date: | Fri, 26 Jul 2002 09:39:05 +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-15318@lists.php.net to get a copy of this message | ||
ID: 18564
Updated by: alan_k@php.net
Reported By: james@stealthnet.co.uk
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: FreeBSD 4.5
PHP Version: 4.2.2
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-07-26 05:36:01] james@stealthnet.co.uk
And now the script, that is separate to the main site that hangs,
doesn't want to segfault and instead works perfectly... For now.
To see free4phones.com hang, visit free4phones.com/home.php and hope
it's not working at the time. Apache loads mod_php4 as php was compiled
--with-apxs=/path/to/apxs.
These are some of the log messages we're getting whilst it's down:
66.185.84.74 - - [26/Jul/2002:00:04:25 +0000] "GET / HTTP/1.1" 200 5
"-" "Mozill
a/4.0 (compatible; MSIE 6.0; Windows 98)"
209.94.217.29 - - [26/Jul/2002:00:04:37 +0000] "GET / HTTP/1.1" 200 5
"-" "Mozil
la/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)"
67.27.151.184 - - [26/Jul/2002:00:05:21 +0000] "GET / HTTP/1.1" 200 5
"-" "Mozil
la/4.0 (compatible; MSIE 6.0; Windows 98)"
12.2.142.7 - - [26/Jul/2002:00:05:59 +0000] "GET / HTTP/1.1" 200 5 "-"
"Mozilla/
4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
216.160.234.138 - - [26/Jul/2002:00:06:59 +0000] "GET / HTTP/1.1" 200 5
"-" "Moz
illa/4.0 (compatible; MSIE 6.0; Windows 98)"
The / homepage redirects to a more suitable page (home.php) once a
country selection has been made:
r2b% grep -c home.php f4p-access.log
3
Hardly anyone has managed to get there.
------------------------------------------------------------------------
[2002-07-26 05:25:56] james@stealthnet.co.uk
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
------------------------------------------------------------------------
[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