[Nix#7273] "error: cannot link '/nix/store/.tmp-link' to '/nix/store/.links/...': File exists" #629

Open
opened 2025-01-19 22:40:44 +00:00 by jade · 0 comments
Owner

Upstream-Issue: NixOS/nix#7273

Describe the bug

Remote building from Nix 2.11.0 on a Mac to an aarch64 Linux machine running 2.8.1, where the remote builder has auto-optimise-store = true, occasionally we're seeing errors on the remote:

error: cannot link '/nix/store/.tmp-link-13949-1705072255' to '/nix/store/.links/09vd...mxd': File exists

this ends up failing the "substitution" and requires retrying. After trying many times, it eventually succeeds.

Expected behavior

  1. Optimising the store should not fail if racing to create the link fails.
  2. A remote build shouldn't fail if optimising fails.

nix-env --version output

[root@nix-builder:~]# nix-env --version
nix-env (Nix) 2.8.1
$ nix-env --version
nix-env (Nix) 2.11.0

Additional context

I don't believe any changes have been made to Nix since 2.8.1 that impacted auto-optimisation.

Upstream-Issue: https://git.lix.systems/NixOS/nix/issues/7273 **Describe the bug** Remote building from Nix 2.11.0 on a Mac to an aarch64 Linux machine running 2.8.1, where the remote builder has `auto-optimise-store = true`, occasionally we're seeing errors on the remote: ``` error: cannot link '/nix/store/.tmp-link-13949-1705072255' to '/nix/store/.links/09vd...mxd': File exists ``` this ends up failing the "substitution" and requires retrying. After trying many times, it eventually succeeds. **Expected behavior** 1. Optimising the store should not fail if racing to create the link fails. 2. A remote build shouldn't fail if optimising fails. **`nix-env --version` output** ``` [root@nix-builder:~]# nix-env --version nix-env (Nix) 2.8.1 ``` ``` $ nix-env --version nix-env (Nix) 2.11.0 ``` **Additional context** I don't believe any changes have been made to Nix since 2.8.1 that impacted auto-optimisation. <!-- ref DS-425 -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#629
No description provided.