Firefox 105: number of out-of-memory crashes significantly reduced

Martin Brinkmann
Sep 8, 2022
Firefox
|
23

It is just two more weeks before Firefox 105 Stable will be released by Mozilla. The web browser comes with an interesting change that will reduce the number of out-of-memory crashes on Windows machines significantly.

source: Mozilla

Revealed by Gabriele Svelto on Twitter, Firefox on Windows will soon run into fewer out-of-memory situations that result in crashes.

The linked bug report on Bugzilla, Mozilla's bug tracking website, offers insight on what Mozilla did to achieve this. Opened more than a year ago, work on it has completed in late August of 2022.

On Linux we have a way to instruct the OOM killer to reap the content processes before the main process when the memory is tight. While we don't use this yet it's something that's feasible. On Windows however there's no such mechanism because there's no overcommit support nor an OOM killer, and we'll be crashing processes on our own when memory gets tight.

The main idea behind the improvement is to delay the killing of the main Firefox process when the browser is running out of memory. With the patch in place, content processes will likely be killed to free up memory before the main process is touched. It is still possible that there is not enough memory that can be freed by killing content processes, but the chance that the main process is touched is reduced thanks to the improvement.

With the main process surviving more the out-of-memory situation, Firefox itself won't crash completely in those situations. A content process, which may be a website open in a browser tab, may be killed, but it is easy enough to reload it when it needs to be accessed again. Mozilla is offloading crashes to content processes whenever possible when the Windows system is running out of memory.

The number of out-of-memory crashes on Windows dropped significantly in Firefox Nightly after the patch was introduced. Content processes, on the other hand, crashes more, but that was to be expected.

Beta and Stable data will likely be similar, but it is too early to tell. Still, if Firefox 105 Stable sees a similar reduction as the Nightly version of Firefox, crashes on Windows that are caused by low memory situations will be reduced significantly.

Now You: when was the last time you experienced a browser crash?

Summary
Article Name
Firefox 105: number of out-of-memory crashes significantly reduced
Description
Firefox 105 reduces the number of out-of-memory crashes on Windows PCs significantly, thanks to this interesting change by Mozilla.
Author
Publisher
Ghacks Technology News
Advertisement

Tutorials & Tips


Previous Post: «
Next Post: «

