Build hangs on macos/darwin #966

Open
opened 2025-08-18 19:26:52 +00:00 by imran-iq · 18 comments

Describe the bug

Just doing a regular nix flake update followed by a darwin-rebuild switch --flake ~/.config/nix-darwin --max-jobs 10

The build hangs on the last install check

[1/12/27 built, 0.0 MiB DL] building lix-2.94.0-dev-pre20250818-1f47ece (installCheckPhase): 145/146 lix:installcheck / functional-eval-store                                    OK             47.97s

it's been like that for a few hours now. Cancelling and rebuilding doesn't seem to fix

here is the diff of my flake.lock if it helps

diff --git i/flake.lock w/flake.lock
index 270f6f1..8e3486d 100644
--- i/flake.lock
+++ w/flake.lock
@@ -40,11 +40,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1755229570,
-        "narHash": "sha256-soZegto0xXzG2zYlu/zjknDHv0Z7tRS5EQs+Z/VRTBg=",
+        "lastModified": 1755538029,
+        "narHash": "sha256-XVsragfuN8A/tMiPToejH7RofH15toeIGhlXraX+yBo=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "11626a4383b458f8dc5ea3237eaa04e8ab1912f3",
+        "rev": "bf450a0844e80e6aa22652d3f3728f20cd974527",
         "type": "github"
       },
       "original": {
@@ -56,11 +56,11 @@
     "lix": {
       "flake": false,
       "locked": {
-        "lastModified": 1755264387,
-        "narHash": "sha256-8mMQ1E/769Zpdh/otiVXAtVX1IYss4QKP31x8EzfYGU=",
-        "rev": "c3bfb6fe17a9f768afc3d9c3fc24929d44570e72",
+        "lastModified": 1755522522,
+        "narHash": "sha256-OiIIM+cvFWCyAn7sFqZQJK1/94EQ522ktlnzakZqM+M=",
+        "rev": "1f47ecef4ef5f67b34653b9c61d6d99b2720eb44",
         "type": "tarball",
-        "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/c3bfb6fe17a9f768afc3d9c3fc24929d44570e72.tar.gz?rev=c3bfb6fe17a9f768afc3d9c3fc24929d44570e72"
+        "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/1f47ecef4ef5f67b34653b9c61d6d99b2720eb44.tar.gz?rev=1f47ecef4ef5f67b34653b9c61d6d99b2720eb44"
       },
       "original": {
         "type": "tarball",
@@ -97,11 +97,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1751313918,
-        "narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=",
+        "lastModified": 1755275010,
+        "narHash": "sha256-lEApCoWUEWh0Ifc3k1JdVjpMtFFXeL2gG1qvBnoRc2I=",
         "owner": "LnL7",
         "repo": "nix-darwin",
-        "rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf",
+        "rev": "7220b01d679e93ede8d7b25d6f392855b81dd475",
         "type": "github"
       },
       "original": {
@@ -112,11 +112,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1755175540,
-        "narHash": "sha256-V0j2S1r25QnbqBLzN2Rg/dKKil789bI3P3id7bDPVc4=",
+        "lastModified": 1755268003,
+        "narHash": "sha256-nNaeJjo861wFR0tjHDyCnHs1rbRtrMgxAKMoig9Sj/w=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "a595dde4d0d31606e19dcec73db02279db59d201",
+        "rev": "32f313e49e42f715491e1ea7b306a87c16fe0388",
         "type": "github"
       },
       "original": {

Steps To Reproduce

  1. update inputs to rev 1f47ecef4ef5f67b34653b9c61d6d99b2720eb44
  2. do a darwin-rebuild
  3. Hang

Expected behavior

Build finished like normal and switches to new version

nix --version output

❯ nix --version
nix (Lix, like Nix) 2.94.0-dev-pre20250815-c3bfb6f
System type: aarch64-darwin
Additional system types: x86_64-darwin
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /Users/imran/.config/nix/nix.conf:/Users/imran/.nix-profile/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/g8idprfp7mlflilp89knn7y2lbz4pxwz-lix-2.94.0-dev-pre20250815-c3bfb6f/share
## Describe the bug Just doing a regular `nix flake update` followed by a `darwin-rebuild switch --flake ~/.config/nix-darwin --max-jobs 10` The build hangs on the last install check ``` [1/12/27 built, 0.0 MiB DL] building lix-2.94.0-dev-pre20250818-1f47ece (installCheckPhase): 145/146 lix:installcheck / functional-eval-store OK 47.97s ``` it's been like that for a few hours now. Cancelling and rebuilding doesn't seem to fix here is the diff of my flake.lock if it helps ```diff diff --git i/flake.lock w/flake.lock index 270f6f1..8e3486d 100644 --- i/flake.lock +++ w/flake.lock @@ -40,11 +40,11 @@ ] }, "locked": { - "lastModified": 1755229570, - "narHash": "sha256-soZegto0xXzG2zYlu/zjknDHv0Z7tRS5EQs+Z/VRTBg=", + "lastModified": 1755538029, + "narHash": "sha256-XVsragfuN8A/tMiPToejH7RofH15toeIGhlXraX+yBo=", "owner": "nix-community", "repo": "home-manager", - "rev": "11626a4383b458f8dc5ea3237eaa04e8ab1912f3", + "rev": "bf450a0844e80e6aa22652d3f3728f20cd974527", "type": "github" }, "original": { @@ -56,11 +56,11 @@ "lix": { "flake": false, "locked": { - "lastModified": 1755264387, - "narHash": "sha256-8mMQ1E/769Zpdh/otiVXAtVX1IYss4QKP31x8EzfYGU=", - "rev": "c3bfb6fe17a9f768afc3d9c3fc24929d44570e72", + "lastModified": 1755522522, + "narHash": "sha256-OiIIM+cvFWCyAn7sFqZQJK1/94EQ522ktlnzakZqM+M=", + "rev": "1f47ecef4ef5f67b34653b9c61d6d99b2720eb44", "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/c3bfb6fe17a9f768afc3d9c3fc24929d44570e72.tar.gz?rev=c3bfb6fe17a9f768afc3d9c3fc24929d44570e72" + "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/1f47ecef4ef5f67b34653b9c61d6d99b2720eb44.tar.gz?rev=1f47ecef4ef5f67b34653b9c61d6d99b2720eb44" }, "original": { "type": "tarball", @@ -97,11 +97,11 @@ ] }, "locked": { - "lastModified": 1751313918, - "narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=", + "lastModified": 1755275010, + "narHash": "sha256-lEApCoWUEWh0Ifc3k1JdVjpMtFFXeL2gG1qvBnoRc2I=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf", + "rev": "7220b01d679e93ede8d7b25d6f392855b81dd475", "type": "github" }, "original": { @@ -112,11 +112,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1755175540, - "narHash": "sha256-V0j2S1r25QnbqBLzN2Rg/dKKil789bI3P3id7bDPVc4=", + "lastModified": 1755268003, + "narHash": "sha256-nNaeJjo861wFR0tjHDyCnHs1rbRtrMgxAKMoig9Sj/w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a595dde4d0d31606e19dcec73db02279db59d201", + "rev": "32f313e49e42f715491e1ea7b306a87c16fe0388", "type": "github" }, "original": { ``` ## Steps To Reproduce 1. update inputs to rev `1f47ecef4ef5f67b34653b9c61d6d99b2720eb44` 2. do a darwin-rebuild 3. Hang ## Expected behavior Build finished like normal and switches to new version ## `nix --version` output ``` ❯ nix --version nix (Lix, like Nix) 2.94.0-dev-pre20250815-c3bfb6f System type: aarch64-darwin Additional system types: x86_64-darwin Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /Users/imran/.config/nix/nix.conf:/Users/imran/.nix-profile/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/g8idprfp7mlflilp89knn7y2lbz4pxwz-lix-2.94.0-dev-pre20250815-c3bfb6f/share ```
Owner

could you share your /etc/nix/nix.conf ? cc @emilazy

could you share your `/etc/nix/nix.conf` ? cc @emilazy
Author

yeah here you go

❯ cat /etc/nix/nix.conf
# WARNING: this file is generated from the nix.* options in
# your nix-darwin configuration. Do not edit it!
allowed-users = *
auto-optimise-store = false
build-users-group = nixbld
builders =
cores = 0
experimental-features = nix-command flakes
max-jobs = auto
require-sigs = true
sandbox = false
sandbox-fallback = false
substituters = https://cache.nixos.org/
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
trusted-substituters =
trusted-users = root
extra-sandbox-paths =

and here is my nix-darwin configuration file from the flake

{
  pkgs,
  inputs,
  ...
}: {
  nixpkgs.overlays = [(final: prev: {uptime_r = prev.callPackage ./uptime_r.nix {};})];

  # List packages installed in system profile. To search by name, run:
  # $ nix-env -qaP | grep wget
  environment.systemPackages = [
    pkgs.vim
    pkgs.uptime_r
    pkgs.go
    pkgs.jq
  ];

  # Necessary for using flakes on this system.
  nix.settings.experimental-features = "nix-command flakes";

  # Enable alternative shell support in nix-darwin.
  programs.zsh.enable = true;
  programs.fish.enable = true;

  system.primaryUser = "imran";
  # Set Git commit hash for darwin-version.
  system.configurationRevision = inputs.self.rev or inputs.self.dirtyRev or null;

  # Used for backwards compatibility, please read the changelog before changing.
  # $ darwin-rebuild changelog
  system.stateVersion = 5;

  # The platform the configuration will be used on.
  nixpkgs.hostPlatform = "aarch64-darwin";

  system.defaults = {
    finder = {
      # Path in title
      ShowPathbar = true;
      _FXShowPosixPathInTitle = true;
      # List view
      FXPreferredViewStyle = "Nlsv";
      AppleShowAllFiles = true;
      AppleShowAllExtensions = true;
      #      DisableAllAnimations = true;
      QuitMenuItem = true;
      # Search current folder first
      FXDefaultSearchScope = "SCcf";
      # Don't show warning when changing extension
      FXEnableExtensionChangeWarning = false;
    };

    dock = {
      mouse-over-hilite-stack = true;
      tilesize = 32;
      mineffect = "scale";
      enable-spring-load-actions-on-all-items = true;
      #      show-process-indicator = true;
      launchanim = false;
      # Mission control animation speed
      expose-animation-duration = 0.1;
      # Mission control group by app
      expose-group-apps = false;
      # Don't show dashboard as a space
      dashboard-in-overlay = true;
      # Don't rearrange spaces based on mru
      mru-spaces = false;
      autohide-delay = 0.0;
      autohide-time-modifier = 0.0;
      autohide = true;
    };

    screencapture = {
      disable-shadow = true;
      type = "png";
    };

    universalaccess = {
      reduceMotion = true;
      # Disable transparency in system menus
      reduceTransparency = true;
      # Zoom with scroll and ctrl
      closeViewScrollWheelToggle = true;
      # Zoom into keyboard focus
      closeViewZoomFollowsFocus = true;
    };

    NSGlobalDomain = {
      ApplePressAndHoldEnabled = false;
      # Sidebar icon size medium
      NSTableViewDefaultSizeMode = 2;
      # Increase window resize speed
      NSWindowResizeTime = 0.001;
      # Expand save dialogue
      NSNavPanelExpandedStateForSaveMode = true;
      NSNavPanelExpandedStateForSaveMode2 = true;
      # Expand print panel
      PMPrintingExpandedStateForPrint = true;
      PMPrintingExpandedStateForPrint2 = true;
      # Dont save docs to icloud by default
      NSDocumentSaveNewDocumentsToCloud = false;
      # Use caret notation in text files
      NSTextShowsControlCharacters = true;
      # Disable smart quotes
      NSAutomaticQuoteSubstitutionEnabled = false;
      # Disable smart dashes
      NSAutomaticDashSubstitutionEnabled = false;
      # Fuck "natural" scroll
      "com.apple.swipescrolldirection" = false;
      # Full keyboard control
      AppleKeyboardUIMode = 3;
      # Fast keyboard repeat rate
      KeyRepeat = 1;
      InitialKeyRepeat = 15;
      # Disable auto correct
      NSAutomaticSpellingCorrectionEnabled = false;
      # Enable spring loading for directories
      "com.apple.springing.enabled" = true;
      "com.apple.springing.delay" = 0.5;
    };
  };
}
yeah here you go ``` ❯ cat /etc/nix/nix.conf # WARNING: this file is generated from the nix.* options in # your nix-darwin configuration. Do not edit it! allowed-users = * auto-optimise-store = false build-users-group = nixbld builders = cores = 0 experimental-features = nix-command flakes max-jobs = auto require-sigs = true sandbox = false sandbox-fallback = false substituters = https://cache.nixos.org/ trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= trusted-substituters = trusted-users = root extra-sandbox-paths = ``` and here is my nix-darwin configuration file from the flake ```nix { pkgs, inputs, ... }: { nixpkgs.overlays = [(final: prev: {uptime_r = prev.callPackage ./uptime_r.nix {};})]; # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget environment.systemPackages = [ pkgs.vim pkgs.uptime_r pkgs.go pkgs.jq ]; # Necessary for using flakes on this system. nix.settings.experimental-features = "nix-command flakes"; # Enable alternative shell support in nix-darwin. programs.zsh.enable = true; programs.fish.enable = true; system.primaryUser = "imran"; # Set Git commit hash for darwin-version. system.configurationRevision = inputs.self.rev or inputs.self.dirtyRev or null; # Used for backwards compatibility, please read the changelog before changing. # $ darwin-rebuild changelog system.stateVersion = 5; # The platform the configuration will be used on. nixpkgs.hostPlatform = "aarch64-darwin"; system.defaults = { finder = { # Path in title ShowPathbar = true; _FXShowPosixPathInTitle = true; # List view FXPreferredViewStyle = "Nlsv"; AppleShowAllFiles = true; AppleShowAllExtensions = true; # DisableAllAnimations = true; QuitMenuItem = true; # Search current folder first FXDefaultSearchScope = "SCcf"; # Don't show warning when changing extension FXEnableExtensionChangeWarning = false; }; dock = { mouse-over-hilite-stack = true; tilesize = 32; mineffect = "scale"; enable-spring-load-actions-on-all-items = true; # show-process-indicator = true; launchanim = false; # Mission control animation speed expose-animation-duration = 0.1; # Mission control group by app expose-group-apps = false; # Don't show dashboard as a space dashboard-in-overlay = true; # Don't rearrange spaces based on mru mru-spaces = false; autohide-delay = 0.0; autohide-time-modifier = 0.0; autohide = true; }; screencapture = { disable-shadow = true; type = "png"; }; universalaccess = { reduceMotion = true; # Disable transparency in system menus reduceTransparency = true; # Zoom with scroll and ctrl closeViewScrollWheelToggle = true; # Zoom into keyboard focus closeViewZoomFollowsFocus = true; }; NSGlobalDomain = { ApplePressAndHoldEnabled = false; # Sidebar icon size medium NSTableViewDefaultSizeMode = 2; # Increase window resize speed NSWindowResizeTime = 0.001; # Expand save dialogue NSNavPanelExpandedStateForSaveMode = true; NSNavPanelExpandedStateForSaveMode2 = true; # Expand print panel PMPrintingExpandedStateForPrint = true; PMPrintingExpandedStateForPrint2 = true; # Dont save docs to icloud by default NSDocumentSaveNewDocumentsToCloud = false; # Use caret notation in text files NSTextShowsControlCharacters = true; # Disable smart quotes NSAutomaticQuoteSubstitutionEnabled = false; # Disable smart dashes NSAutomaticDashSubstitutionEnabled = false; # Fuck "natural" scroll "com.apple.swipescrolldirection" = false; # Full keyboard control AppleKeyboardUIMode = 3; # Fast keyboard repeat rate KeyRepeat = 1; InitialKeyRepeat = 15; # Disable auto correct NSAutomaticSpellingCorrectionEnabled = false; # Enable spring loading for directories "com.apple.springing.enabled" = true; "com.apple.springing.delay" = 0.5; }; }; } ```
Owner

Alright, no sandboxing so… our CI should catch your hangout… Urgh.

Alright, no sandboxing so… our CI should catch your hangout… Urgh.
Owner

@imran-iq could you perhaps provide a build with -L where we can see everything? thanks!

@imran-iq could you perhaps provide a build with `-L` where we can see everything? thanks!
Author

Sure thing, I am attaching as a file as the output is long, but basically at that last test it seems to just wait forever

Sure thing, I am attaching as a file as the output is long, but basically at that last test it seems to just wait forever
Author

Did a bisect to find where the build starts hanging for me and its this:

start: c3bfb6fe17
end: 1f47ecef4e

~/c/lix on  HEAD (ce6dcf1) (BISECTING)
❯ git bisect good
1f47ecef4ef5f67b34653b9c61d6d99b2720eb44 is the first bad commit
commit 1f47ecef4ef5f67b34653b9c61d6d99b2720eb44
Author: WeetHet <stas.ale66@gmail.com>
Date:   Sun Aug 3 13:33:58 2025 +0300

    libstore/build: adjust setupConfiguredCertificateAuthority

    Always use tmpDir on darwin. Call setupConfiguredCertificateAuthority even if useChroot = 1 on non-linux.
    Even though macOS builds are not executed in a chroot, enabling the sandbox
    sets `useChroot = 1`. Basically, useChroot is set when the sandbox is enabled,
    not really when a chroot build is executed

    Change-Id: I8d4c1e617abcc05dfabd998a8ce94bb11587f9d1

 lix/libstore/build/local-derivation-goal.cc | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)
Did a bisect to find where the build starts hanging for me and its this: start: c3bfb6fe17a9f768afc3d9c3fc24929d44570e72 end: 1f47ecef4ef5f67b34653b9c61d6d99b2720eb44 ``` ~/c/lix on  HEAD (ce6dcf1) (BISECTING) ❯ git bisect good 1f47ecef4ef5f67b34653b9c61d6d99b2720eb44 is the first bad commit commit 1f47ecef4ef5f67b34653b9c61d6d99b2720eb44 Author: WeetHet <stas.ale66@gmail.com> Date: Sun Aug 3 13:33:58 2025 +0300 libstore/build: adjust setupConfiguredCertificateAuthority Always use tmpDir on darwin. Call setupConfiguredCertificateAuthority even if useChroot = 1 on non-linux. Even though macOS builds are not executed in a chroot, enabling the sandbox sets `useChroot = 1`. Basically, useChroot is set when the sandbox is enabled, not really when a chroot build is executed Change-Id: I8d4c1e617abcc05dfabd998a8ce94bb11587f9d1 lix/libstore/build/local-derivation-goal.cc | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) ```
Owner

Urgh, I will send a revert then I think and ping the developer for it.

Urgh, I will send a revert then I think and ping the developer for it.
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/4004 ("Revert "libstore/build: adjust setupConfiguredCertificateAuthority"")
  • commit message in cl/4029 ("Revert "tests: remove obsolete code to create custom build direc..."")
  • commit message in cl/4028 ("Revert "libstore: don’t include derivation names in build direct..."")
  • commit message in cl/4035 ("Revert "libstore: simplify makeTemp{,Sibling}Path callers"")
  • commit message in cl/4034 ("Revert "libstore: use makeTemp{,Sibling}Path more"")
  • commit message in cl/4033 ("Revert "libstore: simplify fallback build directory logic"")
  • commit message in cl/4032 ("Revert "libutil: use makeTempPath in createTempSubdir"")
  • commit message in cl/4031 ("Revert "libstore: simplify createTempDir interface"")
  • commit message in cl/4030 ("Revert "libstore: make temporary path prefixes optional"")
  • commit message in cl/4039 ("Revert "libutil: add makeTempSiblingPath helper"")
  • commit message in cl/4038 ("Revert "libstore: use makeTempSiblingPath in replaceValidPath"")
  • commit message in cl/4037 ("Revert "libutil: extract Base32 helpers from Hash"")
  • commit message in cl/4036 ("Revert "libutil: use OS‐provided entropy for temporary filenames"")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/4004", "number": 4004, "kind": "commit message"}, {"backlink": "https://gerrit.lix.systems/c/lix/+/4029", "number": 4029, "kind": "commit message"}, {"backlink": "https://gerrit.lix.systems/c/lix/+/4028", "number": 4028, "kind": "commit message"}, {"backlink": "https://gerrit.lix.systems/c/lix/+/4035", "number": 4035, "kind": "commit message"}, {"backlink": "https://gerrit.lix.systems/c/lix/+/4034", "number": 4034, "kind": "commit message"}, {"backlink": "https://gerrit.lix.systems/c/lix/+/4033", "number": 4033, "kind": "commit message"}, {"backlink": "https://gerrit.lix.systems/c/lix/+/4032", "number": 4032, "kind": "commit message"}, {"backlink": "https://gerrit.lix.systems/c/lix/+/4031", "number": 4031, "kind": "commit message"}, {"backlink": "https://gerrit.lix.systems/c/lix/+/4030", "number": 4030, "kind": "commit message"}, {"backlink": "https://gerrit.lix.systems/c/lix/+/4039", "number": 4039, "kind": "commit message"}, {"backlink": "https://gerrit.lix.systems/c/lix/+/4038", "number": 4038, "kind": "commit message"}, {"backlink": "https://gerrit.lix.systems/c/lix/+/4037", "number": 4037, "kind": "commit message"}, {"backlink": "https://gerrit.lix.systems/c/lix/+/4036", "number": 4036, "kind": "commit message"}], "cl_meta": {"4004": {"change_title": "Revert \"libstore/build: adjust setupConfiguredCertificateAuthority\""}, "4029": {"change_title": "Revert \"tests: remove obsolete code to create custom build direc...\""}, "4028": {"change_title": "Revert \"libstore: don\u2019t include derivation names in build direct...\""}, "4035": {"change_title": "Revert \"libstore: simplify `makeTemp{,Sibling}Path` callers\""}, "4034": {"change_title": "Revert \"libstore: use `makeTemp{,Sibling}Path` more\""}, "4033": {"change_title": "Revert \"libstore: simplify fallback build directory logic\""}, "4032": {"change_title": "Revert \"libutil: use `makeTempPath` in `createTempSubdir`\""}, "4031": {"change_title": "Revert \"libstore: simplify `createTempDir` interface\""}, "4030": {"change_title": "Revert \"libstore: make temporary path prefixes optional\""}, "4039": {"change_title": "Revert \"libutil: add `makeTempSiblingPath` helper\""}, "4038": {"change_title": "Revert \"libstore: use `makeTempSiblingPath` in `replaceValidPath`\""}, "4037": {"change_title": "Revert \"libutil: extract Base32 helpers from `Hash`\""}, "4036": {"change_title": "Revert \"libutil: use OS\u2010provided entropy for temporary filenames\""}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/4004](https://gerrit.lix.systems/c/lix/+/4004) ("Revert "libstore/build: adjust setupConfiguredCertificateAuthority"") * commit message in [cl/4029](https://gerrit.lix.systems/c/lix/+/4029) ("Revert "tests: remove obsolete code to create custom build direc..."") * commit message in [cl/4028](https://gerrit.lix.systems/c/lix/+/4028) ("Revert "libstore: don’t include derivation names in build direct..."") * commit message in [cl/4035](https://gerrit.lix.systems/c/lix/+/4035) ("Revert "libstore: simplify `makeTemp{,Sibling}Path` callers"") * commit message in [cl/4034](https://gerrit.lix.systems/c/lix/+/4034) ("Revert "libstore: use `makeTemp{,Sibling}Path` more"") * commit message in [cl/4033](https://gerrit.lix.systems/c/lix/+/4033) ("Revert "libstore: simplify fallback build directory logic"") * commit message in [cl/4032](https://gerrit.lix.systems/c/lix/+/4032) ("Revert "libutil: use `makeTempPath` in `createTempSubdir`"") * commit message in [cl/4031](https://gerrit.lix.systems/c/lix/+/4031) ("Revert "libstore: simplify `createTempDir` interface"") * commit message in [cl/4030](https://gerrit.lix.systems/c/lix/+/4030) ("Revert "libstore: make temporary path prefixes optional"") * commit message in [cl/4039](https://gerrit.lix.systems/c/lix/+/4039) ("Revert "libutil: add `makeTempSiblingPath` helper"") * commit message in [cl/4038](https://gerrit.lix.systems/c/lix/+/4038) ("Revert "libstore: use `makeTempSiblingPath` in `replaceValidPath`"") * commit message in [cl/4037](https://gerrit.lix.systems/c/lix/+/4037) ("Revert "libutil: extract Base32 helpers from `Hash`"") * commit message in [cl/4036](https://gerrit.lix.systems/c/lix/+/4036) ("Revert "libutil: use OS‐provided entropy for temporary filenames"")
Author

What's funny though is I can build past it eg: 001c70d2ba

❯ nix --version
nix (Lix, like Nix) 2.94.0-dev-pre20250819-001c70d
System type: aarch64-darwin
Additional system types: x86_64-darwin
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /Users/imran/.config/nix/nix.conf:/Users/imran/.nix-profile/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/5kfjl586a27m8ggw9d2dwrrdxc2myqi2-lix-2.94.0-dev-pre20250819-001c70d/share

so maybe non issue, just dont try to upgrade to the previously mentioned sha

What's funny though is I can build past it eg: 001c70d2bab8a06c648cbc456e59a271792fe99d ``` ❯ nix --version nix (Lix, like Nix) 2.94.0-dev-pre20250819-001c70d System type: aarch64-darwin Additional system types: x86_64-darwin Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /Users/imran/.config/nix/nix.conf:/Users/imran/.nix-profile/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/5kfjl586a27m8ggw9d2dwrrdxc2myqi2-lix-2.94.0-dev-pre20250819-001c70d/share ``` so maybe non issue, just dont try to upgrade to the previously mentioned sha
Owner

@imran-iq wrote in #966 (comment):

What's funny though is I can build past it eg: 001c70d2ba

❯ nix --version
nix (Lix, like Nix) 2.94.0-dev-pre20250819-001c70d
System type: aarch64-darwin
Additional system types: x86_64-darwin
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /Users/imran/.config/nix/nix.conf:/Users/imran/.nix-profile/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/5kfjl586a27m8ggw9d2dwrrdxc2myqi2-lix-2.94.0-dev-pre20250819-001c70d/share

so maybe non issue, just dont try to upgrade to the previously mentioned sha

It clearly doesn't spark joy, I wonder if there's a fix somewhere after that commit SHA1

@imran-iq wrote in https://git.lix.systems/lix-project/lix/issues/966#issuecomment-14128: > What's funny though is I can build past it eg: [`001c70d2ba`](/lix-project/lix/commit/001c70d2bab8a06c648cbc456e59a271792fe99d) > > ```text > ❯ nix --version > nix (Lix, like Nix) 2.94.0-dev-pre20250819-001c70d > System type: aarch64-darwin > Additional system types: x86_64-darwin > Features: gc, signed-caches > System configuration file: /etc/nix/nix.conf > User configuration files: /Users/imran/.config/nix/nix.conf:/Users/imran/.nix-profile/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf > Store directory: /nix/store > State directory: /nix/var/nix > Data directory: /nix/store/5kfjl586a27m8ggw9d2dwrrdxc2myqi2-lix-2.94.0-dev-pre20250819-001c70d/share > ``` > > so maybe non issue, just dont try to upgrade to the previously mentioned sha It clearly doesn't spark joy, I wonder if there's a fix somewhere after that commit SHA1
Author

Ok so the plot thickens.

With 001c70d2ba I am unable to run the following (followed by a darwin-rebuild build, how I was bisecting )

~/.c/nix-darwin on  master
❯ nix flake lock --override-input lix git+https://git.lix.systems/lix-project/lix?rev=20f84eb6bfa874a1c4f45b38b949335f580ea0d7
error:
       … while fetching the input 'git+file:///Users/imran/.config/nix-darwin'

       error: failed to extract archive (Cannot extract through symlink /tmp/nix-6qdsk1v5l602z7z0365abkwgwg/Makefile)

how ever if I rollback to an earlier version I can

~/.c/nix-darwin on  master
❯ nix --version
nix (Lix, like Nix) 2.94.0-dev-pre20250817-3de996f
System type: aarch64-darwin
Additional system types: x86_64-darwin
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /Users/imran/.config/nix/nix.conf:/Users/imran/.nix-profile/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/qn2kzgga2hynys1zwwfki14q1rv1vbq8-lix-2.94.0-dev-pre20250817-3de996f/share

❯ nix flake lock --override-input lix git+https://git.lix.systems/lix-project/lix?rev=20f84eb6bfa874a1c4f45b38b949335f580ea0d7
warning: updating lock file '/Users/imran/.config/nix-darwin/flake.lock':
• Updated input 'lix':
    'https://git.lix.systems/api/v1/repos/lix-project/lix/archive/001c70d2bab8a06c648cbc456e59a271792fe99d.tar.gz?narHash=sha256-1iSxO09S7MXC5ovHHEiugBcUHAesVfKivS/fm6KA5AQ%3D&rev=001c70d2bab8a06c648cbc456e59a271792fe99d' (2025-08-19)
  → 'git+https://git.lix.systems/lix-project/lix?ref=refs/heads/main&rev=20f84eb6bfa874a1c4f45b38b949335f580ea0d7' (2025-08-19)
warning: Git tree '/Users/imran/.config/nix-darwin' is dirty

so something is up this week with macos and tmp dirs

Ok so the plot thickens. With 001c70d2ba I am unable to run the following (followed by a darwin-rebuild build, how I was bisecting ) ``` ~/.c/nix-darwin on  master ❯ nix flake lock --override-input lix git+https://git.lix.systems/lix-project/lix?rev=20f84eb6bfa874a1c4f45b38b949335f580ea0d7 error: … while fetching the input 'git+file:///Users/imran/.config/nix-darwin' error: failed to extract archive (Cannot extract through symlink /tmp/nix-6qdsk1v5l602z7z0365abkwgwg/Makefile) ``` how ever if I rollback to an earlier version I can ``` ~/.c/nix-darwin on  master ❯ nix --version nix (Lix, like Nix) 2.94.0-dev-pre20250817-3de996f System type: aarch64-darwin Additional system types: x86_64-darwin Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /Users/imran/.config/nix/nix.conf:/Users/imran/.nix-profile/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/qn2kzgga2hynys1zwwfki14q1rv1vbq8-lix-2.94.0-dev-pre20250817-3de996f/share ❯ nix flake lock --override-input lix git+https://git.lix.systems/lix-project/lix?rev=20f84eb6bfa874a1c4f45b38b949335f580ea0d7 warning: updating lock file '/Users/imran/.config/nix-darwin/flake.lock': • Updated input 'lix': 'https://git.lix.systems/api/v1/repos/lix-project/lix/archive/001c70d2bab8a06c648cbc456e59a271792fe99d.tar.gz?narHash=sha256-1iSxO09S7MXC5ovHHEiugBcUHAesVfKivS/fm6KA5AQ%3D&rev=001c70d2bab8a06c648cbc456e59a271792fe99d' (2025-08-19) → 'git+https://git.lix.systems/lix-project/lix?ref=refs/heads/main&rev=20f84eb6bfa874a1c4f45b38b949335f580ea0d7' (2025-08-19) warning: Git tree '/Users/imran/.config/nix-darwin' is dirty ``` so _something_ is up this week with macos and tmp dirs
Author

so:
1f47ecef4e hangs on the final test
d8b1fb7799 (next commit) does not hang on the test, i have no idea why

but anything newer than 1f47ecef4e causes stuff like nix flake update to fail with Cannot extract through symlink

looks like /tmp is a symlink

❯ ls -lh /tmp
lrwxr-xr-x@ 1 root  wheel    11B May  4 00:39 /tmp@ -> private/tmp

which reminds me that there was some create volume thing needed to make /nix work on macos, maybe something changed in macos 15.5 (not an apple person, this is a work computer).

so maybe might need that revert after all? (i.e cant extract to /tmp cuz of symlink issues)

so: 1f47ecef4ef5f67b34653b9c61d6d99b2720eb44 hangs on the final test d8b1fb77995d819aac4b990fe9d960a68e751fbc (next commit) does not hang on the test, i have no idea why but anything newer than 1f47ecef4ef5f67b34653b9c61d6d99b2720eb44 causes stuff like `nix flake update` to fail with `Cannot extract through symlink` looks like `/tmp` is a symlink ``` ❯ ls -lh /tmp lrwxr-xr-x@ 1 root wheel 11B May 4 00:39 /tmp@ -> private/tmp ``` which reminds me that there was some create volume thing needed to make /nix work on macos, maybe something changed in macos 15.5 (not an apple person, this is a work computer). so maybe might need that revert after all? (i.e cant extract to /tmp cuz of symlink issues)
Owner

Thanks for the debugging, I will try to take a look tomorrow and see how we can push the needle. If you can try to revert the 1f47ecef4 and run with it, I believe you will have the same "cannot extract through symlink" though which might be related to another series pertaining to macOS fixes.

cc @emilazy

Thanks for the debugging, I will try to take a look tomorrow and see how we can push the needle. If you can try to revert the 1f47ecef4 and run with it, I believe you will have the same "cannot extract through symlink" though which might be related to another series pertaining to macOS fixes. cc @emilazy
Owner

@imran-iq A revert was applied, can you tell me if you still encounter weird issues?

@imran-iq A revert was applied, can you tell me if you still encounter weird issues?
Author

I can confirm that I am not getting the Cannot extract through symlink error with the revert (ie everything seems to be working afaict)

❯ nix --version
nix (Lix, like Nix) 2.94.0-dev-pre20250821-ac9721a
System type: aarch64-darwin
Additional system types: x86_64-darwin
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /Users/imran/.config/nix/nix.conf:/Users/imran/.nix-profile/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/aqcrdqv5pmkp4wm4n1pyfasq4wfjvb4y-lix-2.94.0-dev-pre20250821-ac9721a/share

~/.c/nix-darwin on  master
❯ nix flake update
warning: Git tree '/Users/imran/.config/nix-darwin' is dirty
warning: updating lock file '/Users/imran/.config/nix-darwin/flake.lock':
• Updated input 'home-manager':
    'github:nix-community/home-manager/dd026d86420781e84d0732f2fa28e1c051117b59' (2025-08-19)
  → 'github:nix-community/home-manager/6911d3e7f475f7b3558b4f5a6aba90fa86099baa' (2025-08-21)
• Updated input 'nix-darwin':
    'github:LnL7/nix-darwin/7220b01d679e93ede8d7b25d6f392855b81dd475' (2025-08-15)
  → 'github:LnL7/nix-darwin/3a0a38a1e7ac2c4b4150ea37a491fdffdc9c92e1' (2025-08-21)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/b6b47963d86aca847fe9754627b1f20f5fd0181d' (2025-08-16)
  → 'github:NixOS/nixpkgs/596312aae91421d6923f18cecce934a7d3bfd6b8' (2025-08-21)
warning: Git tree '/Users/imran/.config/nix-darwin' is dirty
I can confirm that I am not getting the `Cannot extract through symlink` error with the revert (ie everything seems to be working afaict) ``` ❯ nix --version nix (Lix, like Nix) 2.94.0-dev-pre20250821-ac9721a System type: aarch64-darwin Additional system types: x86_64-darwin Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /Users/imran/.config/nix/nix.conf:/Users/imran/.nix-profile/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/aqcrdqv5pmkp4wm4n1pyfasq4wfjvb4y-lix-2.94.0-dev-pre20250821-ac9721a/share ~/.c/nix-darwin on  master ❯ nix flake update warning: Git tree '/Users/imran/.config/nix-darwin' is dirty warning: updating lock file '/Users/imran/.config/nix-darwin/flake.lock': • Updated input 'home-manager': 'github:nix-community/home-manager/dd026d86420781e84d0732f2fa28e1c051117b59' (2025-08-19) → 'github:nix-community/home-manager/6911d3e7f475f7b3558b4f5a6aba90fa86099baa' (2025-08-21) • Updated input 'nix-darwin': 'github:LnL7/nix-darwin/7220b01d679e93ede8d7b25d6f392855b81dd475' (2025-08-15) → 'github:LnL7/nix-darwin/3a0a38a1e7ac2c4b4150ea37a491fdffdc9c92e1' (2025-08-21) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/b6b47963d86aca847fe9754627b1f20f5fd0181d' (2025-08-16) → 'github:NixOS/nixpkgs/596312aae91421d6923f18cecce934a7d3bfd6b8' (2025-08-21) warning: Git tree '/Users/imran/.config/nix-darwin' is dirty ```
Owner

Closing for the time being then, thank you! Please reopen if you notice anything wrong.

Closing for the time being then, thank you! Please reopen if you notice anything wrong.
raito closed this issue 2025-08-21 23:08:51 +00:00
Author

As requested I am re-opening.

Even with newer builds the test will sometimes hang (seems to be a race condition). I ran ps -ef as the test hangs and that leads me here:

❯ ps -ef | rg nix
  502  1238  1145   0 10:24AM ??         0:15.93 /Applications/Spotify.app/Contents/Frameworks/Spotify Helper (Renderer).app/Contents/MacOS/Spotify Helper (Renderer) --type=renderer --enable-dinosaur-easter-egg-alt-images --user-data-dir=/Users/imran/Library/Caches/com.spotify.client --log-severity=disable --user-agent-product=Chrome/139.0.7258.139 Spotify/1.2.71.421 --autoplay-policy=no-user-gesture-required --lang=en-GB --num-raster-threads=4 --enable-zero-copy --enable-gpu-memory-buffer-compositor-resources --enable-main-frame-before-activation --renderer-client-id=7 --time-ticks-at-unix-epoch=-1757604247667573 --launch-time-ticks=37148630 --shared-files --metrics-shmem-handle=1752395122,r,15016037845130580391,11817514483315536333,2097152 --field-trial-handle=1718379636,r,6608943131215608076,278155608326959698,262144 --disable-features=BackForwardCache,FullscreenBubbleShowOrigin,GatherProcessRequirementMetrics,PartitionAllocDanglingPtr,PartitionAllocUnretainedDanglingPtr,StorageNotificationService --variations-seed-version --seatbelt-client=146
    0 16766     1   0 11:42AM ??         0:00.06 /nix/store/y7jpygqdkr49wrqa27s969h0hw9mxcpn-lix-2.94.0-dev-pre20250829-f4bdddf/bin/nix-daemon
    0 46078 16766   0 12:30PM ??         0:00.42 nix-daemon --for 46072 --log-level 3
  351 46089 46078   0 12:30PM ??         0:00.40 bash -e /nix/store/vj1c3wf9c11a0qs6p3ymfvrnsdgsdcbq-source-stdenv.sh /nix/store/shkw4qm9qcw5sc5n1k5jznc83ny02r39-default-builder.sh
  351 50735 46089   0 12:32PM ??         0:00.00 bash -e /nix/store/vj1c3wf9c11a0qs6p3ymfvrnsdgsdcbq-source-stdenv.sh /nix/store/shkw4qm9qcw5sc5n1k5jznc83ny02r39-default-builder.sh
  351 50739 50735   0 12:32PM ??         0:02.43 /nix/store/9px7zzsfnlmj61yy2fpl6z14w93j05is-python3-3.13.6/bin/python3.13 /nix/store/mjbl14i3ybh73mgar8i0cnkippz2gvnx-meson-1.8.3/bin/meson test --no-rebuild --print-errorlogs --max-lines=1000000 --suite=installcheck --timeout-multiplier=0
  351 66830 50739   0 12:35PM ??         0:00.04 /nix/store/9px7zzsfnlmj61yy2fpl6z14w93j05is-python3-3.13.6/bin/python3 /nix/var/nix/builds/nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0/b/source/meson/run-test.py build.sh
  351 66859 66830   0 12:35PM ??         0:00.06 /nix/store/3g3sgwpnig8sd0w9wbs7d5gy512r43cq-bash-5.3p3/bin/bash -e build.sh
  351 70601 66859   0 12:36PM ??         0:00.03 nix build --build-dir /nix/var/nix/builds/nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0/b/tmp.m10zPWh6N1/b -E \012  with import ./config.nix; mkDerivation {\012    name = "test";\012    buildCommand = "cat /nix/var/nix/builds/nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0/b/tmp.m10zPWh6N1/fifo; cat /nix/var/nix/builds/nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0/b/tmp.m10zPWh6N1/fifo > $out";\012  } --extra-sandbox-paths /nix/var/nix/builds/nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0/b/tmp.m10zPWh6N1/fifo --impure --no-link
  351 70606 70601   0 12:36PM ??         0:00.22 bash -e /nix/var/nix/builds/nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0/b/nix-test/build/store/gwskwqdd2rrbrb10lha2vvqn3icl61d0-builder-test.sh
  351 70610 70606   0 12:36PM ??         0:00.00 cat /nix/var/nix/builds/nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0/b/tmp.m10zPWh6N1/fifo
    0 46065 46047   0 12:30PM ttys003    0:00.02 sudo darwin-rebuild switch --flake /Users/imran/.config/nix-darwin --max-jobs 10
    0 46067 46065   0 12:30PM ttys003    0:00.00 /nix/store/3g3sgwpnig8sd0w9wbs7d5gy512r43cq-bash-5.3p3/bin/bash /run/current-system/sw/bin/darwin-rebuild switch --flake /Users/imran/.config/nix-darwin --max-jobs 10
    0 46071 46067   0 12:30PM ttys003    0:00.00 /nix/store/3g3sgwpnig8sd0w9wbs7d5gy512r43cq-bash-5.3p3/bin/bash /run/current-system/sw/bin/darwin-rebuild switch --flake /Users/imran/.config/nix-darwin --max-jobs 10
    0 46072 46071   0 12:30PM ttys003    0:00.16 nix --extra-experimental-features nix-command flakes build --json --max-jobs 10 --no-link -- /Users/imran/.config/nix-darwin#darwinConfigurations.Imran-GXMNQYRPQQ.system
  502 70721 58251   0 12:37PM ttys015    0:00.00 rg nix

which then led me to this test:

chmod 0755 "$BUILD_DIR"
FIFO="$BUILD_DIR/fifo"
mkfifo "$FIFO"
(
echo > "$FIFO"
trap 'echo > "$FIFO"' EXIT
mode=$(stat -c %a $BUILD_DIR/b/*)
[ "$mode" = "700" -o "$mode" = "710" ]
) &
nix build --build-dir "$BUILD_DIR/b" -E '
with import ./config.nix; mkDerivation {
name = "test";
buildCommand = "cat '"$FIFO"'; cat '"$FIFO"' > $out";
}' \
--extra-sandbox-paths "$FIFO" \
--impure \
--no-link
wait

I am not too familiar with fifos/bash, but judging from the output of ps, the test seems to be hanging on the second cat.

My theory (assuming cat consumes everything on the fifo) is that the subprocess finishes before the nix build gets a chance to run, so the first cat ends up consuming everything leaving nothing for the second cat, and hence the build hang.

As requested I am re-opening. Even with newer builds the test will sometimes hang (seems to be a race condition). I ran `ps -ef` as the test hangs and that leads me here: ``` ❯ ps -ef | rg nix 502 1238 1145 0 10:24AM ?? 0:15.93 /Applications/Spotify.app/Contents/Frameworks/Spotify Helper (Renderer).app/Contents/MacOS/Spotify Helper (Renderer) --type=renderer --enable-dinosaur-easter-egg-alt-images --user-data-dir=/Users/imran/Library/Caches/com.spotify.client --log-severity=disable --user-agent-product=Chrome/139.0.7258.139 Spotify/1.2.71.421 --autoplay-policy=no-user-gesture-required --lang=en-GB --num-raster-threads=4 --enable-zero-copy --enable-gpu-memory-buffer-compositor-resources --enable-main-frame-before-activation --renderer-client-id=7 --time-ticks-at-unix-epoch=-1757604247667573 --launch-time-ticks=37148630 --shared-files --metrics-shmem-handle=1752395122,r,15016037845130580391,11817514483315536333,2097152 --field-trial-handle=1718379636,r,6608943131215608076,278155608326959698,262144 --disable-features=BackForwardCache,FullscreenBubbleShowOrigin,GatherProcessRequirementMetrics,PartitionAllocDanglingPtr,PartitionAllocUnretainedDanglingPtr,StorageNotificationService --variations-seed-version --seatbelt-client=146 0 16766 1 0 11:42AM ?? 0:00.06 /nix/store/y7jpygqdkr49wrqa27s969h0hw9mxcpn-lix-2.94.0-dev-pre20250829-f4bdddf/bin/nix-daemon 0 46078 16766 0 12:30PM ?? 0:00.42 nix-daemon --for 46072 --log-level 3 351 46089 46078 0 12:30PM ?? 0:00.40 bash -e /nix/store/vj1c3wf9c11a0qs6p3ymfvrnsdgsdcbq-source-stdenv.sh /nix/store/shkw4qm9qcw5sc5n1k5jznc83ny02r39-default-builder.sh 351 50735 46089 0 12:32PM ?? 0:00.00 bash -e /nix/store/vj1c3wf9c11a0qs6p3ymfvrnsdgsdcbq-source-stdenv.sh /nix/store/shkw4qm9qcw5sc5n1k5jznc83ny02r39-default-builder.sh 351 50739 50735 0 12:32PM ?? 0:02.43 /nix/store/9px7zzsfnlmj61yy2fpl6z14w93j05is-python3-3.13.6/bin/python3.13 /nix/store/mjbl14i3ybh73mgar8i0cnkippz2gvnx-meson-1.8.3/bin/meson test --no-rebuild --print-errorlogs --max-lines=1000000 --suite=installcheck --timeout-multiplier=0 351 66830 50739 0 12:35PM ?? 0:00.04 /nix/store/9px7zzsfnlmj61yy2fpl6z14w93j05is-python3-3.13.6/bin/python3 /nix/var/nix/builds/nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0/b/source/meson/run-test.py build.sh 351 66859 66830 0 12:35PM ?? 0:00.06 /nix/store/3g3sgwpnig8sd0w9wbs7d5gy512r43cq-bash-5.3p3/bin/bash -e build.sh 351 70601 66859 0 12:36PM ?? 0:00.03 nix build --build-dir /nix/var/nix/builds/nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0/b/tmp.m10zPWh6N1/b -E \012 with import ./config.nix; mkDerivation {\012 name = "test";\012 buildCommand = "cat /nix/var/nix/builds/nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0/b/tmp.m10zPWh6N1/fifo; cat /nix/var/nix/builds/nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0/b/tmp.m10zPWh6N1/fifo > $out";\012 } --extra-sandbox-paths /nix/var/nix/builds/nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0/b/tmp.m10zPWh6N1/fifo --impure --no-link 351 70606 70601 0 12:36PM ?? 0:00.22 bash -e /nix/var/nix/builds/nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0/b/nix-test/build/store/gwskwqdd2rrbrb10lha2vvqn3icl61d0-builder-test.sh 351 70610 70606 0 12:36PM ?? 0:00.00 cat /nix/var/nix/builds/nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0/b/tmp.m10zPWh6N1/fifo 0 46065 46047 0 12:30PM ttys003 0:00.02 sudo darwin-rebuild switch --flake /Users/imran/.config/nix-darwin --max-jobs 10 0 46067 46065 0 12:30PM ttys003 0:00.00 /nix/store/3g3sgwpnig8sd0w9wbs7d5gy512r43cq-bash-5.3p3/bin/bash /run/current-system/sw/bin/darwin-rebuild switch --flake /Users/imran/.config/nix-darwin --max-jobs 10 0 46071 46067 0 12:30PM ttys003 0:00.00 /nix/store/3g3sgwpnig8sd0w9wbs7d5gy512r43cq-bash-5.3p3/bin/bash /run/current-system/sw/bin/darwin-rebuild switch --flake /Users/imran/.config/nix-darwin --max-jobs 10 0 46072 46071 0 12:30PM ttys003 0:00.16 nix --extra-experimental-features nix-command flakes build --json --max-jobs 10 --no-link -- /Users/imran/.config/nix-darwin#darwinConfigurations.Imran-GXMNQYRPQQ.system 502 70721 58251 0 12:37PM ttys015 0:00.00 rg nix ``` which then led me to this test: https://git.lix.systems/lix-project/lix/src/commit/b04419e7192456602038d14577683a746a439fd4/tests/functional/build.sh#L184-L201 I am not too familiar with fifos/bash, but judging from the output of ps, the test seems to be hanging on the second cat. My theory (assuming cat consumes everything on the fifo) is that the subprocess finishes before the nix build gets a chance to run, so the first cat ends up consuming everything leaving nothing for the second cat, and hence the build hang.
imran-iq reopened this issue 2025-09-11 18:09:34 +00:00
Author

well the fifo is also gone from the build directory:

~/.c/nix-darwin on  master
❯ sudo ls /nix/var/nix/builds
nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0

~/.c/nix-darwin on  master
❯ sudo ls /nix/var/nix/builds/nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0/
b

so (i think) the only way for me to unstuck the build is to kill the cat process and fail the build

well the fifo is also gone from the build directory: ``` ~/.c/nix-darwin on  master ❯ sudo ls /nix/var/nix/builds nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0 ~/.c/nix-darwin on  master ❯ sudo ls /nix/var/nix/builds/nix-build-lix-2.94.0-dev-pre20250907-91bf54d.drv-0/ b ``` so (i think) the only way for me to unstuck the build is to kill the cat process and fail the build
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
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#966
No description provided.