Closed Bug 1907929 Opened 3 months ago Closed 1 month ago

Memory leak when accessibility is not force disabled

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: drdaviddukephd, Unassigned)

Details

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

So I did a couple tests in the past month with Firefox ESR 115 on a second laptop, one with accessibility.force_disabled at "0" and the other at "1", without closing Firefox for 10 days each. It's on Windows 10 LTSC 2021 and has 16 GB of RAM. The only extension it had was uBlock Origin. Had no other programs running and made sure to disable Windows Defender, Indexing, Windows Update and other bloatware with various GPEdit.msc options and scripts from GitHub. Both Firefox tests had 10 identical tabs (1 blank new tab, 5 YouTube video tabs, 3 Wikipedia tabs, 3 Yandex tabs) and all I did was refresh all tabs once a day (autoplay off for the YouTube videos). On the last day for both tests I would then close all tabs except for the blank new tab, go to about:unloads and click unload until there's nothing to unload, and then go to about:memory and click GC, CC and Minimize memory usage, and then wait about 5 minutes to measure total system memory usage in Windows Task Manager.

The test with accessibility.force_disabled set at "0" Windows Task Manager showed there was 40% Physical Memory usage, whereas the test with accessibility.force_disabled set at "1" showed 31% Physical Memory usage. I also reopened all tabs for both tests afterwards, and the "0" test showed 56% whereas the "1" test showed 47%. Closing them again would drop them down to 40% and 31% memory usage respectively. Closing Firefox after both tests would show 20~21% Physical Memory usage.

Anecdotally I've noticed similar results prior to these tests on my main computer where I like to keep Firefox ESR (115) open for several weeks or months, and in Windows Task Manager I notice I get quite a bit more memory released when I unload all tabs in about:unloads whereas when I left accessibility.force_disabled at "0" there was always this extra >1 GB chunk of memory hogged up by something that wouldn't get released until I've closed and reopened Firefox. From my experience it is a very gradual memory leak that accumulates over days when not closing Firefox but I haven't had an issue since setting accessibility.force_disabled to "1" on all my computers.

Can you please provide the information from the Accessibility section of about:support on the system on which you performed this test with force_disabled set to 0?

If you have an accessibility client running on your system (and you may have one without realising it; Windows sometimes uses accessibility APIs itself), some extra memory usage is expected and necessary for the accessibility information. This is especially true because of silly Windows bugs like bug 1654970 where Windows components never release certain accessibility resources once acquired. There's nothing we can do about that particular bug without a fix in Windows, though our in-progress native UI Automation implementation (bug 762769) may mitigate this.

Flags: needinfo?(drdaviddukephd)
Severity: -- → S3

A needinfo is requested from the reporter, however, the reporter is inactive on Bugzilla. Given that the bug is still UNCONFIRMED, closing the bug as incomplete.

For more information, please visit BugBot documentation.

Status: UNCONFIRMED → RESOLVED
Closed: 1 month ago
Flags: needinfo?(drdaviddukephd)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.