Skip to content

native-linux-builder build stalling on fixed-output derivations #334

@cassLaffan

Description

@cassLaffan

Hello! I am still quite new to Nix, so bear with me. When using the new, experimental feature native-linux-builder, the build appears to stall on packages which are downloaded from the Internet. The build will stall and require a coomand restart several times before it works (if it works at all), then moves onto the next package. These may or may not fail under the same conditions.

For reference, I am on an arm-based Mac, and am running the latest OS version, Tahoe 26.2 Furthermore, though this may or may not be relevant: most stalled dependencies succeeded upon a few restarts, whereas npm dependencies act as a hard stop/stall.

Steps To Reproduce

  1. Ensure you have access to the experimental feature native-linux-builder, and are on an arm-based Apple computer.
  2. Attempt to build.
  3. Wait for the builder to reach a package that requires the Internet to download.

Expected behavior

I was expecting the nix linux builder to build the FOD normally.

Metadata

Here is the json for one of the packages which stalled:

sandbox setup: {
sandbox setup:   "args": [
sandbox setup:     "-e",
sandbox setup:     "/nix/store/l622p70vy8k5sh7y5wizi5f2mic6ynpg-source-stdenv.sh",
sandbox setup:     "/nix/store/shkw4qm9qcw5sc5n1k5jznc83ny02r39-default-builder.sh"
sandbox setup:   ],
sandbox setup:   "builder": "/nix/store/q1lr86rzsxxbbqdz8m6bcv94saaz8wlv-bash-5.3p3/bin/bash",
sandbox setup:   "env": {
sandbox setup:     "ALL_PROXY": "",
sandbox setup:     "FTP_PROXY": "",
sandbox setup:     "HOME": "/homeless-shelter",
sandbox setup:     "HTTPS_PROXY": "",
sandbox setup:     "HTTP_PROXY": "",
sandbox setup:     "NIX_BUILD_CORES": "12",
sandbox setup:     "NIX_BUILD_TOP": "/build",
sandbox setup:     "NIX_LOG_FD": "2",
sandbox setup:     "NIX_NPM_REGISTRY_OVERRIDES": "{}",
sandbox setup:     "NIX_NPM_TOKENS": "",
sandbox setup:     "NIX_OUTPUT_CHECKED": "1",
sandbox setup:     "NIX_SSL_CERT_FILE": "",
sandbox setup:     "NIX_STORE": "/nix/store",
sandbox setup:     "NO_PROXY": "",
sandbox setup:     "PATH": "/path-not-set",
sandbox setup:     "PWD": "/build",
sandbox setup:     "SSL_CERT_FILE": "/no-cert-file.crt",
sandbox setup:     "TEMP": "/build",
sandbox setup:     "TEMPDIR": "/build",
sandbox setup:     "TERM": "xterm-256color",
sandbox setup:     "TMP": "/build",
sandbox setup:     "TMPDIR": "/build",
sandbox setup:     "__structuredAttrs": "",
sandbox setup:     "all_proxy": "",
sandbox setup:     "buildInputs": "",
sandbox setup:     "buildPhase": "runHook preBuild\n\nif [[ -f npm-shrinkwrap.json ]]; then\n  local -r srcLockfile=\"npm-shrinkwrap.json\"\nelif [[ -f package-lock.json ]]; then\n  local -r srcLockfile=\"package-lock.json\"\nelse\n  echo\n  echo \"ERROR: No lock file!\"\n  echo\n  echo \"package-lock.json or npm-shrinkwrap.json is required to make sure\"\n  echo \"that npmDepsHash doesn't change when packages are updated on npm.\"\n  echo\n  echo \"Hint: You can copy a vendored package-lock.json file via postPatch.\"\n  echo\n\n  exit 1\nfi\n\nprefetch-npm-deps $srcLockfile $out\n\nrunHook postBuild\n",
sandbox setup:     "builder": "/nix/store/q1lr86rzsxxbbqdz8m6bcv94saaz8wlv-bash-5.3p3/bin/bash",
sandbox setup:     "cmakeFlags": "",
sandbox setup:     "configureFlags": "",
sandbox setup:     "depsBuildBuild": "",
sandbox setup:     "depsBuildBuildPropagated": "",
sandbox setup:     "depsBuildTarget": "",
sandbox setup:     "depsBuildTargetPropagated": "",
sandbox setup:     "depsHostHost": "",
sandbox setup:     "depsHostHostPropagated": "",
sandbox setup:     "depsTargetTarget": "",
sandbox setup:     "depsTargetTargetPropagated": "",
sandbox setup:     "doCheck": "",
sandbox setup:     "doInstallCheck": "",
sandbox setup:     "dontInstall": "1",
sandbox setup:     "forceEmptyCache": "",
sandbox setup:     "forceGitDeps": "",
sandbox setup:     "ftp_proxy": "",
sandbox setup:     "hash": "sha256-40N2QAyq9bhahWt6Zobrzh4kzM4IdTfDMzLTsDNJjbw=",
sandbox setup:     "http_proxy": "",
sandbox setup:     "https_proxy": "",
sandbox setup:     "impureEnvVars": "http_proxy https_proxy ftp_proxy all_proxy no_proxy HTTP_PROXY HTTPS_PROXY FTP_PROXY ALL_PROXY NO_PROXY NIX_SSL_CERT_FILE NIX_NPM_TOKENS",
sandbox setup:     "mesonFlags": "",
sandbox setup:     "name": "REDACTED-node-tester-0.1.0-npm-deps",
sandbox setup:     "nativeBuildInputs": "/nix/store/psijhahzg9p4cr90h1jwgp8gp1bjzjnn-prefetch-npm-deps-0.1.0",
sandbox setup:     "no_proxy": "",
sandbox setup:     "out": "/nix/store/xkf5pgbm6q2zr2ibc4r8wjgb3v70k15m-REDACTED-node-tester-0.1.0-npm-deps",
sandbox setup:     "outputHash": "sha256-40N2QAyq9bhahWt6Zobrzh4kzM4IdTfDMzLTsDNJjbw=",
sandbox setup:     "outputHashMode": "recursive",
sandbox setup:     "outputs": "out",
sandbox setup:     "patchFlags": "",
sandbox setup:     "patches": "",
sandbox setup:     "postPatch": "",
sandbox setup:     "prePatch": "",
sandbox setup:     "propagatedBuildInputs": "",
sandbox setup:     "propagatedNativeBuildInputs": "",
sandbox setup:     "src": "/nix/store/1amsl1z92s6zzb5r25zcwh93pcj9a8qy-tests",
sandbox setup:     "stdenv": "/nix/store/w2bd8lybn1yrvaf99lj4jv8zlp2s0p1h-stdenv-linux",
sandbox setup:     "strictDeps": "",
sandbox setup:     "system": "aarch64-linux"
sandbox setup:   },
sandbox setup:   "inputPaths": [REDACTED
sandbox setup:   ],
sandbox setup:   "outputs": {
sandbox setup:     "out": REDACTED
sandbox setup:   },
sandbox setup:   "realStoreDir": "/nix/store",
sandbox setup:   "storeDir": "/nix/store",
sandbox setup:   "system": "aarch64-linux",
sandbox setup:   "tmpDir": "/nix/var/nix/builds/nix-44018-1030707315/build",
sandbox setup:   "tmpDirInSandbox": "/build",
sandbox setup:   "topTmpDir": "/nix/var/nix/builds/nix-44018-1030707315",
sandbox setup:   "version": 1
sandbox setup: }

When running with the --debug flag, output will generally stall at this, until I restart the process. It will, at times, take several tries.

sandbox setup: + busybox udhcpc -i eth0 -s /bin/setup-network
sandbox setup: udhcpc: started, v1.36.1
sandbox setup: udhcpc: broadcasting discover
sandbox setup: udhcpc: broadcasting discover
sandbox setup: udhcpc: broadcasting discover
sandbox setup: udhcpc: broadcasting discover
sandbox setup: udhcpc: broadcasting discover
sandbox setup: udhcpc: broadcasting discover
sandbox setup: udhcpc: broadcasting discover
sandbox setup: udhcpc: broadcasting discover
sandbox setup: udhcpc: broadcasting discover```

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions