Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tor-browser crashes opening about:support and shows "Gah! tab crashed" (nixos-20.03) #86356

Closed
unode opened this issue Apr 29, 2020 · 7 comments · Fixed by #93154
Closed

tor-browser crashes opening about:support and shows "Gah! tab crashed" (nixos-20.03) #86356

unode opened this issue Apr 29, 2020 · 7 comments · Fixed by #93154
Labels
0.kind: bug Something is broken

Comments

@unode
Copy link
Member

unode commented Apr 29, 2020

Describe the bug
After upgrading to nixos-20.03 and enabling pulseaudio support I started experiencing the "Gah! tab crashed" error too often, to the point that browsing sites with certain types of embedded media (mostly audio/video) instantly triggers the error (e.g browsing https://www.washingtonpost.com/).

While troubleshooting this I also noticed that opening about:support crashes not the tab but the browser. On the console I can see:

(...)
Apr 29 20:44:27.000 [notice] Bootstrapped 100% (done): Done
Apr 29 20:44:28.000 [notice] New control connection opened.
Apr 29 20:44:28.000 [notice] New control connection opened.
Fontconfig warning: "/nix/store/hj7n3mgfbs413mjcap0xyh29wy4ff84n-tor-browser-bundle-bin-9.0.9/share/tor-browser/TorBrowser/Data/fontconfig/fonts.conf", line 145: blank doesn't take any effect anymore. please remove it from your fonts.conf
Fontconfig warning: "/nix/store/hj7n3mgfbs413mjcap0xyh29wy4ff84n-tor-browser-bundle-bin-9.0.9/share/tor-browser/TorBrowser/Data/fontconfig/fonts.conf", line 145: blank doesn't take any effect anymore. please remove it from your fonts.conf
fatal allocator error: invalid uninitialized allocator usage
Redirecting call to abort() to mozalloc_abort

Exiting due to channel error.
Apr 29 20:44:32.000 [notice] Owning controller connection has closed -- exiting now.
Apr 29 20:44:32.000 [notice] Catching signal TERM, exiting cleanly.
zsh: segmentation fault (core dumped)  tor-browser

This crash is present with default options (i.e. mediaSupport = false and pulseaudioSupport = false).

In addition, after several crashes Tor asks to start in "Safe mode". I'm not sure what safe mode disables but it allows opening about:support without crashing and/or triggering the segfault.

This seems to hint at some interaction with external libraries and my assumption that this is somehow related to pulseaudio.

To Reproduce
Steps to reproduce the behavior:

  1. nix-env -iA tor-browser-bundle-bin
  2. tor-browser
  3. In the URL about:support
  4. browser will crash

Notify maintainers
@offlinehacker @matejc @doublec @thoughtpolice @joachifm @hax404 @scaredmushroom

Metadata

% nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.6.7, NixOS, 20.03.git.034f307a86c (Markhor)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.4`
 - channels(root): `"nixos-20.09pre217261.a2e06fc3423"`
 - nixpkgs: `/var/nixpkgs-channels/nixos

The following expression was used to enable mediaSupport and puseaudioSupport:

(...)
    torbrowserWithAudio = pkgs.torbrowser.override {
      mediaSupport = true;
      pulseaudioSupport = true;
    };
(...)

and installed with nix-env -iA torbrowserWithAudio.

@unode unode added the 0.kind: bug Something is broken label Apr 29, 2020
@joachifm
Copy link
Contributor

joachifm commented May 4, 2020

Can you try with override useHardenedMalloc = false?

@unode
Copy link
Member Author

unode commented May 4, 2020

This helps.

On a quick test I didn't see any "Gah! Tab crashed" error and about:support works fine.

@joachifm
Copy link
Contributor

joachifm commented May 4, 2020

It should be off by default then, it used to work :(

@unode
Copy link
Member Author

unode commented May 4, 2020

Could this be triggered by a missing or mismatched library?
I also only started noticing this after enabling pulseaudio system-wide. If this helps diagnosing the issue...

@joachifm
Copy link
Contributor

joachifm commented May 4, 2020

I think it's simply because the firefox jemalloc is incompatible with the hardened allocator. firefox has to be built with --disable-jemalloc for that to work. I wonder why this appears to have worked before; maybe the tbb build has changed.

Relevant mailing list thread here (fair warning: it turns into a not-so-productive exchange after a few messages): https://lists.torproject.org/pipermail/tor-dev/2019-August/013982.html

@joachifm
Copy link
Contributor

joachifm commented May 4, 2020

I think that at this point it'd be appropriate to revert the commit that added hardened alloc support, with a note as to why, maybe opening an issue to track work (if anyone cares) to make hardened malloc work with tbb/firefox.

@unode
Copy link
Member Author

unode commented May 5, 2020

I'm not into the differences/advantages of each allocator.

In this case I have the user hat on and unless there's a critical aspect of relevance I'm happy to trade that in favour of a functional browser.

Lassulus added a commit to Lassulus/nixpkgs that referenced this issue Jul 14, 2020
this seems to cause crashes with certain tabs.
relevant issue: NixOS#86356
Lassulus added a commit that referenced this issue Jul 25, 2020
* tor-browser: disable hardening by default

this seems to cause crashes with certain tabs.
relevant issue: #86356

* Update pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix

Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
worldofpeace pushed a commit that referenced this issue Sep 8, 2020
* tor-browser: disable hardening by default

this seems to cause crashes with certain tabs.
relevant issue: #86356

* Update pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix

Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
(cherry picked from commit 45e2ff3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants