Hacker News new | past | comments | ask | show | jobs | submit login

Whenever Firefox is automatically updated through my package manager, any open instances refuse to load any new pages or tabs until I restart Firefox . Needless to say, this is absolutely infuriating when I'm in the middle of something important. Does anyone know how to disable this feature?

This change was made because opening a new tab or loading a new page can start a new renderer process. The way things work right now is that this is started by running the on-disk renderer process executable.

If you've updated your installation, the new renderer will be the new version, but the parent (ui) process is still the old version. The protocol the two use to talk to each other is not fixed, and messages will start looking malformed. Malformed messages are handled by immediately terminating the process, because otherwise security guarantees go out the window.

So the upshot was that you'd get various crashes in the "I updated Firefox and then kept using it" situation. I've run into a bunch personally, and there is _lots_ of crash reporting data on this. The crashes are not OS-specific; they just have to do with whether changes happened to the IPC protocol.

A "proper" solution would be for the parent process to not use the on-disk version of the renderer to launch new renderers. There's work ongoing to make that possible, but in the meantime the crash volume due to this problem was high enough that the mitigation you see was put in place.

Couple things.

1. Why update an app when you're in the middle of using the app? I dunno, I use Fedora, so I don't execute 'dnf update' until I'm ready to reboot the system, usually because I'm anticipating a kernel update. 2. Firefox has a pretty reliable "Restore Previous Session" feature that works well. I have also been known to throw a SIGTERM at Firefox and just let it prompt me when I start it again for the "Something went wrong, should we restore your session?". Seems to always work for me.

>Why update an app when you're in the middle of using the app?

Updates are automatic every day.

>I use Fedora, so I don't execute 'dnf update' until I'm ready to reboot the system, usually because I'm anticipating a kernel update

How often does that happen? It doesn't seem reasonable to put off security updates that have already been fixed and are simply waiting to install.

Firefox is the only program I've run into where automatic updates have led to a negative experience. Every single other program handles them just fine.

The reason it’s different is that it (like Chromium) runs a multi-process sandbox to try to isolate your system from vulnerabilities in the JS runtime or renderer. It’s possible to handle updates while new tabs are created gracefully in that case, but far from trivial.

Some people prefer automatic updates. It didn't used to criple the running browser process after an update, that change is very recent.

Restore session doesn't help if you're in a private session.

Also you may be in the middle of actually using your browser for thing that you don't want to interrupt, a game, an online application, anything really..

It's only in parts recent. Updating Firefox did not have this enforcing message telling you to restart, but before Firefox would just randomly break when updated via the package manager. Preventing that is better now.

Don't do automatic updates if you do not want automatic updates. Automatic updates just absolutely can cause you to have to restart stuff, depending on what got updated exactly.

> I use Fedora, so I don't execute 'dnf update' until I'm ready to reboot the system

I haven't rebooted my system in days, and I make updates twice a day...

Uninstall the distro provided Firefox and use the binary produced by Mozilla. It downloads its own updates in the background and applies the next time you quit and relaunch.

Snap and Flatpak apps I think can do this as well, because they aren't stepping on the running binaries during the update. And you get the updated version when you relaunch.

Firefox isn't special in this regard. 100% of my applications on Windows and macOS expect to be quit before they can be updated, and is enforced either by the application, the OS, or the updater. I suspect that distro package managers don't really have a way to do an out of band update, all they can do is step all over in-use libraries and that inevitably causes the application to go a little crazy.

It's not a feature and you can't disable it, previously it'd just crash. I think it's to do with the content workers being `exec`d from disk each time instead of forking from a master.

It's never crashed on unix for me after an update. Sounds like a Windows problem however.

It used to crash under Linux, when you updated it while it was running, and then opened new window or a tab. Now it shows a message that you need to restart.

Has never crashed on update for me, at least that I can remember after ten years. I have seen the warning message, that arrived years ago however.

I'll add the caveat that I typically restart my browser at least once a day, perhaps avoids the problem.

It wasn't immediately after update. It was after you updated it while it was running and then you tried something, that triggered the crash (like opening a new tab).

Later it stopped to crash, but acted weirdly (clicks on links didn't work, etc).

Nowadays we have the notice to restart the browser. It didn't arrive years ago, just a few releases ago.

This was only under Linux, and only with the distro package managers. Under Windows or MacOS, the updater updates the browser on next restart, so this didn't happen.

Yep, understand that.

I restart my browser at most once per week and Firefox has never crashed for me after an update. I do not doubt that there was a risk that it could happen, but it cannot have been that common unless I was very lucky.

It was sometimes worse than crashing, and silently going unresponsive after an update. Only a SIGKILL would close that instance.

As mentioned, never happened to me, or colleagues within earshot.

Maybe there was some edge case where it could crash, but for me it always used to work.

Also a little stumped by this choice. It didn't used to be this way even just a month or two ago.

Quite inconvenient.

Finally I find another person getting annoyed at this. It baffles me how this is acceptable...

My browser is open when my computer is running. I do updates at random times through-out the day, for example before installing new packages. Having to close my browser leads to dead sessions and text being lost from input fields and whatever other state there might be.

My guess is that this is some per-tab isolation/process stuff that would result in a mismatch between tabs from before the update and tabs after the update.

I always ran into this, but I noticed yesterday when I upgraded Firefox (from 64 to 65, bit behind I guess), it didn't do the crashing on new tabs thing. Maybe they sorted that out finally.

As others may have mentioned, it's because the binaries are overwritten. But Ubuntu used to ship a plugin with their builds, xul-ext-ubufox, that would detect this and prompt for restart on upgrade, but for some reason it's disabled now according to the package description:

  This package currently ships no functionality, but may be used again in
  the future to display a restart notification after upgrading Firefox.

Which OS / package manager are you using? I haven't noticed this behaviour on my Linux (Kubuntu) or macOS installs -- both Firefox Dev Edition though.

Under linux with apt/dnf. These package managers update Firefox while it is running.

On MacOS or Windows (maybe even Linux with the Mozilla updater, never tried it), the updater does the update on the next restart.

Exactly. The package manager method of updating stomps on the in-use libraries for the running application. The built-in Mozilla updater knows better, downloads an update payload but doesn't apply it until the user relaunches and on "first run" it actually does the update rather than launching, and after that completes it launches the updated application. It's the same on macOS, Windows, and Linux.

Chrome on macOS and Windows keeps itself up to date; for whatever reason Chrome on Linux installs a google.chrome repository, uses the distro package manager, and clobbers the running binary. shrug

> The package manager method of updating stomps on the in-use libraries for the running application.

This is not a problem on Unix-like systems, actually. Any running process, that has some file open, will keep the original file open, even if the filename points to another file now. Only processes that open the file after the change will get the new version.

I suspect that the protocol that multiple processes of Firefox used to communicate together could change between version and the mismatch between old and newly launched processes caused the problem. So it is versioned now, and if the versions are mismatched, warning is being shown.

> for whatever reason Chrome on Linux installs a google.chrome repository, uses the distro package manager, and clobbers the running binary

As others have said, it is actually the right approach. The custom updaters for Firefox and Chrome under Windows and MacOS are there, because they are lacking any system for centralized package management.

Flatpak solves this in a third way: it doesn't clobber the current tree, it creates a new, separate one and signals the application, that it was updated, and can restart into a new version, when it is convenient. It gets the best of the custom windows/mac updaters (not overwriting running apps), together with the best of linux package managers (centralized management).

> for whatever reason Chrome on Linux installs a google.chrome repository, uses the distro package manager

Because that's the proper way to do things instead of each application bypassing the package manager and downloading updates and whatever else behind your back. How would you track and control updates if each application you use decided to do its own thing? Secondly, if installed to system directories, applications cannot write there without superuser privileges.

Ubuntu 18.10 using APT.

Unlike Chrome, Firefox makes it easy to disable automatic updates.

They removed the "never check for updates" option and nag nag nag to update.

I unintentionally updated multiple times when the nag menu conveniently appeared while I was pressing the keyboard.

The last accident made me firewall Firefox's update program.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact