Closed Bug 66019 Opened 24 years ago Closed 23 years ago

Downloading URL above comes from cache but is incomplete

Categories

(Core :: Networking: Cache, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla0.9.1

People

(Reporter: jesup, Assigned: gordon)

References

()

Details

FreeBSD 4.1 20010118xx I was downloading the above URL (26MB) and hit an assertion (before selecting a destination). after some debugging, I continued, and selected a destination. I never saw a "downloading" requester (completion indication). I went away for a while, and when I came back a 17MB file was there. Obviously it was truncated. So I deleted it and clicked on the link again. No downloading requester was shown, and the 17MB file reappeared immediately (and never grew). I assume the file is cached, and that the original download timed out or errored out in some way, and the download isn't being either continued when it's selected, or it's not being flushed because it was incomplete.
Interesting. What was your disk cache size set to?
5MB (default) (3MB ram cache) Clearing both memory and disk caches made the problem go away, indicating that it is a cache problem.
Well, maybe. The question is what does the 17 meg file have to do with the cache. If the file was trying to get loaded into a 5 meg disk cache, it should have failed long before reaching 17 meg. Are you saying you can successfully download the 26 meg file now? Or can you reproduce the partial 17 meg download?
After clearing the caches, I had no problem downloading the 27MB file. I'm sure the cache is involved, since before clearing it, requesting a download would cause a 17MB file to appear basically instantly. I assume mozilla was caching the download as it occured the first time, and when it failed (for some reason) the cache entry wasn't marked as partial (or dumped, whatever's appropriate).
Darin, this looks like an HTTP download. Can you provide some information on how HTTP uses the cache for downloads, and how it recovers (or not) from errors? It's possible the cache entry got corrupted somehow.
HTTP does not distinguish downloads from regular GETs w.r.t. how it uses the cache. This may change in the future. As far as error recovery is concerned, HTTP does very little. This will change.
I think the TRUNCATED_CONTENT flag is not being set, when the download is incomplete. If this flag is set, it causes the data in the cache as invalid and issues a new request.
neeti: sounds correct to me... can you generate a patch?
To generate a patch, I would have to reproduce the bug(I am having a hard time doing this). I am able to succesfully download the above 28.7 MB file succesfully. I think, when we are having the incomplete downloads, we are either not hitting the OnStopRequest() in InterceptStreamListener, or we are hitting it, aStatus has a successful value of 0 ( This is the place where the TRUNCATED_CONTENT flag is set) Randell, Are you able to load this page partially all the time? Thanks, Neeti
No. It gave me 17MB once, from then on it gave me 17MB until I cleared the caches, and since then I haven't had a problem. I suggest disconnecting your ethernet during the download until it times out. I don't know for certain what caused it to be 17MB the first time. I _assume_ it was a network problem, but it could have been a server bug or a mozilla bug.
Cache bugs to Gordon
Assignee: neeti → gordon
Target Milestone: --- → mozilla0.9
Target Milestone: mozilla0.9 → mozilla0.9.1
I believe this was a bug in the old cache code which we are no longer using. Marking fixed. If we see it again, we'll open a new bug.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.