failure message from server results in cached page with the first few bytes overwritten by the failure message

Bug #382444 reported by Zooko Wilcox-O'Hearn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Invalid
Medium
Tahoe-LAFS
Invalid
Undecided
Unassigned
firefox-3.5 (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Binary package hint: mozilla-firefox

Extensive debugging details are here: http://allmydata.org/trac/tahoe/ticket/698 # corrupted file displayed to user after failure to download followed by retry

It appears that when Firefox 3.5b4 requests a page, if it gets a 200 success with an indicated length of 588,738 bytes, but then the server sends only 2302 bytes and then closes the connection, then Firefox 3.5b4 retrieves the most recent version of this page from its cache, then *overwrites* the first 2302 (or 2304) bytes of it with the new data from the server, and then displays the resulting corrupted file to the user!

Revision history for this message
John Vivirito (gnomefreak) wrote :

Tahoe Tracker doesnt help us and the ticket was closed anyway.

Changed in allmydata.org:
importance: Unknown → Undecided
status: Unknown → New
status: New → Invalid
Revision history for this message
John Vivirito (gnomefreak) wrote :

Can you please paste the output of the following commands:
apt-cache policy firefox-3.5
lsb_release -a

can you please list detailed steps to reproduce this bug including any links.

affects: firefox (Ubuntu) → firefox-3.5 (Ubuntu)
Changed in firefox-3.5 (Ubuntu):
status: New → Incomplete
Revision history for this message
John Vivirito (gnomefreak) wrote :

Are you able to reproduce this in firefox-3.0?
Can you please file this bug on Mozillas bug tracker and drop the link here

Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :

I don't have a reliable way to reproduce this. It has happened a few times -- about half a dozen times -- with firefox 3.5b4 and never yet with firefox-3.0.

MAIN yukyuk:~$ apt-cache policy firefox-3.5
firefox-3.5:
  Installed: 3.5~b4~hg20090330r24021+nobinonly-0ubuntu1
  Candidate: 3.5~b4~hg20090330r24021+nobinonly-0ubuntu1
  Version table:
 *** 3.5~b4~hg20090330r24021+nobinonly-0ubuntu1 0
        500 http://us.archive.ubuntu.com jaunty/universe Packages
        100 /var/lib/dpkg/status
MAIN yukyuk:~$ lsb_release -a
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 9.04
Release: 9.04
Codename: jaunty

I will submit a bug report on the mozilla bugzilla when I get around to it.

Thanks!

Oh, I think my diagnosis -- that firefox received a 200 success and a Content-Length and then a short read followed by connection close -- might be wrong. I don't know that for sure. I would have to think about it more.

summary: - short read from server results in cached page with the first few bytes
- overwritten by the short read result
+ failure message from server results in cached page with the first few
+ bytes overwritten by the failure message
Revision history for this message
In , Zooko Wilcox-O'Hearn (zooko) wrote :
Download full text (12.3 KiB)

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b4pre) Gecko/20090401 Ubuntu/9.04 (jaunty) Shiretoko/3.5b4pre
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b4pre) Gecko/20090401 Ubuntu/9.04 (jaunty) Shiretoko/3.5b4pre

Folks:

Thank you for Mozilla Firefox! A flagship project of openness and freedom. Also, it doesn't suck! Way to go.

Occasionally a server of mine serves up an error message of about 2302 bytes in length instead of serving up the 500 KB file. When it does, Firefox-3.5b4 shows me a copy of the file itself (presumably pulled from the cache, since it didn't come from my server) with the first 2302 or so bytes of the file overwritten by the error message. The resulting corrupted file doesn't even parse according to HTML, of course.

At first I thought that this was a bug in my server, so I opened a ticket on my issue tracker: http://allmydata.org/trac/tahoe/ticket/698 . In that ticket I attached some examples of the resulting corrupted file (the one with the original text pulled from cache but then overwritten by the error message). Eventually I concluded that my server wasn't really at fault (it might be giving a crummy error message, but it is still firefox's job to display the crummy error message instead of a mashup of the original file plus the crummy error message!).

I've also reported this on launchpad against the Ubuntu package of Firefox-3.5b4 in Ubuntu Jaunty:

https://bugs.launchpad.net/ubuntu/+source/firefox-3.5/+bug/382444

Thanks!

Regards,

Zooko

Reproducible: Sometimes

Steps to Reproduce:
1. Install the Tahoe server and get it to fail in this way. :-(
2. Point ff-3.5b4 at it, hit reload.
3. Observe interesting mashup of cached content and error message visible in your browser window.

If you don't want to go through all of these steps, please observe the resulting "interesting mashup": http://allmydata.org/trac/tahoe/attachment/ticket/698/wiki.html.bz2 . I've pasted the first 4000 bytes of the actual result and expected result below. I've also pasted into "Additional Information" the first 4000 bytes of the original file -- the one that the server failed to serve up and which must have been pulled from ff's cache.
Actual Results:
<html><head><title>Exception</title></head><body><style type="text/css">
p.error {
  color: black;
  font-family: Verdana, Arial, helvetica, sans-serif;
  font-weight: bold;
  font-size: large;
  margin: 0.25em;
}

div {
  font-family: Verdana, Arial, helvetica, sans-serif;
}

strong.variableClass {
  font-size: small;
}

div.stackTrace {
}

div.frame {
  padding: 0.25em;
  background: white;
  border-bottom: thin black dotted;
}

div.firstFrame {
  padding: 0.25em;
  background: white;
  border-top: thin black dotted;
  border-bottom: thin black dotted;
}

div.location {
    font-size: small;
}

div.snippet {
  background: #FFFFDD;
  padding: 0.25em;
}

div.snippetHighlightLine {
  color: red;
}

span.lineno {
    font-size: small;
}

pre.code {
  margin: 0px;
  padding: 0px;
  display: inline;
  font-size: small;
  font-family: "Courier New", courier, monotype;
}

span.function {
  font-weight: bold;
  font-family: "Courier New", c...

Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :

Here's the ticket on bugzilla.mozilla.org:

https://bugzilla.mozilla.org/show_bug.cgi?id=496205

Changed in firefox:
status: Unknown → New
Changed in firefox:
importance: Unknown → Medium
Changed in firefox:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.