daemon: Strictly respect timeouts for 'guix offload'.

Until now it was up to 'guix offload' to honor timeouts.  Unfortunately
it would sometimes fail to do that, for example due to the libssh bug at
<https://bugs.libssh.org/T33>.  With this change, 'guix offload' is
automatically killed by the daemon when one of the timeouts expires.

Thus, data transfers performed by 'guix offload' now count as part of
the timeouts, rather than just actual build time.

* nix/libstore/build.cc (DerivationGoal::tryBuildHook): Pass true as the
'respectTimeouts' argument to 'childStarted'.
This commit is contained in:
Ludovic Courtès 2019-09-28 18:06:15 +02:00
parent a3af06ad65
commit ada9a19a2d
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 1 additions and 1 deletions

View File

@ -1648,7 +1648,7 @@ HookReply DerivationGoal::tryBuildHook()
set<int> fds; set<int> fds;
fds.insert(hook->fromHook.readSide); fds.insert(hook->fromHook.readSide);
fds.insert(hook->builderOut.readSide); fds.insert(hook->builderOut.readSide);
worker.childStarted(shared_from_this(), hook->pid, fds, false, false); worker.childStarted(shared_from_this(), hook->pid, fds, false, true);
if (settings.printBuildTrace) if (settings.printBuildTrace)
printMsg(lvlError, format("@ build-started %1% - %2% %3% %4%") printMsg(lvlError, format("@ build-started %1% - %2% %3% %4%")