Closed
Bug 330397
Opened 19 years ago
Closed 19 years ago
Additional problems with incomplete cache entries and cache flush assertions.
Categories
(Core :: Networking: HTTP, defect, P1)
Core
Networking: HTTP
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: darin.moz, Assigned: darin.moz)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
Details | Diff | Splinter Review |
Additional problems with incomplete cache entries and cache flush assertions.
This bug is basically about follow-up for my patch for bug 189570.
Assignee | ||
Updated•19 years ago
|
Assignee | ||
Comment 1•19 years ago
|
||
This patch cleans up a bunch of stuff. The logic for dooming a cache entry now widdles down to whether or not we have initialized it. If we receive READ+WRITE access to the cache entry, then we can assume that it was previously initialized. If we only have WRITE access, then we were responsible for initializing it. The mOpenedCacheForWriting flag is then replaced with a mInitedCacheEntry flag, that is set if InitCacheEntry succeeds.
Attachment #214950 -
Flags: superreview?(bzbarsky)
Attachment #214950 -
Flags: review?(cbiesinger)
Assignee | ||
Comment 2•19 years ago
|
||
Oh, the change to nsDiskCacheStreams.cpp is to avoid an assertion resulting from trying to flush a doomed entry. Doomed entries are no longer present in the _CACHE_MAP_, so it makes no sense to try to flush their data to disk.
Comment 3•19 years ago
|
||
Comment on attachment 214950 [details] [diff] [review]
v1 patch
sr=bzbarsky if us no longer checking the IsResumable() thing is ok.
Attachment #214950 -
Flags: superreview?(bzbarsky) → superreview+
Assignee | ||
Comment 4•19 years ago
|
||
Boris, we check for that inside CheckCache.
Comment 5•19 years ago
|
||
Ah, ok. ;)
Updated•19 years ago
|
Attachment #214950 -
Flags: review?(cbiesinger) → review+
Assignee | ||
Comment 6•19 years ago
|
||
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 7•19 years ago
|
||
With this fix included, I am unable to download executable files using firefox. The file appears to be truncated as if the final buffer was not flushed. Backing out this patch corrects the issue. There are many complaints about this issue using the Firefox trunk 3/22 nightly on the Mozillazine forums.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 8•19 years ago
|
||
Hmm... ah, I suspect there may be some 'cache as file' consumers who expect to be able to doom the cache entry and still access the cache file while holding onto the cache entry descriptor. Yeah, that could explain the regression. In that case, I think I'll need to simply suppress editing the cache map when the entry is doomed. OK, backing out the v1 patch for now.
Assignee | ||
Updated•19 years ago
|
Status: REOPENED → ASSIGNED
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060322 Firefox/1.6a1 ID:2006032301
first time to download an exe file is failed.
but second time to download the same file is complete.
this seems to be related to cache, but why the first time is failed.
now this checkin is backed out, so 0323 build is almost same with 0321 build (before this checkin landed.), why can not download at first time ?
Comment 10•19 years ago
|
||
Hmm, it appears I was wrong in comment #7. I stupidly forgot to clear the cache before redoing my test downloads after backing out the patch from my tree. So, it would appear that it is a different checkin that caused the download regression. Unfortunately, none of them really jump out as looking likely.
Comment 11•19 years ago
|
||
Perhaps it is really caused by bug 162361? Unfortunately I don't have time to do a build right now.
Comment 12•19 years ago
|
||
OK. I decided I did have time to do a build. I reapplied this patch and backed out 162361. Then I removed the truncated files and cleared the cache and was able to successfully download my test files on the fist try.
Sorry for my previous misinformation. :-(
Comment 13•19 years ago
|
||
Forgot to mention, I filed bug 331453 on the download issue, and made it block 162361. Sorry for the bugspam.
Assignee | ||
Updated•19 years ago
|
Priority: -- → P1
Assignee | ||
Comment 14•19 years ago
|
||
I modified the cache changes slightly to account for the possibility of a doomed cache entry that is being 'streamed as file'
Attachment #214950 -
Attachment is obsolete: true
Assignee | ||
Comment 15•19 years ago
|
||
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 19 years ago → 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•