Bug #18564: PHP 4.2.1+ hangs on certain pages
| From: | james at stealthnet dot co dot uk | Date: | Thu, 25 Jul 2002 12:30:04 +0000 |
| Subject: | Bug #18564: PHP 4.2.1+ hangs on certain pages | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-15182@lists.php.net to get a copy of this message | ||
From: james@stealthnet.co.uk
Operating system: FreeBSD 4.5
PHP version: 4.2.2
PHP Bug Type: Reproducible crash
Bug description: PHP 4.2.1+ hangs on certain pages
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 bug report at http://bugs.php.net/?id=18564&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18564&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18564&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18564&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18564&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18564&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18564&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18564&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18564&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18564&r=globals