bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30365: Offloading sometimes hangs


From: Ludovic Courtès
Subject: bug#30365: Offloading sometimes hangs
Date: Wed, 07 Feb 2018 21:54:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

address@hidden (Ludovic Courtès) skribis:

> address@hidden (Ludovic Courtès) skribis:
>
>> On the build machine side, the guile process that forwards data between
>> the sshd and guix-daemon¹ is stuck on:
>>
>>   read(0, …)
>
>> ¹ 
>> https://git.savannah.gnu.org/cgit/guix.git/tree/guix/ssh.scm?id=0362e5820ab6a1eb8eaf33bc47e592857c25f765#n102
>
> I’ve been able to strace this Guile process.

For reference, one way to test this without going through offloading is by:

  1. storing the ‘redirect’ code in a file, say redirect.scm;
  2. talk to the daemon through a pipe running redirect.scm as with the
     attached patch.

Ludo’.

diff --git a/guix/store.scm b/guix/store.scm
index 6742611c6..b38e5bc23 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -473,6 +473,7 @@ name."
 
   (connect uri))
 
+(use-modules (ice-9 popen))
 (define* (open-connection #:optional (uri (%daemon-socket-uri))
                           #:key port (reserve-space? #t) cpu-affinity)
   "Connect to the daemon at URI (a string), or, if PORT is not #f, use it as
@@ -491,7 +492,14 @@ for this connection will be pinned.  Return a server 
object."
                                             (errno EPROTO))
                      (&message (message "build daemon handshake failed"))))))
     (let*-values (((port)
-                   (or port (connect-to-daemon uri)))
+                   (or port
+                       (with-fluids ((%default-port-encoding "ISO-8859-1"))
+                        (open-pipe* OPEN_BOTH;;  "strace" "-t" "-o"
+                                    ;; "/home/ludo/redirect.log"
+                                    ;; "-s" "1024"
+                                    "guile" 
"/home/ludo/src/guix/redirect.scm"))
+                       ;; (connect-to-daemon uri)
+                       ))
                   ((output flush)
                    (buffering-output-port port
                                           (make-bytevector 8192))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]