Comments

  1. Anonymous said on September 30, 2022 at 11:22 pm
    Reply

    Multiple crashes within the last 6 hours, no issues what so ever in a long long time before that.

  2. Rex said on September 14, 2022 at 1:19 am
    Reply

    Bloatware crashes, news at 11.

  3. Anonymous said on September 11, 2022 at 2:02 am
    Reply

    Firefox 104 crashes when printing if the Print Spooler service is stopped. Does 105 fix this problem?

  4. Mothy said on September 8, 2022 at 6:36 pm
    Reply

    Last time I experienced a Firefox crash was a couple years ago with 78.x ESR where I could see the memory use slowly climb into GB’s while streaming video (ex. from a memory leak). Also at the time the PC only had 8 GB of RAM and once doubled to 16 GB Firefox rarely crashed anymore. But then after moving to the 91.x ESR branch I have not experienced a single crash as memory use is always stable (no longer slowly rises from a memory leak).

  5. Mike J. said on September 8, 2022 at 6:32 pm
    Reply

    Waterfox crashes on my old destop very often. No idea why.

    1. John B said on September 15, 2022 at 12:45 pm
      Reply

      You need to rebuild your profile most especially if you’ve been using the browser for years:
      https://www.fixedfirefox.com/profiles/#rebuild

  6. John G. said on September 8, 2022 at 5:37 pm
    Reply

    No single crash here since installed FF 91 ESR, absolutely recommended for working purposes. Thanks for the article. :]

  7. VioletMoon said on September 8, 2022 at 4:15 pm
    Reply

    Don’t know about “memory” crashes, but FF freezes quite frequently on computers with 12GB or more in memory. I’ve tried Firemin and use Process Lasso Pro. Maybe a corrupt profile–but same issue on two different computers. Oddly, the “freeze” may only happen with one or two tabs open; if I open a slew of tabs, over a dozen, FF runs fine.

    1. ryker said on September 14, 2022 at 3:38 pm
      Reply

      I have 16 GB–and the freezes are damn annoying.

  8. Herman Cost said on September 8, 2022 at 3:25 pm
    Reply

    I have used Firefox for years on multiple desktops and laptops of varying age and quality, and have never experienced an out of memory crash (that I can remember, anyway). Of course, I use extensions that prevent many websites from overloading content (i.e., ads), so maybe that at least part of the reason.

  9. Anonymous said on September 8, 2022 at 3:00 pm
    Reply

    ‘Significantly reduced’ is not how you spell fixed.

    1. matthiew said on September 9, 2022 at 4:13 am
      Reply

      Only a Sith deals in absolutes

  10. owl said on September 8, 2022 at 1:53 pm
    Reply

    To begin with, in “Firefox after version 91,” whose program code has been completely revised, there are no more “memory leak crash cases” in the user forums. At best, there are a few scattered cases of “memory leakage when watching YouTube,” but in those cases, it was not limited to Firefox, and the same was true when we were supplementary examinations with Brave and Edge (the conclusion was that YouTube was triggering the problem).

    From knowledge and experience, such memory leakage seems to be “a problem on the side of the content or website being viewed. However, many users still want to use those overloaded contents and websites, so browsers need to be creative. If the carbon neutrality and SDGs are important, also think “end users should restrain themselves…”

  11. Henk said on September 8, 2022 at 1:04 pm
    Reply

    Q: When was the last time you experienced a browser crash?
    A: That must have been many, many years ago, so long ago I cannot even remember it. I use several different browsers every day (mostly Firefox and Vivaldi nowadays) but as far as my memory goes, I’ve never seen a browser crash.
    Maybe this is because by present standards I’m a light user: every day I do many hours of reading, also some media streaming, but that’s it – so no things like browser gaming or video meetings or always-on social media channels. Or maybe I never see a browser crash simply because it’s my habit to never have more than two or three open tabs.

    1. Rina said on September 8, 2022 at 4:44 pm
      Reply

      I use the same kinds of sites as you, but in the last few versions of Firefox I’ve been absolutely plagued by crashes (and weird lockups where the browser works in every way apart from connecting to sites, which is super annoying when submitting forms).

      But I do have lots of (mostly unloaded) tabs, so maybe you’re right about that being the bigger factor.

    2. Paul(us) said on September 8, 2022 at 1:24 pm
      Reply

      Henk@
      I am very curious about how much memory you have installed and if you have installed Firemin 9. Or other similar programs to stabilize your memory. I mean programs like Lasso 11.
      This is because you are a light user who only has a few tabs open, no gaming and video meetings, etc, but you still stream

  12. Tom Hawack said on September 8, 2022 at 12:45 pm
    Reply

    Good news!
    I’ve never experienced a browser crash, at least never with Firefox, not for memory reasons anyway and as far as I can remember (with my own memory!). The PC is 9 years old with only a 8,00 GB Dual-Channel DDR3 RAM (sigh). I must point out that I never have more than a dozen tabs opened simultaneously, and wouldn’t be have anymore with increased RAM : I bookmark to ‘other bookmarks’ substantially and dislike an overcrowded tabs bar…

  13. leakymozilla said on September 8, 2022 at 12:34 pm
    Reply

    Firefox should also fix the memory leak which has been around in their browsers for years, no matter if it’s in Linux or old Win XP, same problem, leaving the browser over night can make it eat another GB of memory, insane.
    And about:memory doesn’t release much memory at all, garbage.

    1. additional info said on September 9, 2022 at 5:15 am
      Reply

      btw, the only addon that seem to slow down leaky memory is some kind of tab suspender/discard addons as it would suspend according to settings, say 30 minutes, so the leakyness seems having to do with a web page which is still open, and it doesn’t matter what web site, just try YouTube and see what happens.
      My perhaps rather extreme example of memory expanding by 1 GB is when I have many tabs open, and I have had up to nearly 2 GB expansion just by leaving the machine on over the night, the best way is to kill the process, restart and reload the session and it goes back to, ahem…. “normal”, the expansion is very slow but if one keep the browser open for days one will see the effect, it is related to open web pages, not the addons alone.

      1. owl said on September 9, 2022 at 7:36 am
        Reply

        @leakymozilla,
        > leaving the browser over night can make it eat another GB of memory,…
        @additional info,
        > it doesn’t matter what web site, just try YouTube and see what happens.
        My perhaps rather extreme example of memory expanding by 1 GB is when I have many tabs open, and I have had up to nearly 2 GB expansion just by leaving the machine on over the night, the best way is to kill the process, restart and reload the session and it goes back to, ahem…. “normal”, the expansion is very slow but if one keep the browser open for days one will see the effect, it is related to open web pages, not the addons alone.

        If they are the case, it is probably the result of an accumulation and bloating of “Service Workers” requested by the site.
        Removing all registered Service Workers (about:serviceworkers) should solve the problem.

        Also, if you disallow their registration, or remove them at any point, they will not become bloated. Both of these can be adjusted in the browser (about:preferences#privacy) and there are extensions suitable for this.

        Service Worker:
        If the web browser supports the Service Worker API, scripts can be “installed” with the permission of the visitor when the page is opened, just like regular software, and scripts can be executed even after moving to another page or restarting the browser This allows the script to be executed even after moving to another page or restarting the browser.

        This allows the browser to implement functions such as caching resources on the page so that they can be used offline, updating the cache by communicating with the site when the page is not displayed (background synchronization), and receiving information actively sent by the site and notifying the viewer (push notification). Push notifications can also be implemented.

        Since this specification is specialized for background operation, it is not possible to manipulate the elements displayed on the page (DOM manipulation), and for security reasons, it is also prohibited to use HTTP to communicate with arbitrary destinations. To use this service, the site must be HTTPS (HTTP over SSL/TLS) compliant.

        The Service Worker specification was proposed by Google, Inc. and was implemented in Google Chrome in 2014. The company calls it “PWA” (Progressive Web Application), which combines various functions including Service Worker to gradually bring the functionality and feel of a web application closer to that of native applications. Currently, not only Chrome, but also Apple Safari, Mozilla Firefox, Microsoft Edge, and other major web browsers support PWA.

    2. matthiew said on September 9, 2022 at 4:03 am
      Reply

      It’s probably one of the addons you are using. Mozilla aren’t responsible for 3rd-party addons.

      1. leakymozilla said on September 9, 2022 at 5:05 am
        Reply

        @matthiew

        but Firefox have gone through changes that forced developers to rewrite their addons, still leaky, we are talking about at least 20 years of leaky… imo the problem is Firefox because it, same addons in Brave doesn’t cause memory to run away, go figure.
        And whats wrong with addons like umatrix and ublock then?

    3. leakysockpuppet said on September 8, 2022 at 1:55 pm
      Reply

      Work on my machine, it’s just you.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.