From unknown Sat Aug 09 13:15:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17466: unexpected bytevector contents with get-bytevector-n Resent-From: J Kalbhenn Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 11 May 2014 16:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17466 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 17466@debbugs.gnu.org X-Debbugs-Original-To: bug-guile@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.139982702929584 (code B ref -1); Sun, 11 May 2014 16:51:01 +0000 Received: (at submit) by debbugs.gnu.org; 11 May 2014 16:50:29 +0000 Received: from localhost ([127.0.0.1]:59459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WjWxG-0007h3-DV for submit@debbugs.gnu.org; Sun, 11 May 2014 12:50:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45901) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WjRV5-00055r-EI for submit@debbugs.gnu.org; Sun, 11 May 2014 07:01:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjRUr-0007wo-2p for submit@debbugs.gnu.org; Sun, 11 May 2014 07:00:54 -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.0 required=5.0 tests=BAYES_20 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjRUr-0007wk-0p for submit@debbugs.gnu.org; Sun, 11 May 2014 07:00:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjRUk-0007iz-MK for bug-guile@gnu.org; Sun, 11 May 2014 07:00:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjRUe-0007w1-Hj for bug-guile@gnu.org; Sun, 11 May 2014 07:00:38 -0400 Received: from mx02.posteo.de ([89.146.194.165]:37734 helo=posteo.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjRUe-0007qq-7U for bug-guile@gnu.org; Sun, 11 May 2014 07:00:32 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.posteo.de (Postfix) with ESMTP id 2B12F25AF530 for ; Sun, 11 May 2014 13:00:29 +0200 (CEST) X-Virus-Scanned: amavisd-new at posteo.de Received: from posteo.de ([10.125.125.178]) by localhost (amavis1.posteo.de [10.125.125.165]) (amavisd-new, port 10026) with ESMTP id Q8f5xuU1MH_h for ; Sun, 11 May 2014 13:00:28 +0200 (CEST) Received: from mail.posteo.de (localhost [127.0.0.1]) by mail.posteo.de (Postfix) with ESMTPSA id E40C12C00ED for ; Sun, 11 May 2014 13:00:27 +0200 (CEST) Message-ID: <536F5847.6060004@posteo.eu> Date: Sun, 11 May 2014 13:00:23 +0200 From: J Kalbhenn User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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.0 (-----) X-Mailman-Approved-At: Sun, 11 May 2014 12:50:22 -0400 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.0 (-----) concerning the following code example -- (import (rnrs io ports) (ice-9 pretty-print)) (define (problem-part port) (pretty-print (get-bytevector-n port 4096))) (let loop ((count 100)) (if (> count 0) (begin (call-with-input-string "22222222222222222222" problem-part) (loop (- count 1))))) __ when i run it i get output with portions like this -- #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 16 224 240 0 0 0 0 0 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) -- and i would expect the bytevector to always be the same. this first occurred to me in a more complicated scenario where: - the input port is a file-port - pretty-print was used at first and then display instead, but the problem persisted with a much lower frequency system info guile 2.0.11 linux 3.14.2-1-ARCH x86_64 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 From unknown Sat Aug 09 13:15:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17466: unexpected bytevector contents with get-bytevector-n Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 28 May 2014 15:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17466 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: J Kalbhenn Cc: 17466@debbugs.gnu.org Received: via spool by 17466-submit@debbugs.gnu.org id=B17466.14012908209480 (code B ref 17466); Wed, 28 May 2014 15:27:01 +0000 Received: (at 17466) by debbugs.gnu.org; 28 May 2014 15:27:00 +0000 Received: from localhost ([127.0.0.1]:34684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wpfkl-0002Sm-Uw for submit@debbugs.gnu.org; Wed, 28 May 2014 11:26:59 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:48353) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wpfkf-0002SV-Ii for 17466@debbugs.gnu.org; Wed, 28 May 2014 11:26:53 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 04BAA2B39; Wed, 28 May 2014 17:26:49 +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 1MK8Gkgt9EmP; Wed, 28 May 2014 17:26:48 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id A22F627EE; Wed, 28 May 2014 17:26:48 +0200 (CEST) From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <536F5847.6060004@posteo.eu> Date: Wed, 28 May 2014 17:26:47 +0200 In-Reply-To: <536F5847.6060004@posteo.eu> (J. Kalbhenn's message of "Sun, 11 May 2014 13:00:23 +0200") Message-ID: <877g55exfs.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 (+) Hello, J Kalbhenn skribis: > (import (rnrs io ports) (ice-9 pretty-print)) > (define (problem-part port) (pretty-print (get-bytevector-n port 4096))) > > (let loop ((count 100)) > (if (> count 0) > (begin (call-with-input-string "22222222222222222222" problem-part) > (loop (- count 1))))) > __ > > when i run it i get output with portions like this > -- > #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) > #vu8(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) > #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) > #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) > #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) > #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) > #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) > #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) > #vu8(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) > #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) > #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) > #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) > #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) > #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) > #vu8(50 50 50 50 50 50 50 50 16 224 240 0 0 0 0 0 50 50 50 50) > #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) > -- > > and i would expect the bytevector to always be the same. Indeed. I=E2=80=99ve been experiencing that in a more complex scenario too: . The guts of the problem seems to be GC_REALLOC. I=E2=80=99m debugging it n= ow and your reduced test case will be helpful. Ludo=E2=80=99. From unknown Sat Aug 09 13:15:32 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: J Kalbhenn Subject: bug#17466: closed (Re: bug#17466: unexpected bytevector contents with get-bytevector-n) Message-ID: References: <87y4xldd21.fsf@gnu.org> <536F5847.6060004@posteo.eu> X-Gnu-PR-Message: they-closed 17466 X-Gnu-PR-Package: guile Reply-To: 17466@debbugs.gnu.org Date: Wed, 28 May 2014 17:33:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1401298383-2933-1" This is a multi-part message in MIME format... ------------=_1401298383-2933-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #17466: unexpected bytevector contents with get-bytevector-n which was filed against the guile package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 17466@debbugs.gnu.org. --=20 17466: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D17466 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1401298383-2933-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 17466-done) by debbugs.gnu.org; 28 May 2014 17:32:37 +0000 Received: from localhost ([127.0.0.1]:34780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WphiK-0000jx-OH for submit@debbugs.gnu.org; Wed, 28 May 2014 13:32:37 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:48597) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WphiE-0000jd-2L for 17466-done@debbugs.gnu.org; Wed, 28 May 2014 13:32:31 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 992572B3C; Wed, 28 May 2014 19:32:23 +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 KZ6AK6iL90KA; Wed, 28 May 2014 19:32:23 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 3677C27EE; Wed, 28 May 2014 19:32:23 +0200 (CEST) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: J Kalbhenn Subject: Re: bug#17466: unexpected bytevector contents with get-bytevector-n References: <536F5847.6060004@posteo.eu> <877g55exfs.fsf@gnu.org> Date: Wed, 28 May 2014 19:32:22 +0200 In-Reply-To: <877g55exfs.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 28 May 2014 17:26:47 +0200") Message-ID: <87y4xldd21.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-Debbugs-Envelope-To: 17466-done Cc: 17466-done@debbugs.gnu.org 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 is fixed by commit 1baa215, which will be in Guile 2.0.12. It turns out that when shrinking a bytevector, as happens before =E2=80=98get-bytevector-n=E2=80=99 returns, the pointer to the bytevector= =E2=80=99s contents would not be left pointing to the old bytevector. When that old bytevector was eventually reclaimed, anything could happen. Thanks! Ludo=E2=80=99. ------------=_1401298383-2933-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 11 May 2014 16:50:29 +0000 Received: from localhost ([127.0.0.1]:59459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WjWxG-0007h3-DV for submit@debbugs.gnu.org; Sun, 11 May 2014 12:50:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45901) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WjRV5-00055r-EI for submit@debbugs.gnu.org; Sun, 11 May 2014 07:01:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjRUr-0007wo-2p for submit@debbugs.gnu.org; Sun, 11 May 2014 07:00:54 -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.0 required=5.0 tests=BAYES_20 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjRUr-0007wk-0p for submit@debbugs.gnu.org; Sun, 11 May 2014 07:00:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjRUk-0007iz-MK for bug-guile@gnu.org; Sun, 11 May 2014 07:00:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjRUe-0007w1-Hj for bug-guile@gnu.org; Sun, 11 May 2014 07:00:38 -0400 Received: from mx02.posteo.de ([89.146.194.165]:37734 helo=posteo.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjRUe-0007qq-7U for bug-guile@gnu.org; Sun, 11 May 2014 07:00:32 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.posteo.de (Postfix) with ESMTP id 2B12F25AF530 for ; Sun, 11 May 2014 13:00:29 +0200 (CEST) X-Virus-Scanned: amavisd-new at posteo.de Received: from posteo.de ([10.125.125.178]) by localhost (amavis1.posteo.de [10.125.125.165]) (amavisd-new, port 10026) with ESMTP id Q8f5xuU1MH_h for ; Sun, 11 May 2014 13:00:28 +0200 (CEST) Received: from mail.posteo.de (localhost [127.0.0.1]) by mail.posteo.de (Postfix) with ESMTPSA id E40C12C00ED for ; Sun, 11 May 2014 13:00:27 +0200 (CEST) Message-ID: <536F5847.6060004@posteo.eu> Date: Sun, 11 May 2014 13:00:23 +0200 From: J Kalbhenn User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: bug-guile@gnu.org Subject: unexpected bytevector contents with get-bytevector-n Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 11 May 2014 12:50:22 -0400 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.0 (-----) concerning the following code example -- (import (rnrs io ports) (ice-9 pretty-print)) (define (problem-part port) (pretty-print (get-bytevector-n port 4096))) (let loop ((count 100)) (if (> count 0) (begin (call-with-input-string "22222222222222222222" problem-part) (loop (- count 1))))) __ when i run it i get output with portions like this -- #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 16 224 240 0 0 0 0 0 50 50 50 50) #vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50) -- and i would expect the bytevector to always be the same. this first occurred to me in a more complicated scenario where: - the input port is a file-port - pretty-print was used at first and then display instead, but the problem persisted with a much lower frequency system info guile 2.0.11 linux 3.14.2-1-ARCH x86_64 ------------=_1401298383-2933-1-- From unknown Sat Aug 09 13:15:32 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#17591: closed (Re: bug#17466: unexpected bytevector contents with get-bytevector-n) Message-ID: References: <87y4xldd21.fsf@gnu.org> <87ppj1ziao.fsf@gnu.org> X-Gnu-PR-Message: they-closed 17591 X-Gnu-PR-Package: guile Reply-To: 17591@debbugs.gnu.org Date: Wed, 28 May 2014 17:33:04 +0000 Content-Type: multipart/mixed; boundary="----------=_1401298384-2933-3" This is a multi-part message in MIME format... ------------=_1401298384-2933-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #17466: GC_REALLOC in 'get-bytevector-n' leads to corrupt bytevector which was filed against the guile package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 17591@debbugs.gnu.org. --=20 17466: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D17466 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1401298384-2933-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 17466-done) by debbugs.gnu.org; 28 May 2014 17:32:37 +0000 Received: from localhost ([127.0.0.1]:34780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WphiK-0000jx-OH for submit@debbugs.gnu.org; Wed, 28 May 2014 13:32:37 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:48597) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WphiE-0000jd-2L for 17466-done@debbugs.gnu.org; Wed, 28 May 2014 13:32:31 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 992572B3C; Wed, 28 May 2014 19:32:23 +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 KZ6AK6iL90KA; Wed, 28 May 2014 19:32:23 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 3677C27EE; Wed, 28 May 2014 19:32:23 +0200 (CEST) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: J Kalbhenn Subject: Re: bug#17466: unexpected bytevector contents with get-bytevector-n References: <536F5847.6060004@posteo.eu> <877g55exfs.fsf@gnu.org> Date: Wed, 28 May 2014 19:32:22 +0200 In-Reply-To: <877g55exfs.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 28 May 2014 17:26:47 +0200") Message-ID: <87y4xldd21.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-Debbugs-Envelope-To: 17466-done Cc: 17466-done@debbugs.gnu.org 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 is fixed by commit 1baa215, which will be in Guile 2.0.12. It turns out that when shrinking a bytevector, as happens before =E2=80=98get-bytevector-n=E2=80=99 returns, the pointer to the bytevector= =E2=80=99s contents would not be left pointing to the old bytevector. When that old bytevector was eventually reclaimed, anything could happen. Thanks! Ludo=E2=80=99. ------------=_1401298384-2933-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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?=) To: bug-guix@gnu.org Subject: Offload hook fails to send files 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-Debbugs-Envelope-To: submit 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. ------------=_1401298384-2933-3--