Skip to content

Commit

Permalink
Add more instrumentation for NixOS#4270
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Feb 5, 2021
1 parent d7c27f2 commit 480426a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libstore/build/derivation-goal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1784,12 +1784,14 @@ void DerivationGoal::startBuilder()
worker.childStarted(shared_from_this(), {builderOut.readSide.get()}, true, true);

/* Check if setting up the build environment failed. */
std::vector<std::string> msgs;
while (true) {
string msg = [&]() {
try {
return readLine(builderOut.readSide.get());
} catch (Error & e) {
e.addTrace({}, "while reading the response of setting up the build environment");
e.addTrace({}, "while waiting for the build environment to initialize (previous messages: %s)",
concatStringsSep("|", msgs));
throw e;
}
}();
Expand All @@ -1801,6 +1803,7 @@ void DerivationGoal::startBuilder()
throw ex;
}
debug("sandbox setup: " + msg);
msgs.push_back(std::move(msg));
}
}

Expand Down

0 comments on commit 480426a

Please sign in to comment.