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

Using "localhost" as a remote builder deadlocks the build #2029

Open
LisannaAtHome opened this issue Mar 31, 2018 · 9 comments
Open

Using "localhost" as a remote builder deadlocks the build #2029

LisannaAtHome opened this issue Mar 31, 2018 · 9 comments
Assignees
Labels
bug remote build The SSH store, ssh:, ssh-ng:, ... (split from protocol label 2024-07)

Comments

@LisannaAtHome
Copy link

A nix-build command of the form nix-build --builders "ssh://nix@localhost" will deadlock, because the local nix-build command is holding the /nix/store lock for that output, thus preventing the remote build process (running on the same machine) from grabbing the lock and performing the build. So the command gets stuck at "waiting for locks or build slots..."

@shlevy
Copy link
Member

shlevy commented Apr 23, 2018

I'm not completely sure the answer here shouldn't just be "don't do that". @edolstra ?

@copumpkin
Copy link
Member

It seems like it should be to have the tool tell you "don't do that" when you try it, rather than observing the deadlock, googling it, and seeing @shlevy tell you not to do that 😄

@LisannaAtHome
Copy link
Author

this is desired as a workaround for #2012

If the resolution of this ends up being "don't do that", what's the right solution for #2012 ?

@shlevy
Copy link
Member

shlevy commented Apr 23, 2018

Oh, right, fair.

@jwiegley
Copy link

Any word on this issue? Being able to specify localhost as a remote builder would make it much easier to prioritize local over remote builds across multiple machines (or vice versa, depending on the relative strengths of the machines, and the cost of networking).

@stale
Copy link

stale bot commented Feb 16, 2021

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

@stale stale bot added the stale label Feb 16, 2021
@stale
Copy link

stale bot commented Apr 29, 2022

I closed this issue due to inactivity. → More info

@stale stale bot closed this as completed Apr 29, 2022
@Misterio77
Copy link
Member

Has anyone ever found a workaround for this? I'd like to have a weaker machine help a stronger one with builds.

Configuring daemon or local (with protocol = null) as a buildMachine outputs the dreaded:

waiting for lock on '/nix/store/xxx'

Trying localhost (with protocol = ssh and a dedicated builder sshUser) freezes with:

building xxx on ssh://builder@localhost: debug1: Sending command: nix-store --serve --write

Is there any other way to set speedFactor on the local machine?

@maralorn
Copy link
Member

maralorn commented Feb 7, 2023

I encountered the same issue. It would be really cool to be able to use remote builds but still prioritizing local builds.

@thufschmitt thufschmitt reopened this Feb 24, 2023
@edolstra edolstra removed their assignment Apr 26, 2024
@stale stale bot removed the stale label Apr 26, 2024
@roberth roberth added the remote build The SSH store, ssh:, ssh-ng:, ... (split from protocol label 2024-07) label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug remote build The SSH store, ssh:, ssh-ng:, ... (split from protocol label 2024-07)
Projects
None yet
Development

No branches or pull requests

10 participants