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: startup failure when running under KDM #20157

Closed
bendlas opened this issue Nov 4, 2016 · 15 comments
Closed

tor-browser: startup failure when running under KDM #20157

bendlas opened this issue Nov 4, 2016 · 15 comments
Labels
0.kind: regression Something that worked before working no longer

Comments

@bendlas
Copy link
Contributor

bendlas commented Nov 4, 2016

Issue description

On startup, tor-browser fails with

% /nix/store/v58aj73h1hckgmqs1xjhghm66jnx2rna-tor-browser-6.0.5/bin/tor-browser       
No protocol specified
Error: cannot open display: :0.0

Technical details

Related

#17750
cc @rqcy @joachifm @ng-0

@NeQuissimus NeQuissimus added 0.kind: regression Something that worked before working no longer 9.needs: community feedback labels Nov 4, 2016
@joachifm
Copy link
Contributor

joachifm commented Nov 4, 2016

I'm unable to reproduce this (EDIT: on a basic i3 based config).

@joachifm
Copy link
Contributor

joachifm commented Nov 8, 2016

@bendlas I don't know what to do about this, without more information. Can you elaborate?

@bendlas
Copy link
Contributor Author

bendlas commented Nov 8, 2016

Hm, I've worked around the problem with an FHSEnv to run the official tor-browser binary.
I'll try to get some useful debug info out of our tor-browser and also will try on our gnome and kde ...

@bendlas
Copy link
Contributor Author

bendlas commented Nov 8, 2016

Here is the tail of the systrace

socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 4
connect(4, {sa_family=AF_UNIX, sun_path=@"/tmp/.X11-unix/X0"}, 20) = 0
getpeername(4, {sa_family=AF_UNIX, sun_path=@"/tmp/.X11-unix/X0"}, [124->20]) = 0
uname({sysname="Linux", nodename="nitox", ...}) = 0
access("/home/herwig/.torbrowser4/.Xauthority", R_OK) = -1 ENOENT (No such file or directory)
fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])
writev(4, [{iov_base="l\0\v\0\0\0\0\0\0\0\0\0", iov_len=12}, {iov_base="", iov_len=0}], 2) = 12
recvfrom(4, 0x7ffff6968380, 8, 0, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}], 1, -1)    = 1 ([{fd=4, revents=POLLIN|POLLHUP}])
recvfrom(4, "\0\26\v\0\0\0\6\0", 8, 0, NULL, NULL) = 8
recvfrom(4, "No protocol specified\n\0\0", 24, 0, NULL, NULL) = 24
write(2, "No protocol specified\n", 22No protocol specified
) = 22
shutdown(4, SHUT_RDWR)                  = 0
close(4)                                = 0
write(2, "Error: cannot open display: :0.0"..., 33Error: cannot open display: :0.0
) = 33
exit_group(1)                           = ?
+++ exited with 1 +++

Looks like X server doesn't like what tor-browser is sending in the writev(4 .. and responds with that error message. Let me check on other desktops ...

@bendlas
Copy link
Contributor Author

bendlas commented Nov 8, 2016

Problem is also present on KDE, as well as Gnome3. That would leave the X server, right?

$ X -version

X.Org X Server 1.18.4
Release Date: 2016-07-19
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.14.58 x86_64
Current Operating System: Linux nitox 4.8.6 #1-NixOS SMP Mon Oct 31 11:26:46 UTC 2016 x86_64
Kernel command line: BOOT_IMAGE=(hd0,msdos1)//kernels/rjzmvkd8amck704qmgykfp8ipxjgr6cs-linux-4.8.6-bzImage systemConfig=/nix/store/hs5r9wcynrwfxivz9xv05pm512zg2y9s-nixos-system-nitox-17.03-pre-7f94dc15cc5f2ae7 init=/nix/store/hs5r9wcynrwfxivz9xv05pm512zg2y9s-nixos-system-nitox-17.03-pre-7f94dc15cc5f2ae7/init loglevel=4 nomodeset resume=UUID=b3254264-6843-4eed-b817-81f692d2ca07
Build Date: 26 October 2016  10:08:19PM

Current version of pixman: 0.34.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.

With a recent unstable update, I had gdm refuse to start (hence switched to kdm). I put that down to gdm 3.22 and incomplete wayland support, but maybe it's also related to this ...

I'll give it a try with a VM straight from current unstable-channel

@bendlas
Copy link
Contributor Author

bendlas commented Nov 8, 2016

Ooh, it happens with KDM

@bendlas bendlas changed the title tor-browser: startup failure tor-browser: startup failure when running under KDM Nov 8, 2016
@bendlas
Copy link
Contributor Author

bendlas commented Nov 8, 2016

So .. when running sessions with lightdm, sddb, slim and gdm, tor-browser works. I can reproduce the failure in a vm with this profile:

{ config, pkgs, ... }:
{
  users.extraUsers.root.password = "123";
  users.extraUsers.vm.password = "123";
  users.extraUsers.vm.isNormalUser = true;
  users.mutableUsers = false;
  networking.hostName = "vm";
  environment.systemPackages = with pkgs; [
    torbrowser
  ];

  services.xserver = {
    enable = true;
    layout = "us";
    xkbOptions = "eurosign:e";
    displayManager.kdm.enable = true;
    desktopManager.xterm.enable = true;
  };
}

@joachifm
Copy link
Contributor

joachifm commented Nov 8, 2016

@bendlas interesting. Thanks for all the info, looks like this narrows it down fairly well. Regrettably, I'm none the wiser :)

@bendlas
Copy link
Contributor Author

bendlas commented Nov 8, 2016

Here is a diff of the nix-store -qR .. of both vms. http://hastebin.com/miwazehera.diff
There isn't much to go on. Those etc dirs are equal, content-wise.
Strange thing is: the official version works in an FHSUserEnv

@bendlas
Copy link
Contributor Author

bendlas commented Nov 8, 2016

Hmm .. apparently KDM has been discontinued in favor of SDDM. Maybe we don't even want to fix this breakage and instead get rid of KDM?

@joachifm
Copy link
Contributor

@bendlas in general, I'm inclined towards removing stuff, so that gets my vote.

@joachifm joachifm removed their assignment Dec 27, 2016
@lverns
Copy link
Contributor

lverns commented Jan 15, 2017

Just thought I'd mention that this also effects my 16.09 install of NixOS.

@lverns
Copy link
Contributor

lverns commented Jan 16, 2017

Found a workaround here. Running XAUTHORITY="$HOME/.Xauthority" tor-browser should work just fine.

@flosse
Copy link
Contributor

flosse commented Mar 7, 2017

I can reproduce it (running awesome + kdm) :-\

@joachifm
Copy link
Contributor

The wrapper now sets defaults.

joachifm added a commit that referenced this issue Apr 19, 2019
thomasjm pushed a commit to codedownio/nixpkgs that referenced this issue Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: regression Something that worked before working no longer
Projects
None yet
Development

No branches or pull requests

5 participants