20 ms·
Improving Firefox stability on Linux
- input_sh 5y agoOh cool! Now that I think of it I haven't seen the crash window in quite some time. Well done! Now if I could only disable Ctrl+Q and prevent it from asking for a restart after update...
- MawKKe 5y agoIt does not really ask, it straight up bricks the whole browser session until you do. But otherwise, FF has been really stable for years now
- Vinnl 5y agoI haven't been able to disable it, but the option "Warn you when quitting the browser" at the top of preferences has already saved me numerous times. Not as perfect as disabling, but far better than nothing.
- cpeterso 5y agoThere is a new "browser.quitShortcut.disabled" setting in about:config to disable Ctrl+Q.
- deadbunny 5y agoI've never really had an issue with restarting Firefox, it remembers all my tabs when I restart it either after an update or just a close/open. Perhaps it's a setting I toggled years ago and have since forgotten but I'm not sure what the complaint is about restarting after an update?
- Abishek_Muthian 5y agoUnless there's a private window, which gets lost during these forced restart after updates.
- randlet 5y agoAt least for me after FF updates itself it won't let you open a new tab or anything until it restarts. According to this Reddit post this is due to it being updated by the package manger so maybe it's a Linux only issue?: https://old.reddit.com/r/firefox/comments/jwx54y/firefox_forcing_to_restart/ https://old.reddit.com/r/firefox/comments/jwx54y/firefox_for...
- lazulicurio 5y agoIt's due to the "unattended upgrades" feature. You can blacklist FF from getting those upgrades with a change to /etc/apt/apt.conf.d/50unattended-upgrades. Add "firefox" to the "Unattended-Upgrade::Package-Blacklist" section. I find manually upgrading much less annoying than having my browser randomly lock up on me.
- randlet 5y agoThank you!
- input_sh 5y agoIt remembers the tabs, but it loses my vertical position within the tabs. When reading articles or a thread on some forum, that's quite annoying. Even Pocket doesn't save my progress on a desktop but does on my phone. It's nothing that would make me stop using it, just an annoyance that I wish I didn't have to deal with on a semi-regular basis.
- tux3 5y ago>Now if I could only disable Ctrl+Q Good news! =) Set browser.quitShortcut.disabled in about:config
- amlib 5y agoSince when was that added? Anyway, my days of closing the whole damn browser instead of a single tab are finally over!
- input_sh 5y agoYeah this must be new-ish. I remember searching for this and only finding some plugins that didn't work on Linux.
- sylvestre 5y agoIndeed, 3 months ago: https://bugzilla.mozilla.org/show_bug.cgi?id=52821#c319 https://bugzilla.mozilla.org/show_bug.cgi?id=52821#c319
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]
- kevincox 5y agoI would absolutely love a shortcut manager for Firefox. For example I use this shortcut enough that something like Ctrl+Shift+Q would be useful. (And the dozens of other things that I would like to rebind, including custom shortcuts).
- Dunedan 5y agoI second that. I'd love to be able to configure a shortcut to move tabs to new windows.
- darkwater 5y ago
- kevincox 5y ago> prevent it from asking for a restart after update This isn't just nagging. The API between the main browser context and content processes isn't stable between builds. This means that Firefox can't spin up a new content process if the update has replaced the executable with a different version. Therefore Firefox has the tough choice of trying anyways and risking misbehaviour (including possibly security bugs) or forcing the user to restart the browser process so that it can spawn new content processes. It also depends on how your distribution updates Firefox. For most distributions they have this problem, however NixOS doesn't because the new version is installed in a new directory. IIUC Firefox's self-updater also doesn't have this issue, and I think it supports Linux.
- the8472 5y ago> This means that Firefox can't spin up a new content process if the update has replaced the executable with a different version. Couldn't it spin up another one from the old version by doing execve("/proc/self/exe", ...)? Or by keeping a template process around with all the libraries loaded from which a child process can then be forked.
- dblohm7 5y agoCompletely possible, but that's not how it works ATM. EDIT: And at the risk of stating the obvious, the fact that it doesn't work this way should be a hint that there are complexities involved that make it more complicated than "just" doing it.
- phendrenad2 5y agoI don't agree. The fact that it doesn't work is not necessarily a hint that there are complexities involved. There are a myriad of other possible reasons, such as no one really cares that Firefox forces you to restart the app whenever it updates. People just get used to it.
- kaba0 5y ago
- reidrac 5y agoCoincidentally, I have experienced 4 crashes already since 88.0.1 was released. But I agree with you, I can't remember when was the last time I had a crash before these!
- kelnos 5y agoPer a sibling comment, browser.quitShortcut.disabled in about:config works. For me, I just never disabled the option to ask before quitting when more than one tab is open, so that dialog always catches me before I quit by accident.
- coldpie 5y agoSadly it's not enough. If I have one tab open, I still don't want ctrl-q to kill Firefox; and it doesn't count pinned tabs as open tabs, so it will still kill even if you have several pinned tabs open. It's a really, really dumb shortcut to have on by default and I'm thrilled it's finally dead.
- 2OEH8eoCRo0 5y agoThis is great! Looks a lot like Fedoras crash statistics: https://retrace.fedoraproject.org/faf/summary/ https://retrace.fedoraproject.org/faf/summary/
- mousepilot 5y agoI use firefox but haven't had sound since they dropped alsa support. Occasionally I'll run palemoon to get sound but while I like the browser, its not totally stable. Probably need to try chromium.
- mousepilot 5y agolol awesome, not only do I have the misfortune of no sound, people here want to rub it in with downvotes for mentioning it. thanks guys
- nix0n 5y agoWe're just jealous you don't have to listen to ads :)
- simias 5y agoI've had the same issue and finally bit the bullet and installed pulseaudio. I was semi-pleasantly surprised: it actually works most of the time on my computer these days. I still have to mess with a billion things when I want to do anything more complicated than basic music playback, but for that it sorta works which is already pretty great by Linux audio standards.
- mousepilot 5y agoI'm really into music as a hobby and I don't want to mess up one of my few working computers. I do admit to using a youtube downloader some when I want to view a video.
- simias 5y agoYeah I definitely see where you're coming from, unfortunately I just cowardly reboot on my Windows partition when I want to do "serious" audio work because Linux is just an exercise in frustration in my experience.
- kaba0 5y ago
- evmar 5y agoI noticed that the two bugs they linked [1] [2] are both due to the distros introducing bugs by applying patches -- one for hurd support (!) -- that were not shipped by the upstream projects that the distros were repackaging. As we have discussed earlier [3] I think the way distros inject themselves into this software development process produces these bad outcomes due to getting the incentives wrong. [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1679430 https://bugzilla.mozilla.org/show_bug.cgi?id=1679430 [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1633467 https://bugzilla.mozilla.org/show_bug.cgi?id=1633467 [3] https://news.ycombinator.com/item?id=26216917 https://news.ycombinator.com/item?id=26216917
- khuey 5y agoThis is exactly why historically Mozilla has required distributors to distribute an unmodified version of Mozilla software to use Mozilla trademarks such as the name Firefox, which (unlike the code) are not freely available. Unfortunately the specific bugs here are in library packages that Firefox uses and those have no such restrictions.
- IshKebab 5y agoIf I were Mozilla I would strongly consider bundling more dependencies.
- vetinari 5y agoIronically, that was one of the reasons why distributions wanted their own builds.
- trissylegs 5y agoThey do have a bunch if you get it directly from them: /opt/firefox-nightly % ls *.so libfreeblpriv3.so liblgpllibs.so libmozavutil.so libmozsandbox.so libmozwayland.so libnss3.so libnssutil3.so libplc4.so libsmime3.so libssl3.so libgraphitewasm.so libmozavcodec.so libmozgtk.so libmozsqlite3.so libnspr4.so libnssckbi.so liboggwasm.so libplds4.so libsoftokn3.so libxul.so It did give me some grief a few weeks ago when their libmozwayland broke and I had to LD_PRELOAD libwayland to get it working.
- rowanG077 5y agoHow about fixing GPU acceleration. This is THE main issue why I don't use Firefox.
- garaetjjte 5y agoWhat's wrong with it?
- rowanG077 5y agoIt only works under GNOME officially and that only since January. And I have in fact never gotten it to work, and I'm not alone.
- rockdoe 5y agoI use it under KDE. Or are you on Wayland?
- bool3max 5y agoWorks for me on sway (Wayland).
- aosmond 5y agoAs of bug 1702301 [1], and Firefox 89 currently in beta, we are shipping hardware accelerated WebRender by default on Intel (Mesa 17+), AMD (Mesa 17+) and NVIDIA (Mesa 18.2+, Binary driver 460.32.03+) GPUs, as well as lifting the desktop restriction. KDE and XFCE are allowed by default in 88. Wayland anything for a while. There are some particular GPUs with issues which we block, and there are a few more coming due to reported issues (mostly older/weaker GPUs). There are open bugs I know. Some of which that are getting attention, others we haven't gotten a chance to prioritize. Is there a bug filed about your particular problem? [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1702301 https://bugzilla.mozilla.org/show_bug.cgi?id=1702301
- kroeckx 5y agoWill VAAPI get enabled (on X11) by default too?
- maweki 5y agoSince I've upgraded to Fedora 34 (been on Walyand before though) Firefox disconnects from Wayland and crashes whenever there's a bit of IO going on. Haven't had a tab crash in quite some time though.
- gsvelto 5y agoI think I started scraping symbols from Fedora 34 builds on Monday, we probably haven't looked at those crashes yet.
- amenod 5y agoGreat work Mozilla! I can't remember the last time Firefox crashed for me (Linux). I am using the upstream version though, as I prefer security fixes in my browser to be applied as soon as possible.
- rurp 5y agoThis is great. I've done my fair share of griping about Firefox's many UI and functional regressions, but these types of stability improvments are very welcome and much appreciated.
- sloshnmosh 5y agoStrange. I’ve never had an issue with Firefox crashing on Linux. Firefox on Android is a different matter and is unusable on some devices.
- Darmody 5y agoNow it would be cool if they didn't break the number inputs with Bootstrap's form-control class. There's something wrong with the padding and the up and down arrows simply don't work. I think it's already fixed on beta/nightly but this can't happen. We can't wait months to have our inputs working again. Also there's another bug introduced a couple versions ago. If you select some text with you mouse and a the next line, when you open a new tab with the middle button it'll paste the whole thing you selected in the direction bar. I usually select text or code when I read it and every time I open a new tab with my mouse, boom. I have to delete everything, or select a single word somewhere and close that tab to reopen a new one. And if I'm not looking and start typing I end submitting a long text to duckduckgo.
- VadimPR 5y agoOne of the issues of running an open-source C++ project is the difficulty in obtaining stack traces from users - hoping to re-use the work that Mozilla did here for Firefox, so thanks team for paving the path there for others.
- gsvelto 5y agoYou're very welcome! If you're interested in the topic we've got a working group [1] and a very active channel on chat.mozilla.org [2]. Besides the actual stability work we've also been busy either rewriting some of this tooling in Rust (see [3] and [4]) as well as contributing to Sentry's excellent symbolic crate which we leverage during symbol extraction. [1] https://wiki.mozilla.org/Data/WorkingGroups/CrashReporting https://wiki.mozilla.org/Data/WorkingGroups/CrashReporting [2] https://chat.mozilla.org/#/room/#crashreporting:mozilla.org https://chat.mozilla.org/#/room/#crashreporting:mozilla.org [3] https://github.com/mozilla/dump_syms/ https://github.com/mozilla/dump_syms/ [4] https://github.com/luser/rust-minidump https://github.com/luser/rust-minidump
- alpaca128 5y agoThe only issue I have with Firefox(and a regular one) is that its UI seemingly cannot handle tiling window managers. Unless I manually resize each Firefox window after startup the UI won't properly adapt to the actual window size. But that is really a minor nitpick compared to the tons of issues I have with other browsers; Firefox runs insanely stable, and easily handles a large number of tabs.
- eikenberry 5y agoThat might be a bug in your window manager. Window resizes, whether automatic or manual, should send the same notifications to the software about the need for a redraw.
- alpaca128 5y agoI doubt it. It happens in every tiling window manager I've used, and only ever with Firefox. Also I've seen the same issue mentioned once by a user of a normal desktop environment, who had to toggle fullscreen in Firefox to get it to update the UI after startup. But it's just another visual bug users of tiling WMs have to deal with. Many programs handle this much worse, either crashing instantly because the WM doesn't let them have their favorite hardcoded window size, or becoming unusable from epilepsy-inducing glitches. Before I went down that path I'd have never guessed UIs(both on desktop and on websites) are so damn flimsy.
- zamadatix 5y agoFWIW I've never seen this issue on Sway (can't say for others as I haven't used them).
- preek 5y agoI think that’s specific to your setup. I run Debian SID with i3 as tiling window manager and FF is the primary browser I use. As a web dev, I have quite a few instances of FF open all the time. I can’t recall an issue with FF behaving badly when tiled. So, it’s unlikely that FF generally doesn’t work with a tiling WM.
- smoldesu 5y agoFirefox is great on Linux. It kinda whoops Chrome's ass for what it provides (though Chrome on Linux is a nice experience), and Mozilla has consistently been one of the most charitable organizations towards the Linux foundation. Here's to another decade of Firefox and an open web!
- sneak 5y agoChrome's sandbox is far superior to Firefox's from a security standpoint. I think the best bet is to run Ungoogled Chromium on Linux; it's got even less telemetry than Firefox and is more secure.
- roca 5y agoWhat do you think makes Chrome's sandbox "far superior" on Linux? AFAIK they're very similar.
- sneak 5y agoThe rate at which escapes are found (and publicly disclosed) suggests to me that the Chrome sandbox is substantially more advanced than any other browser's. Perhaps there are just as many escapes being found each quarter in Chrome as the other browsers and they are just being hoarded privately but I don't find that super plausible.
- roca 5y agoWhere are you getting that data? I'm genuinely interested. FWIW I think it is probable that the IPC APIs into and out of the sandbox have been more thoroughly fuzzed and otherwise tested in Chrome than in Firefox. I don't know how that translates into actual security though.
- genghizkhan 5y agoThis is typically what I cite when people ask me about FF vs Chrome security: https://madaidans-insecurities.github.io/firefox-chromium.html https://madaidans-insecurities.github.io/firefox-chromium.ht... And here's Theo de Raadt's opinion of Firefox from back in 2018: https://marc.info/?l=openbsd-misc&m=152872551609819&w=2 https://marc.info/?l=openbsd-misc&m=152872551609819&w=2
- duhi88 5y agoI've never had an issue with it crashing on Linux, but I've had this bug for months that causes the scrollbar to jump around. Usually it jumps up 10-20px every couple of seconds. I've tried removing all plugins, refreshing, changing mice, etc. until I had to switch to Brave. Anyone else come across this issue? I'm using Solus.
- dEnigma 5y agoI haven't encountered that issue on Solus Budgie. My first thought was an issue with your mouse, but since you've ruled that out, and it apparently works for you in Brave, I'm stumped.
- heavyset_go 5y agoIt would be nice if Firefox played nicely with cgroup memory limits. Right now, Firefox will freeze, crash or freeze while swapping heavily when it starts allocating near or at the limit. Same thing with Firejail.
- nix0n 5y agoI've also seen Firefox freezing and swapping heavily when real physical RAM is depleted. I was able to reduce RAM usage by reducing the number of content processes, so that might be helpful to you also.
- heavyset_go 5y ago> I was able to reduce RAM usage by reducing the number of content processes, so that might be helpful to you also. Yeah, I dropped dom.ipc.processCount by half a while ago, but I think Fission[1] overrides that setting. [1] https://wiki.mozilla.org/Project_Fission https://wiki.mozilla.org/Project_Fission
- gsvelto 5y agoThat's a really tough problem to solve on Linux. We're actively working on it in order to make Firefox better behaved when memory gets tight but it's not easy. You can follow the work in these two bugs: https://bugzilla.mozilla.org/show_bug.cgi?id=1532955 https://bugzilla.mozilla.org/show_bug.cgi?id=1532955 https://bugzilla.mozilla.org/show_bug.cgi?id=1587762 https://bugzilla.mozilla.org/show_bug.cgi?id=1587762
- heavyset_go 5y agoThanks for the links
- johnchristopher 5y agoIt's been a long time since I have seen a firefox crash on Linux. What's killing me is the memory leak that just renders the whole computer unusable and almost frozen. Almost because if I can grab a terminal and killall firefox then I get the machine back. https://bugzilla.redhat.com/show_bug.cgi?id=1597028 https://bugzilla.redhat.com/show_bug.cgi?id=1597028 something like that, not sure about the root cause. But I don't let imgur tab with running vid opened for too long now.
- TacticalCoder 5y agoSame here... I very rarely see Firefox crashing or a tab crashing on Linux. It happens once in a very rare while that I see a tab crashing but the whole browser never crashes. Memory leaks can be bad indeed and here are two tricks that work fine for me: either run Firefox inside a Docker container... Docker container on which I put CPU and RAM quota. It's IMO way easier than try to put resources quota directly on Firefox. The other one: Firefox has zero issues reopening all my tabs, so I simply kill it from the terminal when I see that it's going wild on memory. Now I've got 16 GB and Firefox rarely eats it all and it's usually not sudden: it's a slow bleed over the course of a few days... So when I get to something like 10 GB of memory used by just one Firefox instances (I typically run several Firefox instances, from different user accounts) , I just kill it and restart it, while choosing to reopening all the tabs (usually tens of tabs). I'm sure there are other methods too but this works fine in my case so I haven't looked much into it.
- zeotroph 5y agoI also notice the mem leaks, but I can usually leave my Firefox process running until there is the next update to install. What works for me is having the `about:memory` tab open and clicking on "Minimize memory usage" at the end of the day when I suspend the machine. And, I have a lot of tabs and windows open, strewn over various virtual desktops. Though most tabs are not loaded but more expensive bookmarks, but I have no add-on which actively unloads tabs.
- timbit42 5y agoHave you tried the "Auto Tab Discard" addon?
- MrRed 5y agoCongrats on shipping Gabriele and all LLT team and colleagues :)
- Barrin92 5y ago>"When it comes to Linux things work differently than on other platforms: most of our users do not install our builds, they install the Firefox version that comes packaged for their favourite distribution. This posed a significant problem when dealing with stability issues on Linux: for the majority of our crash reports, we couldn’t produce high-quality stack traces because we didn’t have the required symbol information. The Firefox builds that submitted the reports weren’t done by us. To make matters worse, Firefox depends on a number of third-party packages (such as GTK, Mesa, FFmpeg, SQLite, etc.). We wouldn’t get good stack traces if a crash occurred in one of these packages instead of Firefox itself because we didn’t have symbols for them either. To address this issue, we started scraping debug information for Firefox builds and their dependencies from the package repositories of multiple distributions: Arch, Debian, Fedora, OpenSUSE and Ubuntu. Since every distribution does things a little bit differently, we had to write distro-specific scripts that would go through the list of packages in their repositories and find the associated debug information" This is why I'm glad that a lot of Linux software is moving towards distro agnostic containerized applications maintained by developers. Linux already does not have a large market share and if you have to deal with a dozen distro-specific quirks it seems hardly economical.
- timbit42 5y agoSnap, Flatpak and AppImage all suck! Fix this first.
- deleted 5y ago[deleted]
- AnIdiotOnTheNet 5y agoUnfortunately they are solutions designed for a platform and ecosystem with a lot of suck built-in. For my money, AppImage has the most sane approach, but without support from the wider community they are still a bit of a pain.
- bogwog 5y agoI don't know what you're talking about, AppImage is great!
- nathias 5y agoI've been using firefox nightly on arch linux for 5 years, never had an issue (except some changes that broke my customization).
- justaguy88 5y agoDoes firefox provide an official appimage?
- sylvestre 5y agoNope but snap and flatpak are provided: https://snapcraft.io/firefox https://snapcraft.io/firefox https://flathub.org/apps/details/org.mozilla.firefox https://flathub.org/apps/details/org.mozilla.firefox
- ComputerGuru 5y agoIf anyone from Mozilla is reading this: the thumbnails are unreadable but can't be clicked to open the full-size image in a lightbox or new tab.
- nyanpasu64 5y agoHow do you extract symbols from official binary builds of Arch? According to official documentation (https://wiki.archlinux.org/title/Debug_-_Getting_Traces https://wiki.archlinux.org/title/Debug_-_Getting_Traces and bug report threads I've seen), Arch lacks both debug packages and symbols bundled with binary packages. As a result, if you want to debug an app crash on Arch, you need to quit the program, recompile the app from source with your makepkg.conf set to !strip, then try to reproduce the bug in your new build. It seems Firefox has a script at https://github.com/gabrielesvelto/symbol-scrapers/blob/master/arch/script.sh https://github.com/gabrielesvelto/symbol-scrapers/blob/maste..., but I haven't investigated what it does. In any case, this information should be integrated into the Arch Wiki.
- gsvelto 5y agoOnly public symbols and unwinding information is extracted from Arch packages because they don't have debuginfo like other distros. It's better than nothing.
- nyanpasu64 5y agoWell that's unfortunate to hear :( Hoping Arch can fix releasing debug symbols for official binary builds soon... but I don't expect it to happen soon. Also how does unwinding info help during debugging? Does gdb use it? Do I need special reverse-engineering tools to extract useful information?
- gsvelto 5y agoArch already uploads symbols for their Firefox builds so that's OK, it's the dependencies that are missing. Unwinding information is used to produce accurate stacks. If it's lacking our unwinder has to rely on heuristics to discover the frames on the stack and those might end up producing suboptimal traces.
- pabs3 5y agoWonder if they sent those Breakpad improvements back to Google.
- sylvestre 5y agoyeah, see https://github.com/google/breakpad/graphs/contributors https://github.com/google/breakpad/graphs/contributors luser was contributing as Mozilla staff, Gabriele is too. And a bunch of others folks (I counted 3 more)
- bergheim 5y agoTangeltial, but for me firefox on linux is rock solid. A good while ago as a halfway test I stopped closing tabs to see how ff would perform. Up to around 5500 tabs now, daily driver, amassing my own personal internet so still using old tabs, still not a single crash! Although new tabs starts feeling like they would be quicker to open with 5490 other tabs less. Who knew. I guess my biggest finding is that tab and history search suck. Half of what I end up searching for is one of my tabs. I wonder why..