[Nix#9640] segfault during substitution on x86-64_darwin #81
Labels
No labels
Area/build-packaging
Area/evaluator
Area/flakes
Area/profiles
Area/remote-builds
Area/repl
Area/store
bug
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
ux
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#81
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Upstream-Issue: NixOS/nix#9640
I don't know if this is tractable from the Nix side, but I figure it deserves a report since some users are encountering it when they invoke nix commands.
Describe the bug
Since the stdenv bump to LLVM 16 in Nixpkgs, at least some intel mac users have started seeing segfaults when Nix tries to print the size of missing store paths before substituting.
Depending on shell used, these can manifest like:
or:
When Nix is wrapped by something else like
darwin-rebuild
, these may also just be indicated by exit status (status139
in one known case).Reports so far indicate that this affects x86-64_darwin up to at least macOS 10.15.7. A similar segfault has been reported against Nixpkgs. I'm not 100% sure they share a root cause, but that report suggests this may affect up to macOS 11.x but not 12.x:
Steps To Reproduce
nix-shell -p cowsay --dry-run
Additional context
Here's the most-relevant part of the crash dump (full copy: nix_2023-12-17-113156_b8793364.txt):
The segfaults happen when
printMissing
tries toprintMsg
the float document/NAR sizes here:7f5ed330e4/src/libmain/shared.cc (L67-L79)
We can work around the crash with
--option print-missing false
because Nix only ends up on this code path whenprint-missing
is true (though it is the default):7f5ed330e4/src/nix-store/nix-store.cc (L155-L156)
Related posts/reports:
Priorities
Add 👍 to issues you find important.
appears to have been an abi violation that is since fixed in nixpkgs?