Open Bug 1515682 Opened 4 years ago Updated 3 years ago
Crashing Nightly while it is running out of storage space will not display the correct value of saved Cookies and Site Data
[Affected versions] 66.0a1 (2018-12-20) [Affected platforms] Windows 10 x64 (only tested on this so far) [Steps to reproduce] 1. Launch Firefox 2. Open 3-4 tabs with sites like youtube, facebook, reddit etc. 3. Go to https://bug1377104.bmoattachments.org/attachment.cgi?id=8882153 in a different tab 4. Click on Persist Me and start adding data until the yellow bar notification appears (Nightly is running out of disk space...) 5. Check the value of saved Cookies and Site Data (from Clear Data list) on the about:preferences#privacy 6. Crash Nightly with about:crashparent 7. Restart Nightly and restore/reload all the previously opened pages 8. Check again the saved Cookies and Site Data Expected result] The saved Cookies and Site data amount should be the same as before crashing Nightly [Actual result] The are no Saved Cookies and Site Data ( 0 bytes ). Recording of the issue: https://streamable.com/m1na5 Browser Console log: https://imgur.com/lYaNFG9 [Notes]: It can be reproduced with NextGen local storage enabled and disabled as well. Restarting the browser solves the issue as the correct value will be displayed. Further browsing sites after reproducing this issue might cause twitch live stream to not be displayed (black screen)and other page loading issues. <- I had like 20 tabs opened at this point, this part still needs to be investigated.
Thanks for the bug report, Timea! Andrew Sutherland kindly pointed out to me that the cookie stuff is bug 1237527. Jan, can you think about whether or not this is particularly relevant to next-gen localStorage (i.e. if we have to block on this)?
(In reply to Andrew Overholt [:overholt] (Back Jan 2) from comment #1) > Jan, can you think about whether or not this is particularly relevant to > next-gen localStorage (i.e. if we have to block on this)? If it can be reproduced with LSNG disabled, then I don't think we need to block on this. Anyway, cookies are stored separately, LSNG doesn't interact with it at all.
Thanks Jan and Andrew for reviewing this issue. I'm still quite confused due to the "Cookies and Site Data" label given that Cookies and Site Data are being placed together in the Clear Data UI. Since I stored persistent storage (1.2 GB) which goes to local storage (Site Data?) and all of it "disappeared" after crashing Nighlty, made me totally forgot that there are also cookies in that label. Please note that in my case even if cookies and site data look like being deleted, I am still logged in on Facebook and Twitch but Reddit page doesn't want to load anymore at all(even after several restarts!), here is a screenshot of the browser console: https://imgur.com/YlyTbhr In this case, I am not sure if this is indeed the mentioned Cookies bug or some alteration of it. In any case it does affect page rendering (reddit) and I don't understand why deleted Cookies bug affects the displayed value for the stored Site Data given that they are stored separately. I would expect to see for example 200 KB less (as for the deleted cookies) and the 1.2 GB persistent storage to still be there. I know there are a lot of questions here...but the Reddit page not being rendered (unless I delete all Cookies and Site Data) is not a good sign. Note that Reddit was working just fine while I had full storage space reached and without starting to crash Nightly.
For the erroneous data usage, on about:preferences, it looks like the amount of data used by cookies isn't actually reflected. On the Privacy & Data page, the total is `siteDataUsage + cacheUsage`. Inside the dialog, those two numbers are split out. `siteDataUsage` comes exclusively from QuotaManager and in the event of an error 0 will be returned. It seems like this is the most likely explanation for why you saw zero. (The control flow in SiteDataManager.jsm is a little suspect, but if the QM getUsage call wasn't made, I think we'd expect the dialog to fail to initialize rather than show a 0.) Based on the recording, it appears that when you first brought up the browser after triggering the crash that QuotaManager came up in a broken state, but that it recovered after that. Very interestingly, it doesn't look like QuotaManager actually performed any eviction after you used up that disk space or after the restarts. I wonder if that means the problem might instead be related to crashing the parent process rather than the disk usage. (That is, perhaps there is an edge case due to the IndexedDB database not being normally closed/checkpointed or something like that?) 1: https://searchfox.org/mozilla-central/rev/9528360768d81b1fc84258b5fb3601b5d4f40076/browser/components/preferences/in-content/privacy.js#1040 2: https://searchfox.org/mozilla-central/rev/9528360768d81b1fc84258b5fb3601b5d4f40076/browser/modules/SiteDataManager.jsm#136
Flags: needinfo?(bugmail) → needinfo?(timea.babos)
You need to log in before you can comment on or make changes to this bug.