-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix nix eval nixpkgs#bash
segfault
#10200
Fix nix eval nixpkgs#bash
segfault
#10200
Conversation
`nix eval` forces values and prints derivations as attribute sets, so commands that print derivations (e.g. `nix eval nixpkgs#bash`) will infinitely loop and segfault. Printing derivations as `.drv` paths makes `nix eval` complete as expected. Further work is needed, but this is better than a segfault.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Please add a release note to notify people.
During team discussion we also considered additional behavior, but this seems to be a net-positive regardless of future changes.
Added a release note, PTAL. |
02289e8
to
7f45b1c
Compare
Can we get a backport? I think I'm hitting this. |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.18-maintenance
git worktree add -d .worktree/backport-10200-to-2.18-maintenance origin/2.18-maintenance
cd .worktree/backport-10200-to-2.18-maintenance
git switch --create backport-10200-to-2.18-maintenance
git cherry-pick -x 4910d74086a85876e093136a0e8ebc547b467af7 7f45b1c8d8caf4beeb68c981ae813d6251a7ee63 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.19-maintenance
git worktree add -d .worktree/backport-10200-to-2.19-maintenance origin/2.19-maintenance
cd .worktree/backport-10200-to-2.19-maintenance
git switch --create backport-10200-to-2.19-maintenance
git cherry-pick -x 4910d74086a85876e093136a0e8ebc547b467af7 7f45b1c8d8caf4beeb68c981ae813d6251a7ee63 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.18-maintenance
git worktree add -d .worktree/backport-10200-to-2.18-maintenance origin/2.18-maintenance
cd .worktree/backport-10200-to-2.18-maintenance
git switch --create backport-10200-to-2.18-maintenance
git cherry-pick -x 4910d74086a85876e093136a0e8ebc547b467af7 7f45b1c8d8caf4beeb68c981ae813d6251a7ee63 |
1 similar comment
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.18-maintenance
git worktree add -d .worktree/backport-10200-to-2.18-maintenance origin/2.18-maintenance
cd .worktree/backport-10200-to-2.18-maintenance
git switch --create backport-10200-to-2.18-maintenance
git cherry-pick -x 4910d74086a85876e093136a0e8ebc547b467af7 7f45b1c8d8caf4beeb68c981ae813d6251a7ee63 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.19-maintenance
git worktree add -d .worktree/backport-10200-to-2.19-maintenance origin/2.19-maintenance
cd .worktree/backport-10200-to-2.19-maintenance
git switch --create backport-10200-to-2.19-maintenance
git cherry-pick -x 4910d74086a85876e093136a0e8ebc547b467af7 7f45b1c8d8caf4beeb68c981ae813d6251a7ee63 |
1 similar comment
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.19-maintenance
git worktree add -d .worktree/backport-10200-to-2.19-maintenance origin/2.19-maintenance
cd .worktree/backport-10200-to-2.19-maintenance
git switch --create backport-10200-to-2.19-maintenance
git cherry-pick -x 4910d74086a85876e093136a0e8ebc547b467af7 7f45b1c8d8caf4beeb68c981ae813d6251a7ee63 |
Successfully created backport PR for |
Git push to origin failed for 2.20-maintenance with exitcode 1 |
1 similar comment
Git push to origin failed for 2.20-maintenance with exitcode 1 |
Git push to origin failed for 2.21-maintenance with exitcode 1 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.18-maintenance
git worktree add -d .worktree/backport-10200-to-2.18-maintenance origin/2.18-maintenance
cd .worktree/backport-10200-to-2.18-maintenance
git switch --create backport-10200-to-2.18-maintenance
git cherry-pick -x 4910d74086a85876e093136a0e8ebc547b467af7 7f45b1c8d8caf4beeb68c981ae813d6251a7ee63 |
Successfully created backport PR for |
Git push to origin failed for 2.21-maintenance with exitcode 1 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.19-maintenance
git worktree add -d .worktree/backport-10200-to-2.19-maintenance origin/2.19-maintenance
cd .worktree/backport-10200-to-2.19-maintenance
git switch --create backport-10200-to-2.19-maintenance
git cherry-pick -x 4910d74086a85876e093136a0e8ebc547b467af7 7f45b1c8d8caf4beeb68c981ae813d6251a7ee63 |
Git push to origin failed for 2.20-maintenance with exitcode 1 |
Git push to origin failed for 2.21-maintenance with exitcode 1 |
The bot just opened backport PRs for 2.20 and 2.21 (the other ones didn't apply cleanly), but I actually don't think we can as this is a breaking change (not the fact that it doesn't segfault any more, but |
@thufschmitt Not a breaking change, |
I know (that's why it has been changed here), but it's still a trade-off (this potentially breaks people, and doing that on a patch release is uncool, even for experimental features). Not married to it though, if you think it's worth backporting, feel free to reopen the PRs (I think you have the right, if not ping me). |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2024-03-11-nix-team-meeting-132/42960/1 |
@9999years I believe this still needs a 2.18 backport. |
@kjeremy Yes, it's backported to 2.18, you can use it here: https://lix.systems/ |
nix eval
forces values and prints derivations as attribute sets, so commands that print derivations (e.g.nix eval nixpkgs#bash
) will infinitely loop and segfault.Printing derivations as
.drv
paths makesnix eval
complete as expected. Further work is needed, but this is better than a segfault.