Bug #14348 Updated: Major PHP memory corruption? (with testcase)
| From: | php dot net at lyranthe dot org | Date: | Wed, 05 Dec 2001 13:25:30 +0000 |
| Subject: | Bug #14348 Updated: Major PHP memory corruption? (with testcase) | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-72583@lists.php.net to get a copy of this message | ||
ID: 14348
User updated by: php.net@lyranthe.org
Reported By: php.net@lyranthe.org
Status: Open
Bug Type: Apache related
Operating System: Windows XP Professional
PHP Version: 4.0.6
New Comment:
I've just tried that - the same problems occur, unfortunately :-(
Previous Comments:
------------------------------------------------------------------------
[2001-12-05 07:12:58] mfischer@php.net
Just a suggestion: can you try if this also is true for RC3 from http://phpuk.org/~james/php-4.1.0RC3-win32.zip
?
------------------------------------------------------------------------
[2001-12-05 06:57:05] php.net@lyranthe.org
Right. This is basically bug 14222 in another guise - I can't see how to add comments to that
bug.
In bug #14222 it shows the type of corruption I've *sometimes* had reports of seeing with
Apache 1.3.20-1.3.22, PHP 4.0.6 on both NT4SP6 and W2KSP2. Mainly corruption like what was linked to
in
http://tugs.imp.ch/index.html.2
but sometimes like this:
http://tugs.imp.ch/index.html.3
And then yesterday I upgraded to Windows XP, and initially I was getting corruption in parts of a
large PHP page. I rebooted, and started getting (for the first time) the symptom where the page
would just keep reloading and reloading and reloading.
I have a testcase now which causes the problem most of the time on IE6 and IE5.5 - continual
reloading - since the page of this testcase is made up of HTML comments, I can see various numbers
of the point at which HTML loading failed before restarting - e.g.
<!-- test 1383 -
shown on screen. The bigger the value of count passed to the page, the more likely it is that this
will happen. For me, it happens the majority of the time for count > 5000. It never happens for
low counts.
The script:
<html>
<body>
<?
for ($i = 1; $i < $count; $i++) {
print ("<!-- test $i -->\n");
}
print "Finished\n";
?>
</body>
</html>
On Mozilla (recent nightly build), it behaves differently - the page cuts off at a random point (you
can see this by doing View Source), but does not continually reload.
Intrigued by the difference, I did a wget of the script to see what was actually coming from the
webserver. I got the result of test.php?count=500000
It got to iteration 1547, then it went
<!-[^@]p*[<81><E8>]XT[<80>^@^@^@^@]test[^@<90>^^<81>] -->
and then restarted the count at iteration 214!
(note: the square brackets delimit the reversed colour characters in the 'less' filereader
- showing null characters and high-eighth-bit characters)
It continued up along until iteration 439, then went
<!- --->
and jumped to iteration 1764.
Then at iteration 2409, it printed
<!-- test[^@<F0>]c[<81><E8>]XT<80>^@^@^@^@]--
t[^@<80>]D[<81>]895 -->
and continued on from iteration 896...
etc.
Then we get to 3056, and it goes
<!--[^@]0m[<81><E8>]XT[<80>^@^@^@^@] OK[^M^@^P]}[<81>]e: Wed, 05 Dec 2001
11:26:29 GMT
Server: Apache/1.3.20 (Win32) PHP/4.0.6
etc.
and just started right from the beginning again. It only restarted once in that run, but my
experience with IE suggests that it generally happens more often.
I don't have a Windows debugger, so think I've given nearly as much information as I can.
It would be nice if somebody could run the test on 4.0.6, and test on the most recent RC of 4.1.0?
(note that while this is extremely reproducible with XP, minor non-reproducible corruption would
often occur with the other NT systems).
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14348&edit=1