Nixpkgs: Chromium update on NixOS 17.09 breaks Ctrl-C (copy)

Created on 18 Mar 2018  Â·  21Comments  Â·  Source: NixOS/nixpkgs

Issue description

Since commit 27c57b03325e644d548975a210f9ffa2463984a6 (chromium: 64.0.3282.186 -> 65.0.3325.146) and ae0b65aacc6ae35c8920aac0bde8445a60f4e623 (Merge pull request #36690 from YorikSar/fix-chromium-build), I can no longer copy text (Ctrl-C or right-click and select "copy") in Chromium. Pressing Ctrl-C results in this error from Chromium:

  Aw, snap!
  Something went wrong while displaying this webpage.

Steps to reproduce

  1. Rebuild system on recent NixOS 17.09 channel.
  2. Open a webpage in Chromium.
  3. Select some text.
  4. Press Ctrl-C (or right-click and select "copy").
  5. See the following error message:
    Aw, snap!
    Something went wrong while displaying this webpage.

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.9.86, NixOS, 17.09.git.ae0b65a (Hummingbird)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 1.11.16
  • channels(root): "nixos-17.09.3149.ae0b65aacc6"
  • channels(bfo): ""
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs
bug regression

Most helpful comment

OK, the Chromium behaviour is just crazy.

Updated the test to actually fail in that case (argh… NixOS tests have a painful amount of overhead).

No idea which difference causes the crash, though…

All 21 comments

Same issue here, I thought it's something with my extensions - but couldn't figure out what. Good to know I'm not the only one.

On a side note, copying inside a form or similar editable element usually works(e.g. I can copy the text I'm typing right now), as does pasting.

I removed all extensions (chrome://extensions is empty). The issue persists.

Also ran into this. The error message from running in a terminal is:

[21862:21862:0318/193843.502490:ERROR:validation_errors.cc(76)] Invalid message: VALIDATION_ERROR_UNEXPECTED_NULL_POINTER (null field 3)
[21862:21862:0318/193843.502513:ERROR:render_process_host_impl.cc(4140)] Terminating render process for bad Mojo message: Received bad user message: Validation failed for ClipboardHost RequestValidator [VALIDATION_ERROR_UNEXPECTED_NULL_POINTER (null field 3)]
[21862:21862:0318/193843.502533:ERROR:bad_message.cc(25)] Terminating renderer for bad IPC message, reason 123

Minimal configuration to reproduce: https://gist.github.com/add94e53d01ee7db93a2a2e441760322

I can confirm that this issue is happening for me, too.

at this point, I'm probably stating the obvious, but breaks here as well. Clean installation.

EDIT: also crashes when the copy to clipboard gets initialized through js

I confirm aswell, experiencing the same issue.
I updated my nixpkgs channel to 18.03 and installed the last chromium to fix it.

nix-channel --add https://nixos.org/channels/nixpkgs-18.03-darwin nixpkgs
nix-env -iA nixpkgs.chromium

Same issue here on 17.09. Before I saw this issue on Github, I filed a bug report upstream:
https://bugs.chromium.org/p/chromium/issues/detail?id=823804

However, I hadn't realized that this seems to be a NixOS-specific issue nor had I realized that nixpkgs applies a bunch of patches on top of Chromium. So I am guessing that this is probably some broken patch on nixpkgs and that the upstream bug report will be ignored.

cc @bendlas and @7c6f434c, who seem to be the authors of the commits that @bjornfor mentioned.

Hm, you could also cc the author of the actual PR @YorikSar (if a package doesn't build before and builds after I accept any amount of _upstream_ commit cherry-picking without going into details)

@7c6f434c thanks for the ping

As far as I remember, all those patches were fixing gcc 7.3 issues. As I understand, only beta (or even dev) should be ready for gcc 7.3. We can either try to use older GCC or look for even more patches from bleeding edge of the master branch.

Unfortunately I won't be able to work on this in coming several days, so if anyone is up for it, please go ahead and try this.

And for the record: copying works for me. (I am not saying it is not broken on other systems, but it is not universally broken)

Judging by comment on the upstream issue, there must be some fix that needs backporting.

By the way, I think tests.chromium NixOS test uses Ctrl-c to copy the sandbox information. Does Ctrl-a Ctrl-c fail when used on chrome://sandbox? Does the NixOS test fail?

(works for me on master)

Also, the Chromium test passes in the revision mentioned in the PR description, so I assume that Ctrl-c in Chromium doesn't always crash the tab even with that specific revision.

OK, the Chromium behaviour is just crazy.

Updated the test to actually fail in that case (argh… NixOS tests have a painful amount of overhead).

No idea which difference causes the crash, though…

In a duplicate issue @Mic92 has suggested enabling core dumps and using gdb to look at the backtrace: https://github.com/NixOS/nixpkgs/issues/38464#issuecomment-378966188

Strange, I also had this problem and I now use NixOS 18.03 and it solves my problem.
I don't know if I did something else.

No idea as to why but switching the build to compile with gcc7 (the default on 17.09 is gcc6) seems to fix this for me (or at least I can no longer reproduce it easily). Ran the test as well and that passes too.

@pbogdan Thanks. Interesting, and makes some sense — a restrictive sandbox might assume that there is no reason to do X where X is the default output of gcc6 and gcc7 has another approach.

Given the impeding ending life of 17.09 I am unlikely to commit a fix like that myself, and also very likely to merge such a PR if pinged.

I don't know whether that helps, but I'm using the clipboardmanager parcellite. Mayber there is some connection there?

I don't use any clipboardmanager (that I'm aware of), and I was affected.

Anyway, this should be fixed now that 152a6d0c02b777c1ade54ba8e270ff8bdfd577d0 ("chromium: build with gcc7") is in the NixOS 17.09 channel.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

edolstra picture edolstra  Â·  3Comments

ghost picture ghost  Â·  3Comments

tomberek picture tomberek  Â·  3Comments

langston-barrett picture langston-barrett  Â·  3Comments

lverns picture lverns  Â·  3Comments