From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#30365: Offloading sometimes hangs Date: Wed, 07 Feb 2018 21:54:08 +0100 Message-ID: <87inb8zfkf.fsf@gnu.org> References: <877erq8med.fsf@gnu.org> <87o9l0zzk1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejWkD-0005GL-MQ for bug-guix@gnu.org; Wed, 07 Feb 2018 15:55:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ejWkA-0006Qb-K3 for bug-guix@gnu.org; Wed, 07 Feb 2018 15:55:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:53829) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ejWkA-0006Q4-E6 for bug-guix@gnu.org; Wed, 07 Feb 2018 15:55:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ejWkA-0003Vu-6k for bug-guix@gnu.org; Wed, 07 Feb 2018 15:55:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87o9l0zzk1.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 07 Feb 2018 14:42:22 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 30365@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > >> On the build machine side, the guile process that forwards data between >> the sshd and guix-daemon=C2=B9 is stuck on: >> >> read(0, =E2=80=A6) > >> =C2=B9 https://git.savannah.gnu.org/cgit/guix.git/tree/guix/ssh.scm?id= =3D0362e5820ab6a1eb8eaf33bc47e592857c25f765#n102 > > I=E2=80=99ve been able to strace this Guile process. For reference, one way to test this without going through offloading is by: 1. storing the =E2=80=98redirect=E2=80=99 code in a file, say redirect.sc= m; 2. talk to the daemon through a pipe running redirect.scm as with the attached patch. Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline 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)))) --=-=-=--