The default bug view has changed. See this FAQ.

cache is now cleared on every startup




Networking: Cache
6 years ago
6 years ago


(Reporter: Jo Hermans, Assigned: michal)



Windows XP

Firefox Tracking Flags

(firefox8+ fixed)


(Whiteboard: [qa!])


(3 attachments)



6 years ago
Mozilla/5.0 (Windows NT 5.1; rv:8.0a1) Gecko/20110729 Firefox/8.0a1

I wanted to test out bug 670911 (the slow cache clearing bug), and for that I went to about:cache. After a few tests (surfing and deleting) I suddenly noticed that the cache was empty, even though I just had restarted the browser, and I knew there were a few megabytes in it (from an earlier look at about:cache before the restart).

So I tried to repeat it :

- create a completely new profile
- do not customize anything, sync with your older profile or whatever
- surf a few sites (I used <> and <>)
- note down the number of entries in about:cache
- also use the file explorer to look at your profile directory (in local settings). You can look at the size of the cache, but do not open the cache itself (as it will disappear soon)
- restart the browser (cleanly, I might add)
- since you're still using the default about:home homepage, nothing is loaded from the cache yet. You can verify with about:cache or the file explorer : it's still there.
- then go to a single website (I used <>, that doesn't share anything with the above ones)
- if you now look at about:cache or file explorer, you'll see that the cache is almost empty, except for the site currently on the screen. In this case, I can see and everything it loads (facebook, etc ...), but nothing from the old sites at all. 

If you make sure the cache contains more data (+1000 entries and +10MB data for instance), then it's easier to see that there was really a bunch of cache-file that were cleared.

At one test, I noticed the appearance of the Cache.Trash file at the very last step, proving that it was the browser that was deleting the data. Note that bug 670911 has made the process fast again, so you'll only see this with a cache that isn't clean (a few thousands of entries ???).

I do not see this behavior in Firefox 5.0. I have no Aurora installed here, but I'll try to see if it also contains the bug.

I do however suspect bug 670911, I could not remember a similar behavior from a week ago but I do not look all the time at about:cache). I know that the Cache is deleted when it's corrupt, how can it be in a new profile, with only a few visited sites ?

Comment 1

6 years ago
Created attachment 549561 [details]
troubleshooting information

Comment 2

6 years ago
from IRC:

12:05	Archaeopteryx	let me test with latest aurora
12:07	Archaeopteryx	searches for cache and start or cache and session didn't show any recent related bugs, so a new bug sounds appropriate
12:07	jhermans	the only bugs I can find in Bugzilla are from people that do not realize that auto-clearing at shutdown (pre- 4.0) can also clear the cache. Or that the cache is cleared when you shutdown the browser incorrectly (like ctrl-alt-del).
12:19	Archaeopteryx	latest aurora seems to be ok
12:24	Archaeopteryx	jhermans: i am wrong, this is also a problem in the latest aurora, but only with a new profile.

So if it's also in Aurora, it's not bug 670911 ?
I've also tested it again in Firefox 5.0 (with a new profile too), but I din't see it there.

Comment 3

6 years ago
Hmmm ... personally I can only find the problem in Minefield, not in Aurora, Beta, Firefox 5.0 or Firefox 3.6.*. All versions were up-to-date (I downloaded Aurora and Beta first)

This is my exact steps what I did :

- cd to the directory where the version you want to test is installed
- firefox.exe -P -no-remote
- delete the profile 'test' (if it exists)
- create a new profile 'test'
- quit
- firefox.exe -P test -no-remote
- you get the warning about the default browser, untick the checkbox and click No
- you get 2 tabs, close the one on the left (welcome page)
- go to in the remaining tab
- go to in the same tab
- open a new tab and go to about:cache : the numbers should be smtg like 300 or 400 entries
- quit using the menubar
- firefox.exe -P test -no-remote
- go to in the single tab
- open a new tab and go to about:cache : the numbers should now be smtg like 120 entries, if you closely, you see that there' no trace from or
- repeat for other browsers

In Aurora and older browsers, the number was smtg like 540 entries, which is the 3 websites combined. Minefield had its cache cleaned at the restart.

Comment 4

6 years ago
Note that if you set your homepage to a specific website (let's say <>, which is 11 entries and 200K), it will load that immediately at startup and thus clear the cache.
I see a problem of preserving the cache after profile creation on first shutdown of the profile in Firefox 5.0, latest beta, aurora and nightly on Windows XP SP 3 32-bit.
After creating the profile, disable default browser check and say no, dismiss the 'Know your rights' bar. Open in a tab, use the second tab or open one to open
Close Firefox using the window close button, confirm the multiple tabs close warning.
Start the profile again, call about:cache. Result: Nothing (0) in cache.
If you repeat to open the urls, close the browser and start again, you should now see something in the cache. With only one tab open, I can see the 0 cache entries problem more often.

Comment 6

6 years ago
Created attachment 549812 [details]
Sample Bookmarks JSON file

Confirmed on
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a1) Gecko/20110801 Firefox/8.0a1 ID:20110801030916

I can reproduce with 100%.

1. Start Browser with new profile
2. Restart x 2 times (skip about:right and skip reporting statistics)
3. Restore attached Bookmarks(Ctrl + Shift + B > Import and Backup > Restore > Choose File...)
3. Restart Browser

4. Alt > Bookmarks > Right click on "New Folder" and Click "Open All in Tabs"
5. Focus 1st tab
6. Right click 1st tab and click "Close Other Tabs"
7. Reload tab and Check Disk cache usage

8. Quit Browser and Start Browser again
9. Open about:cache, Check Disk cache usage

Number of entries: 	0
Storage in use: 	0 KiB

These numbers should not be 0 like following.

Number of entries: 	591
Storage in use: 	5929 KiB

Regression window(m-c hourly)
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a1) Gecko/20110728 Firefox/8.0a1 ID:20110728141550
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a1) Gecko/20110728 Firefox/8.0a1 ID:20110728154550

Triggered by:
dd7d71277a15	Michal Novotny — Bug 673808 - _CACHE_MAP_ is storing nsDiskCacheRecord structs with uninitialized data containing bits of Fx memory


6 years ago
Blocks: 673808
Keywords: regression


6 years ago
Assignee: nobody → michal.novotny
I think we need to track this regression for 8.
tracking-firefox8: --- → ?

Comment 8

6 years ago
Created attachment 550095 [details] [diff] [review]

This regression is caused by bug #673808. The cache is deleted because of the check at
Attachment #550095 - Flags: review?(bzbarsky)
Comment on attachment 550095 [details] [diff] [review]

Attachment #550095 - Flags: review?(bzbarsky) → review+

Comment 10

6 years ago
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8

Comment 11

6 years ago
verified as fixed in :
Mozilla/5.0 (Windows NT 5.1; rv:8.0a1) Gecko/20110803 Firefox/8.0a1


6 years ago
status-firefox8: --- → fixed
tracking-firefox8: ? → +
Mozilla/5.0 (Windows NT 5.1; rv:10.0a1) Gecko/20111003 Firefox/10.0a1
Mozilla/5.0 (Windows NT 5.1; rv:9.0a2) Gecko/20111003 Firefox/9.0a2
Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20100101 Firefox/8.0

Verified in Firefox 8 Beta 1, Firefox 9 and Firefox 10 on Ubuntu 11.04, Windows XP, Windows 7, Mac OS 10.6 using the STR in comment 6. The cache is no longer cleared.
Whiteboard: [qa!]
You need to log in before you can comment on or make changes to this bug.