php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14348 Major PHP memory corruption? (with testcase)
Submitted: 2001-12-05 06:57 UTC Modified: 2002-06-18 19:02 UTC
Votes:10
Avg. Score:5.0 ± 0.0
Reproduced:9 of 9 (100.0%)
Same Version:5 (55.6%)
Same OS:9 (100.0%)
From: php dot net at lyranthe dot org Assigned:
Status: Closed Package: Apache related
PHP Version: 4.0.6 OS: Windows XP Professional
Private report: No CVE-ID: None
 [2001-12-05 06:57 UTC] php dot net at lyranthe dot 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).

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-05 07:12 UTC] 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 08:25 UTC] php dot net at lyranthe dot org
I've just tried that - the same problems occur, unfortunately :-(
 [2002-04-17 04:07 UTC] cchristf at yahoo dot fr
I have got same probleme with Apache/1.3.22 (Win32) PHP/4.1.1  (AppServ 1.5 package) when asking "big" pages like PhpNuke or OsCommerce
 [2002-04-18 09:25 UTC] sniper@php.net
Please try PHP 4.2.0RC4 from http://www.php.net/~derick/

 [2002-04-20 22:31 UTC] andrew at edmundson dot com
Im using winxp with php 4.2 rc4 and apache 2.0.35 and im getting the same problem, tried the flush command in the ini but no joy, does no one know how to fix this, its a nightmare, mine mainly does the reloading over and over in IE presumably because its receiving corrupted data so reloads
 [2002-05-21 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2002-06-18 19:02 UTC] sniper@php.net
Please try Apache 1.3.24 and PHP 4.2.1.
Reopen if problem still exists with those.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 07 11:01:27 2024 UTC