From unknown Tue Jun 17 01:50:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17591: Offload hook fails to send files Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 25 May 2014 21:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17591 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 17591@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.140105158014175 (code B ref -1); Sun, 25 May 2014 21:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 May 2014 20:59:40 +0000 Received: from localhost ([127.0.0.1]:59953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WofW7-0003gY-Pf for submit@debbugs.gnu.org; Sun, 25 May 2014 16:59:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53592) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WofW5-0003gL-Oq for submit@debbugs.gnu.org; Sun, 25 May 2014 16:59:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WofVu-0006L3-NC for submit@debbugs.gnu.org; Sun, 25 May 2014 16:59:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WofVu-0006Ky-Kk for submit@debbugs.gnu.org; Sun, 25 May 2014 16:59:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WofVo-0003ns-Th for bug-guix@gnu.org; Sun, 25 May 2014 16:59:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WofVj-0006IR-6i for bug-guix@gnu.org; Sun, 25 May 2014 16:59:20 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:40790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WofVi-0006ID-OU for bug-guix@gnu.org; Sun, 25 May 2014 16:59:15 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 970392AE1 for ; Sun, 25 May 2014 22:59:12 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NPdNWgKfFl+d for ; Sun, 25 May 2014 22:59:12 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 3F9932ADC for ; Sun, 25 May 2014 22:59:12 +0200 (CEST) From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 6 Prairial an 222 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Sun, 25 May 2014 22:59:11 +0200 Message-ID: <87ppj1ziao.fsf@gnu.org> User-Agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.7 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.7 (-----) We=E2=80=99ve been observing things like this (as of v0.6-257-g2508358): --8<---------------cut here---------------start------------->8--- load on machine 'hydra.gnunet.org' is 0.52 (normalized: 0.17333333333333334) @ build-started /gnu/store/wcgr1ddm3d6c166pmf5r17yfw2566w0d-libstdc++-4.8.3= .drv - x86_64-linux /var/log/guix/drvs/wc//gr1ddm3d6c166pmf5r17yfw2566w0d-l= ibstdc++-4.8.3.drv.bz2 sending 2 store files to 'hydra.gnunet.org'... Backtrace: In ice-9/boot-9.scm: 157: 15 [catch #t # ...] In unknown file: ?: 14 [apply-smob/1 #] In ice-9/boot-9.scm: 63: 13 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 432: 12 [eval # #] In ice-9/boot-9.scm: 2320: 11 [save-module-excursion #] 3966: 10 [#] 1645: 9 [%start-stack load-stack ...] 1650: 8 [#] In unknown file: ?: 7 [primitive-load "/usr/local/bin/guix"] In guix/ui.scm: 630: 6 [run-guix-command archive "--import"] In ice-9/boot-9.scm: 157: 5 [catch srfi-34 # ...] 157: 4 [catch system-error ...] In guix/scripts/archive.scm: 327: 3 [#] In guix/store.scm: 768: 2 [import-paths # #] 404: 1 [process-stderr # #] In unknown file: ?: 0 [bytevector-length #] ERROR: In procedure bytevector-length: ERROR: In procedure scm_c_bytevector_length: Wrong type argument in positio= n 1 (expecting bytevector): # builder for `/gnu/store/qbvyn4yq7m92mpp7wvwpx8gnk32863vw-binutils-2.24.drv'= failed to produce output path `/gnu/store/k1hdhfx3b2lkcwkch70fcj998jg7qs7y= -binutils-2.24' --8<---------------cut here---------------end--------------->8--- If we try later the very same thing, it typically succeeds: --8<---------------cut here---------------start------------->8--- @ build-started /gnu/store/wcgr1ddm3d6c166pmf5r17yfw2566w0d-libstdc++-4.8.3= .drv - x86_64-linux /var/log/guix/drvs/wc//gr1ddm3d6c166pmf5r17yfw2566w0d-l= ibstdc++-4.8.3.drv.bz2 sending 2 store files to 'hydra.gnunet.org'... importing path `/gnu/store/5wxd03bpxbw6g4ik9nvq5242p2h1f9zw-binutils-2.24-g= uile-builder' importing path `/gnu/store/qbvyn4yq7m92mpp7wvwpx8gnk32863vw-binutils-2.24.d= rv' offloading '/gnu/store/qbvyn4yq7m92mpp7wvwpx8gnk32863vw-binutils-2.24.drv' = to 'hydra.gnunet.org'... @ build-remote /gnu/store/qbvyn4yq7m92mpp7wvwpx8gnk32863vw-binutils-2.24.dr= v hydra.gnunet.org --8<---------------cut here---------------end--------------->8--- In the first case, =E2=80=98send-files=E2=80=99 appears to be failing early= , before the first store item has been transmitted, because the corresponding =E2=80=9Cimporting path=E2=80=9D message hasn=E2=80=99t been printed yet (i= t=E2=80=99s printed once the contents of the item being imported have been read=E2=80=93see local-store.= cc.) Ludo=E2=80=99. From unknown Tue Jun 17 01:50:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17591: Offload hook fails to send files Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 25 May 2014 21:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17591 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 17591@debbugs.gnu.org Received: via spool by 17591-submit@debbugs.gnu.org id=B17591.140105331416937 (code B ref 17591); Sun, 25 May 2014 21:29:01 +0000 Received: (at 17591) by debbugs.gnu.org; 25 May 2014 21:28:34 +0000 Received: from localhost ([127.0.0.1]:59971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wofy5-0004P6-NF for submit@debbugs.gnu.org; Sun, 25 May 2014 17:28:34 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:43190) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wofy2-0004Ov-6r for 17591@debbugs.gnu.org; Sun, 25 May 2014 17:28:31 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 69AB62AE1 for <17591@debbugs.gnu.org>; Sun, 25 May 2014 23:28:28 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j-vxX973Sf5C for <17591@debbugs.gnu.org>; Sun, 25 May 2014 23:28:28 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 1A0812ADC for <17591@debbugs.gnu.org>; Sun, 25 May 2014 23:28:27 +0200 (CEST) From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87ppj1ziao.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 6 Prairial an 222 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Sun, 25 May 2014 23:28:27 +0200 In-Reply-To: <87ppj1ziao.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sun, 25 May 2014 22:59:11 +0200") Message-ID: <87d2f1zgxw.fsf@gnu.org> User-Agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) This also manifests like this: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build hello --no-substitutes The following derivations will be built: /gnu/store/xi7lgm7vyhzhl1z5dy1mba1yki27xkbm-hello-2.9.drv /gnu/store/xan82azzisn7b69c0y9856wz2diw3ry1-grep-2.18.drv hello from "/home/ludo/soft/etc/guix/machines.scm" (PID 1918) process 1918 acquired build slot '/var/guix/offload/hydra.gnunet.org/0' load on machine 'hydra.gnunet.org' is 0.2 (normalized: 0.06666666666666667) @ build-started /gnu/store/xan82azzisn7b69c0y9856wz2diw3ry1-grep-2.18.drv -= x86_64-linux /var/log/guix/drvs/xa//n82azzisn7b69c0y9856wz2diw3ry1-grep-2.= 18.drv.bz2 sending 2 store files to 'hydra.gnunet.org'... offloading '/gnu/store/xan82azzisn7b69c0y9856wz2diw3ry1-grep-2.18.drv' to '= hydra.gnunet.org'... @ build-remote /gnu/store/xan82azzisn7b69c0y9856wz2diw3ry1-grep-2.18.drv hy= dra.gnunet.org guix build: error: open-file: No such file or directory: "/gnu/store/xan82a= zzisn7b69c0y9856wz2diw3ry1-grep-2.18.drv" derivation '/gnu/store/xan82azzisn7b69c0y9856wz2diw3ry1-grep-2.18.drv' offl= oaded to 'hydra.gnunet.org' failed with exit code 1 --8<---------------cut here---------------end--------------->8--- Ludo=E2=80=99. From unknown Tue Jun 17 01:50:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17591: Offload hook fails to send files Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 27 May 2014 15:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17591 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 17591@debbugs.gnu.org Received: via spool by 17591-submit@debbugs.gnu.org id=B17591.140120382224743 (code B ref 17591); Tue, 27 May 2014 15:18:01 +0000 Received: (at 17591) by debbugs.gnu.org; 27 May 2014 15:17:02 +0000 Received: from localhost ([127.0.0.1]:33538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpJ7d-0006Qp-Lu for submit@debbugs.gnu.org; Tue, 27 May 2014 11:17:02 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:46320) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpJ7b-0006QX-75 for 17591@debbugs.gnu.org; Tue, 27 May 2014 11:17:00 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id AC5E02B1A for <17591@debbugs.gnu.org>; Tue, 27 May 2014 17:16:57 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HjDyZFRYmmny for <17591@debbugs.gnu.org>; Tue, 27 May 2014 17:16:57 +0200 (CEST) Received: from pluto (pluto.bordeaux.inria.fr [193.50.110.57]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 6638429D8 for <17591@debbugs.gnu.org>; Tue, 27 May 2014 17:16:57 +0200 (CEST) From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87ppj1ziao.fsf@gnu.org> <87d2f1zgxw.fsf@gnu.org> Date: Tue, 27 May 2014 17:16:56 +0200 In-Reply-To: <87d2f1zgxw.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sun, 25 May 2014 23:28:27 +0200") Message-ID: <87tx8bb6af.fsf@gnu.org> User-Agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) I modified the offload hook and (guix build utils) so =E2=80=98cat=E2=80=99= is used instead of =E2=80=98xz=E2=80=99. When tracing sshd on the target machine and looking at the =E2=80=98guix ar= chive --import=E2=80=99 process in a failure case we see: --8<---------------cut here---------------start------------->8--- 21927 connect(10, {sa_family=3DAF_FILE, path=3D"/usr/local/var/guix/daemon-= socket/socket"}, 42) =3D 0 21927 write(10, "cxin\0\0\0\0", 8) =3D 8 21927 read(10, "oixd\0\0\0\0", 8) =3D 8 21927 read(10, "\16\1\0\0\0\0\0\0", 8) =3D 8 21927 write(10, "\f\1\0\0\0\0\0\0", 8) =3D 8 21927 write(10, "\1\0\0\0\0\0\0\0", 8) =3D 8 21927 read(10, "stla\0\0\0\0", 8) =3D 8 21927 write(10, "\33\0\0\0\0\0\0\0", 8) =3D 8 21927 read(10, "atad\0\0\0\0", 8) =3D 8 21927 read(10, "\0\200\0\0\0\0\0\0", 8) =3D 8 21927 read(0, "\1\0\0\0\0\0\0\0\r\0\0\0\0\0\0\0nix-archive-1\0\0\0\1\0\0\0\= 0\0\0\0(\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0type\0\0\0\0\7\0\0\0\0\0\0\0regular\0= \10\0\0\0\0\0\0\0contents\255\10\0\0\0\0\0\0(begin (use-modules (guix build= gnu-build-system) (guix build utils)) (define %output (getenv \"out\")) (d= efine %outputs (map (lambd"..., 4096) =3D 4096 21927 read(0, "C1B08ED62008395B0764CD9B55E80DA0A2B61C698DC27EA98E68BB576ACF= C2B91B4D7283E7D960948D049D6E3C4CB1F489B460A120A4BB6C04A843FD3A67454136DE61C= F68A927871EFFA9141BD372A748593C703E0301F039A9E674C50301BFC385BABE5B154250E7= D57B82DB31F1E1AC696F870D"..., 4096) =3D 4096 21927 read(0, [...] 21927 <... read resumed> "ile-builder\0\0\0\0\0;\0\0\0\0\0\0\0/gnu/store/ip= 4w122y4wlkw9n1nb6g2sbz4ql0m8dy-patch-2.7.1.drv\0\0\0\0\0009\0\0\0\0\0\0\0/g= nu/store/j6gq2p03mxjlmhmamg2mxixdf13djd60-grep-2.18.drv\0\0\0\0\0\0\0008\0\= 0\0\0\0\0\0/gnu/store/k3azrhdbjrdhjc3vlx154069imcql8jn-bash-4.3.drv;\0\0\0\= 0\0\0\0/g"..., 4096) =3D 2880 21926 <... write resumed> ) =3D 2880 21927 read(0, 21926 read(0, "", 65536) =3D 0 21926 close(0) =3D 0 21926 close(1 21927 <... read resumed> "", 4096) =3D 0 21926 <... close resumed> ) =3D 0 21926 close(2) =3D 0 21927 write(10, "@+\0\0\0\0\0\0", 8 21926 exit_group(0) =3D ? 21927 <... write resumed> ) =3D 8 21927 write(10, "\1\0\0\0\0\0\0\0\0000\213\1\0\0\0\0nix-archive-1\0\0\0\1\0= \0\0\0\0\0\0 0\213\1\0\0\0\0\4\0\0\0\0\0\0\0type\0\0\0\0\7\0\0\0\0\0\0\0@0\= 213\1\0\0\0\0\10\0\0\0\0\0\0\0contents\255\10\0\0\0\0\0\0`0\213\1\0\0\0\0us= e-modules (guix build \2000\213\1\0\0\0\0d-system) (guix build ut\2400\213\= 1\0\0\0\0efine %output (getenv \"o\3000\213\1\0\0\0\0efine %outputs (map (l= am\3400"..., 11072 21925 <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) =3D=3D 0}], 0, N= ULL) =3D 21926 --8<---------------cut here---------------end--------------->8--- It reads 11072 bytes (as expected) from stdin, but by the time it writes them on the socket (the last write(10, ...) call), those 11072 bytes got corrupted. The above snippet corresponds to this part of store.scm: --8<---------------cut here---------------start------------->8--- ((=3D k %stderr-read) ;; Read a byte stream from USER-PORT. (let* ((max-len (read-int p)) (data (get-bytevector-n user-port max-len)) (len (bytevector-length data))) (write-int len p) (put-bytevector p data) (write-padding len p) #f)) --8<---------------cut here---------------end--------------->8--- where =E2=80=98data=E2=80=99 is the corrupted bytevector. The good news is that I can reproduce it like this: --8<---------------cut here---------------start------------->8--- $ guix archive --export $(guix build -d coreutils) > t.nar $ while guix archive --import ...] In unknown file: ?: 14 [apply-smob/1 #] In ice-9/boot-9.scm: 63: 13 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 432: 12 [eval # #] In ice-9/boot-9.scm: 2401: 11 [save-module-excursion #] 4050: 10 [#] 1724: 9 [%start-stack load-stack ...] 1729: 8 [#] In unknown file: ?: 7 [primitive-load "/home/ludo/soft/bin/guix"] In guix/ui.scm: 631: 6 [run-guix-command archive "--import"] In ice-9/boot-9.scm: 157: 5 [catch srfi-34 # ...] 157: 4 [catch system-error ...] In guix/scripts/archive.scm: 327: 3 [#] In guix/store.scm: 766: 2 [import-paths # #] 400: 1 [process-stderr # #] In unknown file: ?: 0 [bytevector-length #] ERROR: In procedure bytevector-length: ERROR: In procedure scm_c_bytevector_length: Wrong type argument in positio= n 1 (expecting bytevector): # --8<---------------cut here---------------end--------------->8--- To be continued... Ludo=E2=80=99. From unknown Tue Jun 17 01:50:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17591: Offload hook fails to send files Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 27 May 2014 20:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17591 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 17591@debbugs.gnu.org Received: via spool by 17591-submit@debbugs.gnu.org id=B17591.14012241841110 (code B ref 17591); Tue, 27 May 2014 20:57:02 +0000 Received: (at 17591) by debbugs.gnu.org; 27 May 2014 20:56:24 +0000 Received: from localhost ([127.0.0.1]:33732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpOQ3-0000Hp-Io for submit@debbugs.gnu.org; Tue, 27 May 2014 16:56:23 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:46780) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpOQ0-0000Hf-Vr for 17591@debbugs.gnu.org; Tue, 27 May 2014 16:56:22 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 6CEFF2B2A for <17591@debbugs.gnu.org>; Tue, 27 May 2014 22:56:18 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Aw8unWZdjUJX for <17591@debbugs.gnu.org>; Tue, 27 May 2014 22:56:18 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 011A32908 for <17591@debbugs.gnu.org>; Tue, 27 May 2014 22:56:17 +0200 (CEST) From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87ppj1ziao.fsf@gnu.org> <87d2f1zgxw.fsf@gnu.org> <87tx8bb6af.fsf@gnu.org> Date: Tue, 27 May 2014 22:56:17 +0200 In-Reply-To: <87tx8bb6af.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 27 May 2014 17:16:56 +0200") Message-ID: <87oayjhrf2.fsf@gnu.org> User-Agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > 21927 write(10, "\1\0\0\0\0\0\0\0\0000\213\1\0\0\0\0nix-archive-1\0\0\0\1= \0\0\0\0\0\0\0 0\213\1\0\0\0\0\4\0\0\0\0\0\0\0type\0\0\0\0\7\0\0\0\0\0\0\0@= 0\213\1\0\0\0\0\10\0\0\0\0\0\0\0contents\255\10\0\0\0\0\0\0`0\213\1\0\0\0\0= use-modules (guix build \2000\213\1\0\0\0\0d-system) (guix build ut\2400\21= 3\1\0\0\0\0efine %output (getenv \"o\3000\213\1\0\0\0\0efine %outputs (map = (lam\3400"..., 11072 > 21925 <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) =3D=3D 0}], 0,= NULL) =3D 21926 > > It reads 11072 bytes (as expected) from stdin, but by the time it writes > them on the socket (the last write(10, ...) call), those 11072 bytes got > corrupted. > > The above snippet corresponds to this part of store.scm: > > ((=3D k %stderr-read) > ;; Read a byte stream from USER-PORT. > (let* ((max-len (read-int p)) > (data (get-bytevector-n user-port max-len)) > (len (bytevector-length data))) > (write-int len p) > (put-bytevector p data) > (write-padding len p) > #f)) > > where =E2=80=98data=E2=80=99 is the corrupted bytevector. > > The good news is that I can reproduce it like this: > > $ guix archive --export $(guix build -d coreutils) > t.nar > $ while guix archive --import Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 28 May 2014 15:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17591 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 17591@debbugs.gnu.org Received: via spool by 17591-submit@debbugs.gnu.org id=B17591.14012900298071 (code B ref 17591); Wed, 28 May 2014 15:14:02 +0000 Received: (at 17591) by debbugs.gnu.org; 28 May 2014 15:13:49 +0000 Received: from localhost ([127.0.0.1]:34660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpfY0-000263-S9 for submit@debbugs.gnu.org; Wed, 28 May 2014 11:13:48 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:48312) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpfXv-00025m-If for 17591@debbugs.gnu.org; Wed, 28 May 2014 11:13:43 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 218192B39 for <17591@debbugs.gnu.org>; Wed, 28 May 2014 17:13:37 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0DptVvXD1kPI for <17591@debbugs.gnu.org>; Wed, 28 May 2014 17:13:37 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id B44302B0D for <17591@debbugs.gnu.org>; Wed, 28 May 2014 17:13:36 +0200 (CEST) From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87ppj1ziao.fsf@gnu.org> <87d2f1zgxw.fsf@gnu.org> <87tx8bb6af.fsf@gnu.org> Date: Wed, 28 May 2014 17:13:36 +0200 In-Reply-To: <87tx8bb6af.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 27 May 2014 17:16:56 +0200") Message-ID: <87k396djhb.fsf@gnu.org> User-Agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > $ guix archive --export $(guix build -d coreutils) > t.nar > $ while guix archive --import 8--- (use-modules (guix) (gnu packages base) (rnrs io ports)) (with-store store (let* (;; (drv (package-derivation store coreutils)) ;; (dump (call-with-bytevector-output-port ;; (lambda (port) ;; (export-paths store (list (derivation-file-name drv)) ;; port)))) (dump (call-with-input-file "t.nar" get-bytevector-all))) (unless (pair? (pk 'import (import-paths store (open-bytevector-input-port du= mp)))) (format #t "attach GDB to ~a, call GC_default_print_heap_obj_proc,etc.~%" (getpid)) (sleep 1000) (exit 1)))) --8<---------------cut here---------------end--------------->8--- Also useful is to modify libguile like this: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c index be8b654..9a8902f 100644 --- a/libguile/bytevectors.c +++ b/libguile/bytevectors.c @@ -315,10 +315,14 @@ scm_c_shrink_bytevector (SCM bv, size_t c_new_len) SCM_BYTEVECTOR_SET_LENGTH (bv, c_new_len); if (SCM_BYTEVECTOR_CONTIGUOUS_P (bv)) + { + fprintf (stderr, "%s %zi -> %zi\n", __func__, c_len, c_new_len); new_bv = PTR2SCM (scm_gc_realloc (SCM2PTR (bv), c_len + SCM_BYTEVECTOR_HEADER_BYTES, c_new_len + SCM_BYTEVECTOR_HEADER_BYTES, SCM_GC_BYTEVECTOR)); + printf ("new_bv = %p, bv = %p\n", new_bv, bv); + } else { signed char *c_bv; --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Here I see uninteresting things like: --8<---------------cut here---------------start------------->8--- scm_c_shrink_bytevector 32768 -> 6960 new_bv =3D 0x1e96000, bv =3D 0x1e9a000 importing path `/gnu/store/5nhsz368f88bbgkjjwzz5k24nnnrk544-coreutils-8.22.= drv' ;;; (import ("/gnu/store/5nhsz368f88bbgkjjwzz5k24nnnrk544-coreutils-8.22.dr= v")) scm_c_shrink_bytevector 32768 -> 6960 new_bv =3D 0x1efb000, bv =3D 0x1eff000 ;;; (import ()) attach GDB to 10124 --8<---------------cut here---------------end--------------->8--- Then I can call GC_default_print_heap_obj_proc(0x1efb000) from GDB, which displays: --8<---------------cut here---------------start------------->8--- object at 0x1efb000 of appr. 6992 bytes (atomic) --8<---------------cut here---------------end--------------->8--- IOW, everything looks alright, except that the contents of new_bv really are corrupt. Ludo=E2=80=99. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 28 11:14:12 2014 Received: (at control) by debbugs.gnu.org; 28 May 2014 15:14:12 +0000 Received: from localhost ([127.0.0.1]:34664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpfYN-00027A-4f for submit@debbugs.gnu.org; Wed, 28 May 2014 11:14:11 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:48320) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpfYG-00026T-NR for control@debbugs.gnu.org; Wed, 28 May 2014 11:14:05 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 258452B39 for ; Wed, 28 May 2014 17:14:00 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WNMgg+HkIxez for ; Wed, 28 May 2014 17:14:00 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id CA30327EE for ; Wed, 28 May 2014 17:13:59 +0200 (CEST) Date: Wed, 28 May 2014 17:13:59 +0200 Message-Id: <87iooqdjgo.fsf@gnu.org> To: control@debbugs.gnu.org From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: control message for bug #17591 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) reassign 17591 guile From debbugs-submit-bounces@debbugs.gnu.org Wed May 28 11:24:46 2014 Received: (at control) by debbugs.gnu.org; 28 May 2014 15:24:46 +0000 Received: from localhost ([127.0.0.1]:34679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wpfib-0002On-Qx for submit@debbugs.gnu.org; Wed, 28 May 2014 11:24:46 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:48347) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpfiV-0002OY-Ir for control@debbugs.gnu.org; Wed, 28 May 2014 11:24:40 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id D69742B39 for ; Wed, 28 May 2014 17:24:34 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b8DoO3q+gNsQ for ; Wed, 28 May 2014 17:24:34 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 868ED27EE for ; Wed, 28 May 2014 17:24:34 +0200 (CEST) Date: Wed, 28 May 2014 17:24:33 +0200 Message-Id: <87d2eydiz2.fsf@gnu.org> To: control@debbugs.gnu.org From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: control message for bug #17466 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) merge 17466 17591