From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#17591: Offload hook fails to send files Date: Wed, 28 May 2014 17:13:36 +0200 Message-ID: <87k396djhb.fsf@gnu.org> References: <87ppj1ziao.fsf@gnu.org> <87d2f1zgxw.fsf@gnu.org> <87tx8bb6af.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpfYQ-000791-Cv for bug-guix@gnu.org; Wed, 28 May 2014 11:14:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WpfYJ-0004ue-Ku for bug-guix@gnu.org; Wed, 28 May 2014 11:14:10 -0400 Received: from debbugs.gnu.org ([140.186.70.43]:35784) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpfYJ-0004uV-8s for bug-guix@gnu.org; Wed, 28 May 2014 11:14:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WpfYI-00026k-H4 for bug-guix@gnu.org; Wed, 28 May 2014 11:14:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: 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") 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-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: 17591@debbugs.gnu.org --=-=-= 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. --=-=-=--