GNU bug report logs -
#17466
unexpected bytevector contents with get-bytevector-n
Previous Next
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
[Message part 1 (text/plain, inline)]
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 <at> debbugs.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)]
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’.
[Message part 3 (message/rfc822, inline)]
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’.
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.