Skip to content

Conversation

@philiptaron
Copy link
Contributor

Changelog: Nix 2.32.5

Bug Fixes

Critical Crashes Fixed

  • Fix heap-use-after-free crash under high build load (#14772)

    Fixed a daemon segfault that could occur under high build load. The issue was caused by the initialOutputs field referencing data from an activation frame that had gone out of scope during coroutine tail-call optimization in the build scheduler.

  • Fix segfault when querying non-existent derivation files (#14571, #14572)

    Running nix derivation show /nix/store/...-doesnotexist.drv would crash with a segfault. Now properly returns an "invalid store path" error.

  • Fix RestrictedStore::addDependency crash (#14729)

    Fixed a crash caused by incorrect non-virtual interface pattern implementation that led to bad recursion/UB in addDependencyPrep.

Regressions Fixed

  • Fix "dynamic attributes not allowed in let" regression (#14642, #14646)

    Expressions like let a = 1; "b" = 2; ${"c"} = 3; in [ a b c ] that worked in 2.30 would incorrectly fail in 2.32.x. This was caused by the ExprString arena optimization, which has been reverted.

  • Fix fetchGit with ref = "HEAD" regression (#13948, #14672)

    fetchGit { url = "..."; ref = "HEAD"; } was broken and returned "revspec 'HEAD' not found".

  • Fix unnecessary substituter queries (#14836, #14837)

    Fixed a regression where Nix would query all substituters (including cache.nixos.org) even when a higher-priority local substituter already had the path. This caused unnecessary network traffic.

Platform-Specific Fixes

  • Fix curl with c-ares failing DNS resolution in macOS sandbox (#14792)

    When curl is built with c-ares (as in recent nixpkgs), DNS resolution would fail inside the Nix build sandbox on macOS with "Could not contact DNS servers".

Store & File System Fixes

  • Fix file system race conditions in store optimization (#14676, #7273)

    Multiple fixes to optimizePath_:

    • Actually call remove() when rename() fails
    • Propagate error codes in createSymlink()
    • Make AutoDelete non-copyable and non-movable to prevent use-after-free

Improvements

  • Include path in world-writable error messages (#14785)

    The error message for world-writable directory checks now includes the specific path that failed, making debugging easier.

  • Documentation: correct build-dir error information (#14745)

    Fixed out-of-date information in the manual about build-dir errors and added links to relevant settings.

Maintenance

  • CI improvements: added upload-release.yml workflow, improved Docker push workflow configurability, updated magic-nix-cache with post-build-hook fix
  • Documented maintainer git tag signing process
  • Fixed lowdown override compatibility with newer nixpkgs
  • Removed mdbook-linkcheck and added support for mdbook 0.5.x
  • Remove static data from headers to fix compilation issues
  • Fix heap-use-after-free crash under high build load (#14772)

Diff: NixOS/nix@2.32.4...2.32.5

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

# Changelog: Nix 2.32.5

## Bug Fixes

### Critical Crashes Fixed

- **Fix heap-use-after-free crash under high build load** ([NixOS#14772](NixOS/nix#14772))

  Fixed a daemon segfault that could occur under high build load. The issue was caused by the `initialOutputs` field referencing data from an activation frame that had gone out of scope during coroutine tail-call optimization in the build scheduler.

- **Fix segfault when querying non-existent derivation files** ([NixOS#14571](NixOS/nix#14571), [NixOS#14572](NixOS/nix#14572))

  Running `nix derivation show /nix/store/...-doesnotexist.drv` would crash with a segfault. Now properly returns an "invalid store path" error.

- **Fix RestrictedStore::addDependency crash** ([NixOS#14729](NixOS/nix#14729))

  Fixed a crash caused by incorrect non-virtual interface pattern implementation that led to bad recursion/UB in `addDependencyPrep`.

### Regressions Fixed

- **Fix "dynamic attributes not allowed in let" regression** ([NixOS#14642](NixOS/nix#14642), [NixOS#14646](NixOS/nix#14646))

  Expressions like `let a = 1; "b" = 2; ${"c"} = 3; in [ a b c ]` that worked in 2.30 would incorrectly fail in 2.32.x. This was caused by the ExprString arena optimization, which has been reverted.

- **Fix fetchGit with `ref = "HEAD"` regression** ([NixOS#13948](NixOS/nix#13948), [NixOS#14672](NixOS/nix#14672))

  `fetchGit { url = "..."; ref = "HEAD"; }` was broken and returned "revspec 'HEAD' not found".

- **Fix unnecessary substituter queries** ([NixOS#14836](NixOS/nix#14836), [NixOS#14837](NixOS/nix#14837))

  Fixed a regression where Nix would query all substituters (including `cache.nixos.org`) even when a higher-priority local substituter already had the path. This caused unnecessary network traffic.

### Platform-Specific Fixes

- **Fix curl with c-ares failing DNS resolution in macOS sandbox** ([NixOS#14792](NixOS/nix#14792))

  When curl is built with c-ares (as in recent nixpkgs), DNS resolution would fail inside the Nix build sandbox on macOS with "Could not contact DNS servers".

### Store & File System Fixes

- **Fix file system race conditions in store optimization** ([NixOS#14676](NixOS/nix#14676), [NixOS#7273](NixOS/nix#7273))

  Multiple fixes to `optimizePath_`:
  - Actually call `remove()` when `rename()` fails
  - Propagate error codes in `createSymlink()`
  - Make `AutoDelete` non-copyable and non-movable to prevent use-after-free

## Improvements

- **Include path in world-writable error messages** ([NixOS#14785](NixOS/nix#14785))

  The error message for world-writable directory checks now includes the specific path that failed, making debugging easier.

- **Documentation: correct `build-dir` error information** ([NixOS#14745](NixOS/nix#14745))

  Fixed out-of-date information in the manual about `build-dir` errors and added links to relevant settings.

## Maintenance

- CI improvements: added `upload-release.yml` workflow, improved Docker push workflow configurability, updated magic-nix-cache with post-build-hook fix
- Documented maintainer git tag signing process
- Fixed lowdown override compatibility with newer nixpkgs
- Removed mdbook-linkcheck and added support for mdbook 0.5.x
- Remove static data from headers to fix compilation issues
- **Fix heap-use-after-free crash under high build load** ([NixOS#14772](NixOS/nix#14772))

---

Diff: NixOS/nix@2.32.4...2.32.5
@philiptaron philiptaron requested a review from xokdvium January 5, 2026 14:46
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. labels Jan 5, 2026
@philiptaron
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 477176
Commit: dad8d3a09f0a898c5106cce1088aee49c78d7a18


x86_64-darwin

✅ 9 packages built:
  • colmena
  • nix-eval-jobs
  • nix-eval-jobs.dev
  • nix-fast-build
  • nix-fast-build.dist
  • nixVersions.latest (nixVersions.nix_2_32)
  • nixVersions.latest.dev (nixVersions.nix_2_32.dev)
  • nixVersions.latest.doc (nixVersions.nix_2_32.doc)
  • nixVersions.latest.man (nixVersions.nix_2_32.man)

@philiptaron
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 477176
Commit: dad8d3a09f0a898c5106cce1088aee49c78d7a18


x86_64-linux

❌ 2 packages failed to build:
  • hydra
  • hydra.doc
✅ 9 packages built:
  • colmena
  • nix-eval-jobs
  • nix-eval-jobs.dev
  • nix-fast-build
  • nix-fast-build.dist
  • nixVersions.latest (nixVersions.nix_2_32)
  • nixVersions.latest.dev (nixVersions.nix_2_32.dev)
  • nixVersions.latest.doc (nixVersions.nix_2_32.doc)
  • nixVersions.latest.man (nixVersions.nix_2_32.man)

Error logs: `x86_64-linux`
hydra
      CPU Usage: 575%
    -->  Result: FAILED  <--

1..1
not ok 1 - Passed tests when run by yath
stderr:
test.pl: Defaulting $YATH_JOB_COUNT to $NIX_BUILD_CORES (32)
yath exited with 256

Summary of Failures:

1/2 perlcritic FAIL 4.45s exit status 2
2/2 testsuite FAIL 80.38s (exit status 255 or signal 127 SIGinvalid)

Ok: 0
Fail: 2

Full log written to /build/source/build/meson-logs/testlog.txt

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jan 5, 2026
@philiptaron
Copy link
Contributor Author

Hydra's currently broken on master.

@philiptaron philiptaron added this pull request to the merge queue Jan 5, 2026
Merged via the queue into NixOS:master with commit 451cdfd Jan 5, 2026
32 of 34 checks passed
@philiptaron philiptaron deleted the nix-2.32.5 branch January 5, 2026 18:05
@Lyndeno
Copy link
Contributor

Lyndeno commented Jan 13, 2026

Hydra is still broken on unstable

@Lyndeno
Copy link
Contributor

Lyndeno commented Jan 13, 2026

Apologies, I got confused and thought this PR broke Hydra. I see it was broken before now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants