Closed Bug 1261440 Opened 8 years ago Closed 8 years ago

304 threading regression

Categories

(Core :: Networking: Cache, defect)

45 Branch
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: elatllat, Assigned: michal)

Details

Attachments

(1 file, 2 obsolete files)

4.55 MB, application/x-7z-compressed
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Firefox/45.0
Build ID: 20160315153207

Steps to reproduce:

1) 4 iframes sharing one css file with a one minute expires header.
2) firefox sends "If modified since" for the css of only one iframe due to concurrency.
(that's ok but you may need a bunch of external resources to get one or more of the css files to be requested after at least one is returned so that the "If modified since" is sent)
3) 304 is returned from the server but firefox acts like it can't get the css from cache.



Actual results:

no css in one iframe unless caching is disabled in the developer tools of firefox.


Expected results:

The css should be guaranteed as retrievable from cache before an "If modified since" header is sent, it should then be locked in the cache to prevent removal until after the request completes with a 200, 304, or timeout.
Component: Untriaged → Networking: Cache
Product: Firefox → Core
Could provide a live testcase, please.
Flags: needinfo?(elatllat)
Or provide NSPR log (https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging). Use NSPR_LOG_MODULES=timestamp,nsHttp:5,cache2:5
Attached file test log (obsolete) —
Flags: needinfo?(elatllat)
(In reply to elatllat from comment #3)
> Created attachment 8740621 [details]
> test log

Please use these exact modules:

NSPR_LOG_MODULES=timestamp,nsHttp:5,cache2:5


this log is useless...
Sorry I unset that by blindly following the instructions in the link.
Attaching a log with the correct NSPR_LOG_MODULES now.
This log is a little longer as it took me a few refreshes to reproduce the issue.
Attached file test log with the requested modules (obsolete) —
Attachment #8740621 - Attachment is obsolete: true
For all instances of http://192.168.0.112:88/test13.css I can see:

CacheEntry::SetPredictedDataSize [this=11d1e9ba0] too big, dooming

Seems like you have changed the browser.cache.disk.max_entry_size preference value, probably to zero?

If you can reproduce with a fresh profile, please reopen.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
  about:config
said that 
  browser.cache.disk.max_entry_size, default, integer, 51200
but I'll test on a fresh profile anyway.
I was able to reproduce this with a fresh profile.

I did change
    about:preferences#advanced
    Limit cache to 0MB
to reduce the log size and speed of reproduction.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Attached file ff_clean_log.txt.7z
Attachment #8740960 - Attachment is obsolete: true
(In reply to elatllat from comment #9)
> I was able to reproduce this with a fresh profile.
> 
> I did change
>     about:preferences#advanced
>     Limit cache to 0MB
> to reduce the log size and speed of reproduction.

By doing this you disabled the cache, so you cannot expect to successfully load the resource from the cache.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → INVALID
I made another clean profile and browsed the web until the default 350MB was full then was able to reproduce the issue. It seems to makes no difference how big the disk cache is, when you hit it's limit Firefox should manage resources so web pages can be displayed properly;
aka Don't send a "if modified since" header unless it's willing to keep the local resource until there is an answer or timeout. Let me know if you want me to upload the 5GB log file somewhere.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
elatllat, I assume the 5GB log file also includes you navigating to fill up the cache, right? If so, we don't need all of it. You can probably try to reproduce it again, and upload the log files to any file sharing service, and post the link.
Michal, can you take this after elatllat posts the log file?
Assignee: nobody → michal.novotny
Whiteboard: [necko-active]
We don't have enough information to analyze or fix the problem.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → INVALID
Whiteboard: [necko-active]
Resolution: INVALID → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: