From 8ca5f045d232124e97069a30253853abc66be03e Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 30 Jan 2023 12:25:59 +0000 Subject: Tweak error handing around reading derivaitons when submitting builds I don't think the alarm based with-timeout was working, so remove that and make the exception handling more general. --- guix-build-coordinator/client-communication.scm | 36 +++++++++++++------------ 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'guix-build-coordinator/client-communication.scm') diff --git a/guix-build-coordinator/client-communication.scm b/guix-build-coordinator/client-communication.scm index e796bd8..926c4f4 100644 --- a/guix-build-coordinator/client-communication.scm +++ b/guix-build-coordinator/client-communication.scm @@ -435,24 +435,26 @@ ,derivation-file #:read-drv ,(lambda (derivation-file) - (with-timeout 30 - (begin - (log-msg (build-coordinator-logger build-coordinator) - 'WARN - "substituting derivation " derivation-file - " timed out") + (with-exception-handler + (lambda (exn) + (log-msg + (build-coordinator-logger build-coordinator) + 'WARN + "exception substituting derivation " derivation-file + ": " exn) - (if (null? (or substitute-urls '())) - ;; Try again - (read-drv/substitute derivation-file) - (call-with-worker-thread - substitutes-channel - (lambda () - (read-derivation-through-substitutes - derivation-file - substitute-urls))))) - - (read-drv/substitute derivation-file))) + (if (null? (or substitute-urls '())) + ;; Try again + (read-drv/substitute derivation-file) + (call-with-worker-thread + substitutes-channel + (lambda () + (read-derivation-through-substitutes + derivation-file + substitute-urls))))) + (lambda () + (read-drv/substitute derivation-file)) + #:unwind? #t)) ,@(let ((priority (assoc-ref body "priority"))) (if priority `(#:priority ,priority) -- cgit v1.2.3