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

xcffib fails to update under NixOS #150

Open
Thlr opened this issue Feb 13, 2023 · 4 comments
Open

xcffib fails to update under NixOS #150

Thlr opened this issue Feb 13, 2023 · 4 comments

Comments

@Thlr
Copy link

Thlr commented Feb 13, 2023

Hi,

Lately (I believe it's been a week), I haven't been able to update my system because of a build error (supposedly) from your repository. Here are the logs I'm getting :

error: builder for '/nix/store/b5vg4gcqqszwrmh694sms6zmka692rrs-python3.10-xcffib-1.1.2.drv' failed with exit code 1;
       last 10 log lines:
       > _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
       > _XSERVTransMakeAllCOTSServerListeners: server already running
       > (EE)
       > Fatal server error:
       > (EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)
       > =========================== short test summary info ============================
       > FAILED test/test_python_code.py::TestXcffibTestGenerator::test_XcffibTest_generator - AssertionError: couldn't connect to xvfb
       > ERROR test/test_connection.py::TestConnection::test_wrap - AssertionError: couldn't connect to xvfb
       > ==================== 1 failed, 36 passed, 1 error in 48.29s ====================
       > /nix/store/3yfs41f4b60jya2gk6xikx4s97zsxjr0-stdenv-linux/setup: line 1573: pop_var_context: head of shell_variables not a function context
       For full logs, run 'nix log /nix/store/b5vg4gcqqszwrmh694sms6zmka692rrs-python3.10-xcffib-1.1.2.drv'.
error: 1 dependencies of derivation '/nix/store/9689gb58p74cvhrrv282lkpsmc7lx76k-python3.10-qtile-0.22.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/3wvnj4mi57n9xwrzpvzdzraccay43hk3-qtile-0.22.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/61qa4k72v8jr9090cv8g10w922a08ihk-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/sh8ylcsv16m5ipn1m4p1vb1c84hn8vj0-xsession.drv' failed to build
error: 1 dependencies of derivation '/nix/store/1bm31kk070wlhwy3c6prl21dypnsfgs5-nixos-system-lancey-tlarue-23.05.20230211.e5530ab.drv' failed to build

Setup:
NixOS 22.11 with home-manager
Qtile 0.22.1

I have tried already to ask in the Qtile repository and they redirected me here qtile/qtile#4157

@tych0
Copy link
Owner

tych0 commented Feb 13, 2023

Seems like the problem is:

_XSERVTransMakeAllCOTSServerListeners: server already running

can you talk a little bit about the environment that the tests are running in? Are they running in parallel? I don't really know anything about nix.

@Thlr
Copy link
Author

Thlr commented Feb 13, 2023

The reason it fails seems logical since I am running this from my desktop environment.
What happens is that I want to upgrade my system, which in NixOS sometimes means re-building stuff if it's not cached. Therefore the tests fail because they - apparently - need to run in a non-graphical environment.

I managed to get the build to pass by disabling my desktop environment (my X server) and then running the upgrade.

I don't believe there is anything wrong with your test suite. It's simply an annoyance related to NixOS. It is not a big deal right now but it may be a major pain point for me if every time I want to update my packages I need to shut down my X server.

@tych0
Copy link
Owner

tych0 commented Feb 13, 2023

What's interesting is, it should try to work around existing displays. Relevant code is here: https://github.com/tych0/xcffib/blob/master/module/testing.py#L31

I run the test suite in a graphical environment regularly and have for years. That's why I wonder if this is a race somehow?

Anyway, if you happen to get to the bottom of it, I'm happy to take a patch to work around the issue.

@Thlr
Copy link
Author

Thlr commented Feb 14, 2023

Noted, if this happens again surely I will try to look into it. In the mean time I have a work around at least.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants