Open
Description
Describe the bug
When I try to build ca derivations I get sporadic errors about "bad file descriptor"s. Sometimes they are built and sometimes not.
Steps To Reproduce
$ nix build --impure --expr '(import <nixpkgs> { config.contentAddressedByDefault = true; }).htop'
error (ignored): error: closing file descriptor 39: Bad file descriptor
error (ignored): error: closing file descriptor 25: Bad file descriptor
error: substitution of 'sha256:7abd5b35fa87ed09127c7f67000ef79752dbc9d33da6ee334a48f2bc7158eb38!out': read failed: Bad file descriptor
Same command again gives another output
error (ignored): error: cannot unlink '/tmp/nix-build-boost-build-boost-1.69.0.drv-0/boost_1_69_0/boost': Directory not empty
error (ignored): error: cannot unlink '/tmp/nix-build-audit-2.8.5.drv-0/audit-2.8.5': Directory not empty
error: closing file descriptor 23: Bad file descriptor
I've built nix from master (the latest commit) but I had the same problem with current nixos-unstable
's nix (2.8) and even with nixUnstable
on stable (2.5)
$ nix-env --version
nix-env (Nix) 2.9.0
$ nix show-config
accept-flake-config = false
access-tokens =
allow-dirty = true
allow-import-from-derivation = true
allow-new-privileges = false
allow-symlinked-store = false
allow-unsafe-native-code-during-evaluation = false
allowed-impure-host-deps =
allowed-uris =
allowed-users = @wheel
auto-optimise-store = false
bash-prompt =
bash-prompt-suffix =
build-hook = /nix/store/7xc0d4pkxm2mly6glp5svqyp8qvfva7b-nix-2.8.0/libexec/nix/build-remote
build-poll-interval = 5
build-users-group = nixbld
builders =
builders-use-substitutes = false
commit-lockfile-summary =
compress-build-log = true
connect-timeout = 0
cores = 0
diff-hook =
download-attempts = 5
enforce-determinism = true
eval-cache = true
experimental-features = ca-derivations flakes nix-command
extra-platforms = aarch64-linux i686-linux
fallback = false
filter-syscalls = true
flake-registry = https://github.com/NixOS/flake-registry/raw/master/flake-registry.json
fsync-metadata = true
gc-reserved-space = 8388608
hashed-mirrors =
http-connections = 25
http2 = true
ignored-acls = security.selinux system.nfs4_acl
impersonate-linux-26 = false
keep-build-log = true
keep-derivations = true
keep-env-derivations = false
keep-failed = false
keep-going = false
keep-outputs = true
log-lines = 10
max-build-log-size = 0
max-free = 18446744073709551615
max-jobs = 4
max-silent-time = 0
min-free = 0
min-free-check-interval = 5
nar-buffer-size = 33554432
narinfo-cache-negative-ttl = 3600
narinfo-cache-positive-ttl = 2592000
netrc-file = /etc/nix/netrc
nix-path = nixpkgs=/nix/store/ni03h8nnld654lcqrs594lq1g1md818q-source nixos-config=/nix/store/317ij093b6ih587p35fk85sc6pkp58ms-nixos home-manager=/nix/store/33ybk6hkdwfd8w9xglbb42bzad7k3fpn-source
plugin-files =
post-build-hook =
pre-build-hook =
preallocate-contents = false
print-missing = true
pure-eval = true
repeat = 0
require-sigs = true
restrict-eval = false
run-diff-hook = false
sandbox = true
sandbox-build-dir = /build
sandbox-dev-shm-size = 50%
sandbox-fallback = false
sandbox-paths = /bin/sh=/nix/store/z7hbia18niwzbaxydjyainfbnwc90xgv-busybox-static-x86_64-unknown-linux-musl-1.35.0/bin/busybox /nix/store/d5djp7cj3jsqy4m3lg4nvhfkka9pkhlm-qemu-6.1.1 /nix/store/l5smdvmw3nim4bndhddbxikaz9mfjpwj-bash-5.1-p8 /run/binfmt
secret-key-files =
show-trace = false
stalled-download-timeout = 300
store = auto
substitute = true
substituters = https://nrdxp.cachix.org https://nixpkgs-wayland.cachix.org https://nix-community.cachix.org https://hydra.iohk.io https://cache.ngi0.nixos.org/ https://arm.cachix.org https://aciceri-fleet.cachix.org https://cache.nixos.org/ https://cache.nixos.org/ https://nrdxp.cachix.org https://nix-community.cachix.org
sync-before-registering = false
system = x86_64-linux
system-features = benchmark big-parallel kvm nixos-test
tarball-ttl = 3600
timeout = 0
trace-function-calls = false
trusted-public-keys = nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA= arm.cachix.org-1:K3XjAeWPgWkFtSS9ge5LJSLw3xgnNqyOaG7MDecmTQ8= aciceri-fleet.cachix.org-1:WiHJIK4UFTdfvWx0lG3mCR4EddyYsRhIuMGSje3/YGI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
trusted-substituters =
trusted-users = root @wheel hydra-queue-runner
use-case-hack = false
use-registries = true
use-sqlite-wal = true
user-agent-suffix =
warn-dirty = true
Additional context
Sometimes I get "core dumped" in the nix daemon logs but not necessarily.
Activity