NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.44k stars 13.64k forks source link

Firefox "restart required"; "Sorry. We just need to do one small thing to keep going." #96708

Open deliciouslytyped opened 4 years ago

deliciouslytyped commented 4 years ago

When I try to load file:/// and any subpath I get the following: image

Other pages work normally.

For search engines, here is thet text:

Sorry. We just need to do one small thing to keep going.

Firefox has just been updated in the background. Click Restart Firefox to complete the update.

We will restore all your pages, windows and tabs afterwards, so you can be on your way quickly.

Restart required is the page title.

This is especially odd because firefox can't and won't autoupdate on NixOS.

JJJollyjim commented 4 years ago

On other distros, I get this notification when I update firefox in the system package manager, while firefox is running. This overwrites the firefox binary, so when I open a new tab and it tries to spawn a new process, the executable to do so is incompatible.

(Firefox's autoupdater keeps the old binary around until a restart, so this is only an issue on distro-managed firefox installs).

Does restarting fix the ability to open file:/// links?

deliciouslytyped commented 4 years ago

Firefox keeps thinking of new ways to force me to restart it. I'll try it later. Even if it does work it's odd for it to happen only on some urls, and on nixos.

KamilaBorowska commented 4 years ago

This suggests a crash occurs before a tab process can notify the browser about build IDs matching (restartrequired is a crash handler).

I cannot reproduce an issue myself. Could you provide an output of nix-shell -p nix-info --run "nix-info -m" command?

deliciouslytyped commented 4 years ago
$ cat $(which rl-firefox)
#!/nix/store/b34zjdmq5l8k6rwdykjx55yl9r9isl8k-bash-4.4-p23/bin/bash
nix-shell -v -I nixpkgs=channel:nixos-unstable -p 'firefox' --run 'rl-firefox_'
$ cat $(which rl-firefox_)
#!/nix/store/b34zjdmq5l8k6rwdykjx55yl9r9isl8k-bash-4.4-p23/bin/bash
#TODO wrapper instead?
systemd-run --user --scope -p MemoryHigh=8192M firefox "$@"

I'm not sure this information is reliable because my system configuration is kind of weird.

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.3.14, NixOS, 20.03pre-git (Markhor)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.1`
 - channels(paprika): `"nixos-19.09.2496.278db005f83, unstable-20.09pre223023.fce7562cf46"`
 - channels(root): `"nixos-19.09pre190978.8d1510abfb5"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

However, per ps the current binary I'm running is /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/firefox` , so you should be able to fetch that at least.

I'm still running the broken instance, so if there's any debug info I can give you, I can do that. IDK if the problem is persistent.

deliciouslytyped commented 4 years ago

However, it turns out I can give you some stderr or whichever, these are triggered immediately on trying to load file:///;

(/nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/firefox:12751): Gtk-WARNING **: 19:14:36.971: cannot open display: :0
[Parent 28219, Gecko_IOThread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-79.0/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 19
[Parent 28219, Gecko_IOThread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-79.0/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 19
[Parent 28219, Gecko_IOThread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-79.0/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 19
[Parent 28219, Gecko_IOThread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-79.0/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 19
[Parent 28219, Gecko_IOThread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-79.0/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 19
[Parent 28219, Gecko_IOThread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-79.0/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 19

###!!! [Parent][MessageChannel] Error: (msgtype=0x390074,name=PContent::Msg_RegisterBrowsingContextGroup) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0x390002,name=PContent::Msg_ConstructBrowser) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0x390131,name=PContent::Msg_CommitBrowsingContextTransaction) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0x2100A2,name=PBrowser::Msg_SetWidgetNativeData) Channel error: cannot send/recv                                                              

###!!! [Parent][MessageChannel] Error: (msgtype=0x390131,name=PContent::Msg_CommitBrowsingContextTransaction) Channel error: cannot send/recv     

###!!! [Parent][MessageChannel] Error: (msgtype=0x21006A,name=PBrowser::Msg_InitRendering) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0x21009B,name=PBrowser::Msg_SafeAreaInsetsChanged) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0x210092,name=PBrowser::Msg_LoadRemoteScript) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0x210092,name=PBrowser::Msg_LoadRemoteScript) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0x210092,name=PBrowser::Msg_LoadRemoteScript) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0x210092,name=PBrowser::Msg_LoadRemoteScript) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0x210092,name=PBrowser::Msg_LoadRemoteScript) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0x210066,name=PBrowser::Msg_Show) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0x21006E,name=PBrowser::Msg_UpdateDimensions) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0x210092,name=PBrowser::Msg_LoadRemoteScript) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0x210094,name=PBrowser::Msg_SetDocShellIsActive) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0xB9000D,name=PWindowGlobal::Msg_RawMessage) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0x210001,name=PBrowser::Msg_AsyncMessage) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0x21004E,name=PBrowser::Msg_UpdateEpoch) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0x210001,name=PBrowser::Msg_AsyncMessage) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0x210054,name=PBrowser::Msg_UpdateEffects) Channel error: cannot send/recv

(/nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/firefox:12758): Gtk-WARNING **: 19:14:38.212: cannot open display: :0

[Parent 28219, Gecko_IOThread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-79.0/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 19
[Parent 28219, Gecko_IOThread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-79.0/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 19
[Parent 28219, Gecko_IOThread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-79.0/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 19
[Parent 28219, Gecko_IOThread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-79.0/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 19
[Parent 28219, Gecko_IOThread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-79.0/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 19
[Parent 28219, Gecko_IOThread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-79.0/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 19

It "looks" unrelated though. I mean, obviously it's being displayed on my screen.

KamilaBorowska commented 4 years ago

If I had to guess, your home folder permissions are broken in some way (maybe as a result of running a graphical application with sudo). Firefox displays "restart required" message as the communication channel doesn't work (it is being used to send a message about matching build IDs).

Try using the following command to find files not owned by you:

find ~ '!' -user $USER
deliciouslytyped commented 4 years ago

No results for that.

deliciouslytyped commented 4 years ago

I started tor-browser to, well, not really rule out anything in the concrete, but if it's some sort of system level issue I'd expect it to be affected as well - and yeah, an instance of tor-browser-bundle-bin is also broken by this issue. I would expect it to be relatively isolated from random things?

deliciouslytyped commented 4 years ago

I have zero real idea what's actually going on, but my wild guess is either the (/nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/firefox:12751): Gtk-WARNING **: 19:14:36.971: cannot open display: :0 error, or whatever is causing that error, crashes a tab, and then the other errors about failures to communicate with that tab. On the other hand, didn't firefox have a different UI for when a tab crashes? So I don't think that`s correct.

KamilaBorowska commented 4 years ago

Restart required is a crash message that occurs when a process doesn't send a notification about build IDs matching (which likely occurs after opening X display). This can be seen in Firefox's source code.

deliciouslytyped commented 4 years ago

Ah. Ok that's somewhat clearer to me. You might as well link the code if you found it? Why are headless processes even trying to open the display? and why is it failing? Or is it that the individual processes try to render directly to the parent window instead of unnecessarily passing stuff around? It doesn't really matter though I guess, question is what's breaking it.

(I wrote the following before I properly understood what you said, so it's just some extra info now: Everything I have running is from the same derivation, and has the same "parent build id" flag, per ps;

17173 /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/firefox -contentproc -parentBuildID 20200820003804 -prefsLen 10067 -prefMapSize 228090 -appdir /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/browser 28219 rdd
20134 grep firefox
28023 /nix/store/b34zjdmq5l8k6rwdykjx55yl9r9isl8k-bash-4.4-p23/bin/bash /etc/profiles/per-user/paprika/bin/rl-firefox
28218 /nix/store/b34zjdmq5l8k6rwdykjx55yl9r9isl8k-bash-4.4-p23/bin/bash /etc/profiles/per-user/paprika/bin/rl-firefox_
28219 /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/bin/.firefox-wrapped
28712 /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 228090 -parentBuildID 20200820003804 -appdir /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/browser 28219 tab
28839 /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 262 -prefMapSize 228090 -parentBuildID 20200820003804 -appdir /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/browser 28219 tab
28855 /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 262 -prefMapSize 228090 -parentBuildID 20200820003804 -appdir /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/browser 28219 tab
28876 /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 262 -prefMapSize 228090 -parentBuildID 20200820003804 -appdir /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/browser 28219 tab
28897 /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/firefox -contentproc -childID 5 -isForBrowser -prefsLen 262 -prefMapSize 228090 -parentBuildID 20200820003804 -appdir /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/browser 28219 tab
28918 /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/firefox -contentproc -childID 6 -isForBrowser -prefsLen 262 -prefMapSize 228090 -parentBuildID 20200820003804 -appdir /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/browser 28219 tab
28939 /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen 262 -prefMapSize 228090 -parentBuildID 20200820003804 -appdir /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/browser 28219 tab
28966 /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/firefox -contentproc -childID 8 -isForBrowser -prefsLen 262 -prefMapSize 228090 -parentBuildID 20200820003804 -appdir /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/browser 28219 tab
29051 /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/firefox -contentproc -childID 9 -isForBrowser -prefsLen 262 -prefMapSize 228090 -parentBuildID 20200820003804 -appdir /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/browser 28219 tab
29890 /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/firefox -contentproc -childID 10 -isForBrowser -prefsLen 6591 -prefMapSize 228090 -parentBuildID 20200820003804 -appdir /nix/store/2xhs6qbip2j1sdhqpl0iaw11r4jfl32d-firefox-unwrapped-79.0/lib/firefox/browser 28219 tab

Someone told me the only way they have been able to fix this issue is with a machine restart, so it can't be a matter of the running firefox processes? I.e. the issue must be with the communication? This would also fit with the fact that my tor is also broken.)

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

KamilaBorowska commented 3 years ago

This may happen due to #31189.