304 threading regression

RESOLVED INCOMPLETE

Status

()

Core
Networking: Cache
RESOLVED INCOMPLETE
2 years ago
2 years ago

People

(Reporter: elatllat@gmail.com, Assigned: michal)

Tracking

45 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

4.55 MB, application/x-7z-compressed
Details
(Reporter)

Description

2 years ago
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.

Updated

2 years ago
Component: Untriaged → Networking: Cache
Product: Firefox → Core

Comment 1

2 years ago
Could provide a live testcase, please.
Flags: needinfo?(elatllat)
(Assignee)

Comment 2

2 years ago
Or provide NSPR log (https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging). Use NSPR_LOG_MODULES=timestamp,nsHttp:5,cache2:5
(Reporter)

Comment 3

2 years ago
Created attachment 8740621 [details]
test log
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...
(Reporter)

Comment 5

2 years ago
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.
(Reporter)

Comment 6

2 years ago
Created attachment 8740960 [details]
test log with the requested modules
(Reporter)

Updated

2 years ago
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
Last Resolved: 2 years ago
Resolution: --- → INVALID
(Reporter)

Comment 8

2 years ago
  about:config
said that 
  browser.cache.disk.max_entry_size, default, integer, 51200
but I'll test on a fresh profile anyway.
(Reporter)

Comment 9

2 years ago
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 → ---
(Reporter)

Comment 10

2 years ago
Created attachment 8741769 [details]
ff_clean_log.txt.7z
Attachment #8740960 - Attachment is obsolete: true
(Assignee)

Comment 11

2 years ago
(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
Last Resolved: 2 years ago2 years ago
Resolution: --- → INVALID
(Reporter)

Comment 12

2 years ago
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]
(Assignee)

Comment 14

2 years ago
We don't have enough information to analyze or fix the problem.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago2 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.