GNU bug report logs - #17466
unexpected bytevector contents with get-bytevector-n

Previous Next

Package: guile;

Reported by: J Kalbhenn <jkal <at> posteo.eu>

Date: Sun, 11 May 2014 16:51:01 UTC

Severity: normal

Merged with 17591

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: tracker <at> debbugs.gnu.org
Subject: bug#17591: closed (GC_REALLOC in 'get-bytevector-n' leads to
 corrupt bytevector)
Date: Wed, 28 May 2014 17:33:04 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 28 May 2014 19:32:22 +0200
with message-id <87y4xldd21.fsf <at> gnu.org>
and subject line Re: bug#17466: unexpected bytevector contents with get-bytevector-n
has caused the debbugs.gnu.org bug report #17466,
regarding GC_REALLOC in 'get-bytevector-n' leads to corrupt bytevector
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
17466: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17466
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: ludo <at> gnu.org (Ludovic Courtès)
To: bug-guix <at> gnu.org
Subject: Offload hook fails to send files
Date: Sun, 25 May 2014 22:59:11 +0200
We’ve 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-libstdc++-4.8.3.drv.bz2
sending 2 store files to 'hydra.gnunet.org'...
Backtrace:
In ice-9/boot-9.scm:
 157: 15 [catch #t #<catch-closure 1e3e2e0> ...]
In unknown file:
   ?: 14 [apply-smob/1 #<catch-closure 1e3e2e0>]
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 #<procedure 1e70c80 at ice-9/boot-9.scm:3961:3 ()>]
3966: 10 [#<procedure 1e70c80 at ice-9/boot-9.scm:3961:3 ()>]
1645: 9 [%start-stack load-stack ...]
1650: 8 [#<procedure 1e6f000 ()>]
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 #<procedure 2c9f920 at guix/ui.scm:198:2 ()> ...]
 157: 4 [catch system-error ...]
In guix/scripts/archive.scm:
 327: 3 [#<procedure 2ca0cf0 at guix/scripts/archive.scm:312:2 ()>]
In guix/store.scm:
 768: 2 [import-paths #<build-daemon 256.14 2c9b780> #<input: file 0>]
 404: 1 [process-stderr #<build-daemon 256.14 2c9b780> #<input: file 0>]
In unknown file:
   ?: 0 [bytevector-length #<eof>]

ERROR: In procedure bytevector-length:
ERROR: In procedure scm_c_bytevector_length: Wrong type argument in position 1 (expecting bytevector): #<eof>
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-libstdc++-4.8.3.drv.bz2
sending 2 store files to 'hydra.gnunet.org'...
importing path `/gnu/store/5wxd03bpxbw6g4ik9nvq5242p2h1f9zw-binutils-2.24-guile-builder'
importing path `/gnu/store/qbvyn4yq7m92mpp7wvwpx8gnk32863vw-binutils-2.24.drv'
offloading '/gnu/store/qbvyn4yq7m92mpp7wvwpx8gnk32863vw-binutils-2.24.drv' to 'hydra.gnunet.org'...
@ build-remote /gnu/store/qbvyn4yq7m92mpp7wvwpx8gnk32863vw-binutils-2.24.drv hydra.gnunet.org
--8<---------------cut here---------------end--------------->8---

In the first case, ‘send-files’ appears to be failing early, before the
first store item has been transmitted, because the corresponding
“importing path” message hasn’t been printed yet (it’s printed once the
contents of the item being imported have been read–see local-store.cc.)

Ludo’.


[Message part 3 (message/rfc822, inline)]
From: ludo <at> gnu.org (Ludovic Courtès)
To: J Kalbhenn <jkal <at> posteo.eu>
Cc: 17466-done <at> debbugs.gnu.org
Subject: Re: bug#17466: unexpected bytevector contents with get-bytevector-n
Date: Wed, 28 May 2014 19:32:22 +0200
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
‘get-bytevector-n’ returns, the pointer to the bytevector’s contents
would not be left pointing to the old bytevector.  When that old
bytevector was eventually reclaimed, anything could happen.

Thanks!

Ludo’.


This bug report was last modified 11 years and 47 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.