diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2020-11-02 11:05:50 +0100 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-11-02 11:05:50 +0100 |
commit | 3fd0eb154ff267536378f4999ac86c8fee3d2d6a (patch) | |
tree | 82c515ca75470ed1e7dba5ccedd06f23774b14a6 | |
parent | 387909454c835c994414aa740a2d33d288064158 (diff) | |
download | cuirass-3fd0eb154ff267536378f4999ac86c8fee3d2d6a.tar cuirass-3fd0eb154ff267536378f4999ac86c8fee3d2d6a.tar.gz |
Revert "Use a non-blocking socket for store communication."
This reverts commit 387909454c835c994414aa740a2d33d288064158 that causes:
2020-11-02T11:05:08 fatal: uncaught exception 'wrong-type-arg' in 'build' fiber!
2020-11-02T11:05:08 exception arguments: ("struct-vtable" "Wrong type argument in position 1 (expecting struct): ~S" (#f) (#f))
In ice-9/boot-9.scm:
1731:15 12 (with-exception-handler #<procedure 7fb1a93f9930 at ic…> …)
1736:10 11 (with-exception-handler _ _ #:unwind? _ # _)
718:2 10 (call-with-prompt ("break") #<procedure 7fb1ab76f440 a…> …)
718:2 9 (call-with-prompt ("continue") #<procedure 7fb1ab77084…> …)
In ice-9/eval.scm:
619:8 8 (_ #(#(#<directory (guile-user) 7fb1ac680f00> #<var…> …)))
In srfi/srfi-1.scm:
634:9 7 (for-each #<procedure 7fb1a9525900 at cuirass/base.scm…> …)
In ice-9/boot-9.scm:
1731:15 6 (with-exception-handler #<procedure 7fb1a95a94e0 at ic…> …)
1669:16 5 (raise-exception _ #:continuable? _)
1764:13 4 (_ #<&compound-exception components: (#<&assertion-fail…>)
In cuirass/utils.scm:
319:8 3 (_ _ . _)
In ice-9/boot-9.scm:
1731:15 2 (with-exception-handler #<procedure 7fb1ab2e3720 at ic…> …)
In cuirass/utils.scm:
320:22 1 (_)
In unknown file:
0 (make-stack #t)
ERROR: In procedure make-stack:
In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #f
-rw-r--r-- | src/cuirass/base.scm | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm index 7f4cc3c..1966ad6 100644 --- a/src/cuirass/base.scm +++ b/src/cuirass/base.scm @@ -36,9 +36,6 @@ #:use-module ((guix config) #:select (%state-directory)) #:use-module (git) #:use-module (ice-9 binary-ports) - #:use-module ((ice-9 suspendable-ports) - #:select (current-read-waiter - current-write-waiter)) #:use-module (ice-9 format) #:use-module (ice-9 match) #:use-module (ice-9 popen) @@ -82,12 +79,7 @@ ;; currently closes in a 'dynamic-wind' handler, which means it would close ;; the store at each context switch. Remove this when the real 'with-store' ;; has been fixed. - (let* ((store (open-connection)) - (socket (store-connection-socket store))) - ;; Mark SOCKET as non-blocking so Fibers can schedule the way it wants. - (let ((flags (fcntl socket F_GETFL))) - (fcntl socket F_SETFL (logior O_NONBLOCK flags))) - + (let ((store (open-connection))) (unwind-protect ;; Always set #:keep-going? so we don't stop on the first build failure. ;; Set #:print-build-trace explicitly to make sure 'process-build-log' @@ -430,12 +422,7 @@ Essentially this procedure inverts the inversion-of-control that (lambda () (guard (c ((store-error? c) (atomic-box-set! result c))) - (parameterize ((current-build-output-port output) - - ;; STORE's socket is O_NONBLOCK but since we're - ;; not in a fiber, disable Fiber's handlers. - (current-read-waiter #f) - (current-write-waiter #f)) + (parameterize ((current-build-output-port output)) (let ((x (build-derivations store lst))) (atomic-box-set! result x)))) (close-port output)) |