-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Potential regression due to chroot #11806
Comments
with diff --git a/src/libstore/unix/build/local-derivation-goal.cc b/src/libstore/unix/build/local-derivation-goal.cc
index 2a09e3dd4..12e49d7d3 100644
--- a/src/libstore/unix/build/local-derivation-goal.cc
+++ b/src/libstore/unix/build/local-derivation-goal.cc
@@ -527,6 +527,7 @@ void LocalDerivationGoal::startBuilder()
tmpDir = topTmpDir;
}
chownToBuilder(tmpDir);
+ chownToBuilder(topTmpDir);
for (auto & [outputName, status] : initialOutputs) {
/* Set scratch path we'll actually use during the build. it builds. |
So with actually
So the |
So, it seems there are two potential fixes:
Option 1 is IMO not preferable as it just removes the added security by using a subdir Option 2 seems viable. |
That sounds like a kernel bug... |
Not really, the process is just stuck in "uninterruptible sleep". See e.g. Stack Overflow, LWN. |
FWIW I couldn't reproduce this with Nix 2.24.9 on NixOS 24.05.20241009.d51c286 with kernel 6.1.112. Maybe it's a regression between Linux 6.1 and 6.6?
I mean, it's a bug if there is no good reason for the uninterruptible sleep (like waiting for a hard NFS mount). It would be interesting to know what syscall the unkillable process is in. |
Closing. Issue found not in nix, but in the kernel. See NixOS/nixpkgs#353709 (comment) and NixOS/nixpkgs#353709 (comment) |
Describe the bug
On all nix versions which include the fix 0e4baff (or backports like 1ee7a9b for GHSA-q82p-44mg-mgh5),
yarn install
(and potentiallynpm
) will hang indefinitely due to still unknown reasons.My excerpt from my bug report on nixpkgs NixOS/nixpkgs#353709 :
linux
issue, as thechroot
is deactivated onAPPLE
yarn install
on a working derivation, it will hang and be unkillable. This implies not being terminatable bysudo kill -9 $PID
and will make a shutdown or a reboot also hang. A cold reset is needednix/src/libstore/unix/build/local-derivation-goal.cc
Lines 557 to 558 in b4c05a1
Steps To Reproduce
nix build github:nixos/nixpkgs/71e91c409d1e654808b2621f28a327acfdad8dc2#pgadmin --rebuild
Note: Forever here is at least 48h, as this is the time I had it run.
Note2: This does not happen on the
24-05
Nixos release, as it uses Nix version 2.18.2Expected behavior
pgadmin
should build fine.nix-env --version
outputAdditional context
@roberth @edolstra
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: