[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Fix GC race-condition in spawn-builds.
From: |
Mathieu Othacehe |
Subject: |
branch master updated: Fix GC race-condition in spawn-builds. |
Date: |
Fri, 18 Sep 2020 05:02:59 -0400 |
This is an automated email from the git hooks/post-receive script.
mothacehe pushed a commit to branch master
in repository guix-cuirass.
The following commit(s) were added to refs/heads/master by this push:
new e7bebbe Fix GC race-condition in spawn-builds.
e7bebbe is described below
commit e7bebbe3d4bbd9103b8a2e71e62dfbaef9a928ab
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Fri Sep 18 10:53:52 2020 +0200
Fix GC race-condition in spawn-builds.
If a derivation is GC'd just before calling "spawn-builds",
"build-derivations: will throw an exception that will be catched. Then,
"update-build-statuses!" will call "derivation-path->output-paths" that
will
throw another exception because the derivation does not exit. This exception
is not handled, causing Cuirass to crash.
2020-09-18T10:41:18 batch of builds (partially) failed: build of
`/gnu/store/zrmxzjf025nc89a7vdy5i94zavprc7fs-emacs-guix-0.5.2-2.58a840d.drv'
failed (status: 1)
Backtrace:
In ice-9/boot-9.scm:
1736:10 11 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In unknown file:
10 (apply-smob/0 #<thunk 7ffff5cbd4a0>)
In ice-9/boot-9.scm:
718:2 9 (call-with-prompt _ _ #<procedure default-prompt-handler (k
proc)>)
In ice-9/eval.scm:
619:8 8 (_ #(#(#<directory (guile-user) 7ffff58f8f00>)))
In ice-9/boot-9.scm:
2806:4 7 (save-module-excursion _)
4351:12 6 (_)
In cuirass/base.scm:
562:10 5 (spawn-builds #<store-connection 256.99 7fffec03f910> _
#:max-batch-size _)
In srfi/srfi-1.scm:
634:9 4 (for-each #<procedure update! (drv)>
("/gnu/store/zrmxzjf025nc89a7vdy5i94zavprc7fs-emacs-guix-0.5.2-2.58a840d.drv"))
In cuirass/base.scm:
474:4 3 (update!
"/gnu/store/zrmxzjf025nc89a7vdy5i94zavprc7fs-emacs-guix-0.5.2-2.58a840d.drv")
In guix/derivations.scm:
552:17 2 (derivation-path->output-paths
"/gnu/store/zrmxzjf025nc89a7vdy5i94zavprc7fs-emacs-guix-0.5.2-2.58a840d.drv")
In ice-9/ports.scm:
440:11 1 (call-with-input-file
"/gnu/store/zrmxzjf025nc89a7vdy5i94zavprc7fs-emacs-guix-0.5.2-2.58a840d.drv"
#<procedure read-derivation (drv-port #:optional read-derivation-from-file)>
#:binary _ …)
In unknown file:
0 (open-file
"/gnu/store/zrmxzjf025nc89a7vdy5i94zavprc7fs-emacs-guix-0.5.2-2.58a840d.drv"
"r" #:encoding #f #:guess-encoding #f)
* src/cuirass/base.scm (update-build-statuses!): Catch
"derivation-path->output-paths" exceptions and set the build status to
"failed".
---
src/cuirass/base.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm
index ec1b467..bce151a 100644
--- a/src/cuirass/base.scm
+++ b/src/cuirass/base.scm
@@ -471,14 +471,17 @@ build products."
been passed to 'build-derivations' (meaning that we can assume that, if their
outputs are invalid, that they failed to build.)"
(define (update! drv)
- (match (derivation-path->output-paths drv)
+ (match (false-if-exception
+ (derivation-path->output-paths drv))
(((_ . outputs) ...)
(if (any (cut valid-path? store <>) outputs)
(set-build-successful! drv)
(db-update-build-status! drv
(if (log-file store drv)
(build-status failed)
- (build-status failed-dependency)))))))
+ (build-status failed-dependency)))))
+ (else
+ (db-update-build-status! drv (build-status failed)))))
(for-each update! lst))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: Fix GC race-condition in spawn-builds.,
Mathieu Othacehe <=