Skip to content

Conversation

@h0nIg
Copy link
Contributor

@h0nIg h0nIg commented Nov 20, 2025

We were wondering why nix builds were failing, where the nix store is located on a virtual filesystem / fuse. In our case it is a store located on a lazy pulling enabled OCI image. We use estargz / zstd:chunked images, where fuse is used to start the container right away (and pulling the rest of the image in the background)

# nix profile upgrade runtime 
error: Cannot build '/nix/store/nccvdkcbvrl9y35f7ngw9x8qpcvbp7kp-devtools.drv'.
       Reason: builder failed with exit code 2.
       Output paths:
         /nix/store/2sj7yjv2756y16nz5f1azszgms4vix8z-devtools
       Last 1 log lines:
       > pkgs.buildEnv error: Died at /nix/store/4z0grds97rmripxps6b0kby1fr3g35cp-builder.pl line 77.
       For full logs, run:
         nix log /nix/store/nccvdkcbvrl9y35f7ngw9x8qpcvbp7kp-devtools.drv
error: build of '/nix/store/nccvdkcbvrl9y35f7ngw9x8qpcvbp7kp-devtools.drv^out' failed

This boils down to the POSIX standard, where "." and ".." are optional and SHALL get displayed (not MUST).

see https://pubs.opengroup.org/onlinepubs/9799919799/functions/readdir.html

The nixpkgs code has an assumption that empty directories at least have the result "." and "..", but this is not valid for all FS.

https://perldoc.perl.org/functions/readdir

Returns the next directory entry for a directory opened by opendir.

The nixpkgs code should work in a more relaxed mode, since opendir already checks that the directory is valid and readable. We would appreciate a backport to 25.11. staging as well (I can not set the tags)

# ls -lsa /nix/store/5r2skpf8xr3wjkgix63993cnp99nngsl-file-5.45-man/share/man/
total 0
0 dr-xr-xr-x 2 root root 0 Jan  1  1970 man1
0 dr-xr-xr-x 2 root root 0 Jan  1  1970 man3
0 dr-xr-xr-x 2 root root 0 Jan  1  1970 man4
0 dr-xr-xr-x 2 root root 0 Jan  1  1970 man5
# ls -lsa /nix/store/5r2skpf8xr3wjkgix63993cnp99nngsl-file-5.45-man/share/man/man5
total 0

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.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Nov 20, 2025
@h0nIg h0nIg marked this pull request as ready for review November 20, 2025 12:21
@nixpkgs-ci nixpkgs-ci bot requested a review from philiptaron November 20, 2025 12:28
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Nov 20, 2025
@SuperSandro2000 SuperSandro2000 added the backport staging-25.11 Backport PR automatically label Nov 24, 2025
@SuperSandro2000 SuperSandro2000 added this pull request to the merge queue Nov 24, 2025
Merged via the queue into NixOS:staging with commit 8b8278d Nov 24, 2025
42 of 43 checks passed
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Nov 24, 2025

Successfully created backport PR for staging-25.11:

@github-actions github-actions bot added the 8.has: port to stable This PR already has a backport to the stable release. label Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person. backport staging-25.11 Backport PR automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants