From 5b1715e63349541c1d021f6426b2ad67a0bf518f Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Wed, 2 Oct 2024 15:39:17 +0200 Subject: libstore: forbid addWantedGoals when finished due to event loop scheduling behavior it's possible for a derivation goal to fully finish (having seen all paths it was asked to create), but to not notify the worker of this in time to prevent another goal asking the recently-finished goal for more outputs. if this happened the finished goal would ignore the request for more outputs since it considered itself fully done, and the delayed result reporting would cause the requesting goal to assume its request had been honored. if the requested goal had finished *properly* the worker would recreate it instead of asking for more outputs, and this would succeed. it is thus safe to always recreate goals once they are done, so we now do. Change-Id: Ifedd69ca153372c623abe9a9b49cd1523588814f --- src/libstore/build/worker.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstore/build/worker.hh') diff --git a/src/libstore/build/worker.hh b/src/libstore/build/worker.hh index d6cde8384..cd49fb860 100644 --- a/src/libstore/build/worker.hh +++ b/src/libstore/build/worker.hh @@ -241,7 +241,7 @@ private: std::map> & map, const ID & key, InvocableR> auto create, - std::invocable auto modify + InvocableR auto modify ); std::pair, kj::Promise> makeDerivationGoal( const StorePath & drvPath, -- cgit v1.2.3