Closed Bug 195746 Opened 21 years ago Closed 21 years ago

Corrupt cache / HTTP networking - Wrong images, incomplete pages, octet-stream download dialog

Categories

(Core :: Networking: Cache, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.4alpha

People

(Reporter: wd, Assigned: darin.moz)

References

()

Details

(Keywords: topembed+, Whiteboard: [pipelining])

Attachments

(4 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4a) Gecko/20030303
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4a) Gecko/20030303

When going a search on Google, I often get rather than the complete Google
search page, just a single image from the page that is supposed to come up.

Reproducible: Sometimes

Steps to Reproduce:
1.Go to
http://http://groups.google.com/groups?q=PCI+Delay+Transaction&hl=en&lr=&ie=UTF-8&safe=off&selm=ynzw5.2080%24At6.84196%40nnrp1.sbc.net&rnum=2
2.Keep doing a Shift-Reload
3.

Actual Results:  
Sometimes just a single image, sometimes an octet-stream download dialog, and
sometimes a page, but with images within the page switched.

Expected Results:  
Page loads up fine

Disabling HTTP Pipelining has no effect on the problem.
If I go to the Page Info screen of any of the resulting pages, it says the
source is Disk Cache, even though I'm using Shift-Reload
Attached image Page Load #1 —
Attached image Page Re-Load —
Using Build 2003030208 and Windows XP, I saw similar problems with
www.mozdev.org. The problems were gone after I disabled HTTP Pipelining.

Now I reenabled HTTP Pipelining again, cleared the cache before I did so and
can´t reproduce this bug anymore.

I´m going to remove the "with google.com" part from the bug summary because this
happens with www.mozdev.org and probably other sites too.
Summary: Corrupt cache / HTTP networking with google.com - Wrong images, incomplete pages, octet-stream download dialog → Corrupt cache / HTTP networking - Wrong images, incomplete pages, octet-stream download dialog
I see a similar behaviour on 1.3b / Linux / ia32.  My home page almost always
looks weird in different ways, all related to image placement:

  http://www.student.nada.kth.se/~d92-jwa/

Each time I reload it (by holding down SHIFT and clicking the reload button in
the toolbar) I get different behaviour.
Flags: blocking1.3?
OS: Windows 2000 → All
possible dupe of bug 194934?
cc'ing darin because of possible http pipelining interaction.
Flags: blocking1.3? → blocking1.3-
I've disabled HTTP Pipelining and the problem hasn't happened for days.
As soon as I've re-enabled it, it's back again.    Looks like it's definately
pipeline-related.

If this is bug 194934 , then the summary of that bug should definately be updated.
-> me (been accumulating related bugs... will take care of duping)
Assignee: gordon → darin
Priority: -- → P2
Whiteboard: [pipelining]
Target Milestone: --- → mozilla1.4alpha
*** Bug 197595 has been marked as a duplicate of this bug. ***
I just like to point out pipelining works fine in 1.2.1.   Ever since I upgrade
to version 1.3b&1.3, this problem pops up a lot.  I tested my other comp system
and confirm this.
yeah :(  this is something i will do my best to fix for 1.4 alpha!
Status: NEW → ASSIGNED
Flags: blocking1.4a?
Attached patch v1 patch — — Splinter Review
fairly simple patch.  we weren't propogating errors to the nsHttpConnection
instance properly.  this patch overlaps some with my patch for bug 159015.
Attachment #117646 - Flags: review?(dougt)
*** Bug 194934 has been marked as a duplicate of this bug. ***
Setting Hardware=All per comment 15.
Hardware: PC → All
Attachment #117646 - Flags: review?(dougt) → review+
Attachment #117646 - Flags: superreview?(bzbarsky)
*** Bug 196099 has been marked as a duplicate of this bug. ***
Comment on attachment 117646 [details] [diff] [review]
v1 patch

So is the only point of mClosed in nsHttpTransaction that it prevents calling
into Close() multiple times?  If so, could you please comment that in the class
def?  mClosed and mTransactionDone are a little confusing as things stand....

Also, do you want to log the error returns on closed status in nsHttpPipeline? 
(this is not a real review comment, obviously, just a question)
Attachment #117646 - Flags: superreview?(bzbarsky) → superreview+
bz:

yeah, mClosed is meant to prevent multiple calls to Close as well as calls to
Read/Write after Close has been called.  mTransactionDone has slightly different
meaning... i will document this better.  basically, there are these three flags:

  mClosed            -  transaction has been closed
  mTransactionDone   -  transaction ran to completion or was interrupted
  mResponseComplete  -  transaction ran to completion

it could happen that mTransactionDone is set before the transaction is closed,
and closing a transaction (the connection does this) could indicate EOF _or_ an
interrupted stream (depending on how the transaction is determining EOF).

as for adding more logging to nsHttpPipeline.. i don't think it would really
help any.  probably the existing logging |if (mClosed)| is not necessary either.

thanks for the review!
datapoint: I've been seeing this for quite awhile w/ winxp, trunk, mozilla
builds w/ pipelining on when doing "image" searches (use the "image" tab at
google) at google. clicking on one of the resulting images shows a different images.
Keywords: topembed+
*** Bug 198933 has been marked as a duplicate of this bug. ***
jud: yup, images.google.com has been my main testcase.  for some reason, this
problem is especially easy to repro there.
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
*** Bug 199114 has been marked as a duplicate of this bug. ***
Flags: blocking1.4a?
Note that this may not be entirely fixed. I downloaded FizzillaMach/2003032609,
re-enabled HTTP Pipelining, and accessed
<http://www.orangemicro.com/fw800pci.html>. I saw some wrong images, even after
force-reloading.
> mClosed is meant to prevent multiple calls to Close as well as calls to
> Read/Write after Close has been called.  

Then shouldn't nsHttpTransaction check the mClosed state in 
ReadSegments/WriteSegments?
bz: nsHttpTransaction checks mTransactionDone, which in that context should be
equivalent to checking mClosed.  NOTE: the nsHttpTransaction actually needs to
fail on WriteSegments (w/ NS_BASE_STREAM_CLOSED) before Closed() is called
because that is how the connection learns that the transaction doesn't want any
more data.
Something is definitely still wrong. Using FizzillaMach/2003032808 with
pipelining enabled, access the URL in my comment 25. Repeatedly force-reload the
URL and eventually you'll see either a wrong image load or the load will simply
hang and never complete.

Reopen this or new bug?
greg: i see the same problem on that site.  however, i think in that case it
might be a server problem.  many servers claim to support pipelining but do not.
 this may very well be one of those servers.  a new bug would be best.  thx!
*** Bug 193228 has been marked as a duplicate of this bug. ***
Filed as bug 199675 per comment 29.
> bz: nsHttpTransaction checks mTransactionDone, which in that context should be
> equivalent to checking mClosed.

Document this?  ;)
*** Bug 199389 has been marked as a duplicate of this bug. ***
*** Bug 192546 has been marked as a duplicate of this bug. ***
*** Bug 198156 has been marked as a duplicate of this bug. ***
*** Bug 140530 has been marked as a duplicate of this bug. ***
*** Bug 200698 has been marked as a duplicate of this bug. ***
Running: Moz 1.4a (NT4)

Sometimes, visiting a new URL results in a new page that simply displays a zero:

0

This is inconsistent with the page source; the page will render correctly when I
reload. This appears to be the leading zero that I mentioned in bug 200698,
minus the http header bleed.  Pipelining is off.
Anthon, please file that as a new bug.
Greg - Anthon already filed it as a bug. it was marked as a duplicate of this
bug, so he commented here. that bug has now been reopened based on the comment.

(Anthon - future comments should, of course, go into bug 200698)
*** Bug 201052 has been marked as a duplicate of this bug. ***
*** Bug 199546 has been marked as a duplicate of this bug. ***
*** Bug 194642 has been marked as a duplicate of this bug. ***
*** Bug 133734 has been marked as a duplicate of this bug. ***
*** Bug 202210 has been marked as a duplicate of this bug. ***
landed patch on 1.3 branch per request from asa.
The patch to the 1.3 branch seems to fix Mozilla proper.  However, galeon-1.3.3
linked against the same Mozilla 1.3 libraries still exhibits the problem.  While
it shouldn't be required, I even rebuilt Galeon after applying the patch and
rebuilding Mozilla.  Any idea why I might still see this problem?  Note, Galeon
linked against 1.4a does not exhibit this problem.
Joe: nope, i have no idea... sorry! :(
*** Bug 204524 has been marked as a duplicate of this bug. ***
*** Bug 202091 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: