Closed Bug 1741966 Opened 3 years ago Closed 1 year ago

Using websites that use localstorage or sessionstorage in a certain way while such storage turned off or not fully loaded yet, while a specific cookie extension is turned on, causes quota manager crashes

Categories

(Core :: Storage: localStorage & sessionStorage, defect, P3)

Firefox 94
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: afaninthehouse, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0

Steps to reproduce:

ENVIRONMENT

  1. You have to use Windows. I'm using Windows 10.
  2. Turn localstorage and sessionstorage off by going to about:config and making sure that dom.storage.enabled is set to "false". Do not confuse this with dom.storagemanager.enabled. You will know if done correctly as it'll say so on the website listed below (see attached image).
  3. Make sure the "I don't care about cookies" extension is installed and turned on. https://addons.mozilla.org/en-GB/firefox/addon/i-dont-care-about-cookies/
  4. Make sure the Superfetch aka Sysmain service turned off to ensure that Windows isn't caching any software in the memory before it is launched. You have to restart your computer after disabling it for it to properly come into effect. Make sure the "startup type" is set to disabled (see attached image). Simply changing it from "running" to "stopped" is not sufficent.

You can do this in Computer Management (Windows Key + X) or Services (Windows Key + R then type in services.msc)

STEPS

  1. Go to the localstorage and sessionstorage testing website below and type something in the first box then click save. You will not see any visual confirmation on the web page that something has or hasn't saved. This is intentional.

http://www.sharonminsuk.com/code/storage-test.html

  1. Go to the Tellonym website and make sure you are logged in. Once logged in the main menu will have 5 icons on it. It'll automatically show you a web page from one of the 5 menu options. For this step you must click one of the other menu options that's not currently selected to switch to a different page. Once done then switch back to the menu option you was previously on to go back to the page you was previously on.

  2. Go back to the testing web page and type something different in the first text box then click the "store it" button right next to the first text box.

  3. Open up Task Manager and watch how the memory usage will continually increase, in both the "processes" and "performance" tab. When on the "processes" tab, wait for the memory usage to go red by reaching 95-100% then close down Firefox completely. This seems like it's indicative of a memory leak.

When firefox loads to open web pages, there is a delay between when that is and how long it takes for the localstorage and sessionstorage feature in firefox to load. It seems like various firefox users are triggering this crash by using websites that utlilise such features in a specific way, before it's had a change to load.

I'll upload a youtube video of me triggering the crash later.

Actual results:

Firefox crashed.

UNUSUAL CRASHES
Firefox 94.0.1 Crash Report [@ shutdownhang | NtFsControlFile ]
8f974719-b817-46fb-b284-013530211118

TYPICAL CRASHES
Firefox 94.0.1 Crash Report [@ static mozilla::dom::quota::QuotaManager::Shutdown::<T>::operator()::<T>::__invoke ]
6a368d5f-6452-4397-bb70-f10670211118
8a7356e8-195b-4082-a042-de2aa0211118
de7083fc-4ef4-4a15-86ef-9fccf0211118
d7c0c0aa-aff1-4a8b-833f-fa4040211118
f1e68392-4de5-49ea-9564-1e56e0211118
dedf58f3-cd74-4902-9119-d85e30211118
c13bef63-206e-4627-a60b-a708b0211118
38bb34c9-3533-46df-822a-03dc20211118

Expected results:

Firefox shouldn't have crashed.
This crash also slows down firefox while it is being used before the user decides to close firefox.
There should have also been no memory leak.

Here's an image of what the testing page will look like if dom.storage.enabled is set to "false".
![https://i.imgur.com/GEInxma.png](test localstorage and sessionstorage with dom.storage.enabled set to false)

The Bugbug bot thinks this bug should belong to the 'Core::Storage: localStorage & sessionStorage' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Storage: localStorage & sessionStorage
Product: Firefox → Core

Janv, is dom.storage.enabled supported in any way?

Severity: -- → S3
Flags: needinfo?(jvarga)
Priority: -- → P3

Here's a video of me reproducing the bug.
https://www.youtube.com/watch?v=FQQZVKo6eKE

I've just upgraded to Firefox 96 yesterday and the bug is fixed because I can't reproduce it any more.
For context, I had the bug in version 94 and 95.
Thank you for your hard work!

(In reply to Olli Pettay [:smaug][bugs@pettay.fi] from comment #3)

Janv, is dom.storage.enabled supported in any way?

Yes, it is.

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Flags: needinfo?(jvarga)
Resolution: --- → WORKSFORME

Seems to be working for the reporter now.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: