GNU bug report logs -
#28212
Grafting crashes when replacement lies near the end of buffer
Previous Next
Reported by: ludo <at> gnu.org (Ludovic Courtès)
Date: Thu, 24 Aug 2017 06:57:01 UTC
Severity: important
Done: ludo <at> gnu.org (Ludovic Courtès)
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28212 in the body.
You can then email your comments to 28212 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#28212
; Package
guix
.
(Thu, 24 Aug 2017 06:57:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Thu, 24 Aug 2017 06:57:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
As reported by Leo and then analyzed by Mark, grafting crashes when the
replacement string lies near the end of buffer:
https://lists.gnu.org/archive/html/guix-devel/2017-07/msg00445.html
With the attached patch on top of commit
7d14082d56462f7bef4254d65a21fd265fbce471, I get this backtrace:
--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix build go <at> 1.9
[...]
@ build-started /gnu/store/n420a0qs7vwnbaj4j3knhfy9j7zqwvs4-go-1.9rc1.drv - x86_64-linux /var/log/guix/drvs/n4//20a0qs7vwnbaj4j3knhfy9j7zqwvs4-go-1.9rc1.drv.bz2
grafting '/gnu/store/8zbi5rr5q2pxksfgpxq37m60nsa21d3v-go-1.9rc1-doc' -> '/gnu/store/djdi6b1bvbrp5fgkkrvk80jndg6gifrh-go-1.9rc1-doc'...
grafting '/gnu/store/73fvsx0qizcrbajgjwn8mkzkpxa6abx4-go-1.9rc1' -> '/gnu/store/8bjpc7wxdxsxbf45qvwsd6jbn7zgi871-go-1.9rc1'...
Backtrace:
In ice-9/boot-9.scm:
160: 17 [catch #t #<catch-closure 8c5dc0> ...]
In unknown file:
?: 16 [apply-smob/1 #<catch-closure 8c5dc0>]
In ice-9/boot-9.scm:
66: 15 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
432: 14 [eval # #]
In ice-9/boot-9.scm:
2412: 13 [save-module-excursion #<procedure 8e6840 at ice-9/boot-9.scm:4084:3 ()>]
4089: 12 [#<procedure 8e6840 at ice-9/boot-9.scm:4084:3 ()>]
1734: 11 [%start-stack load-stack #<procedure 8f6e20 at ice-9/boot-9.scm:4080:10 ()>]
1739: 10 [#<procedure 8f8960 ()>]
In unknown file:
?: 9 [primitive-load "/gnu/store/zslsp0k0m06ab7a2vzf2wp3cv6s5zwxn-go-1.9rc1-guile-builder"]
In ice-9/eval.scm:
387: 8 [eval # ()]
In ice-9/boot-9.scm:
806: 7 [for-each #<procedure c44b10 at ice-9/eval.scm:416:20 (a b)> # #]
In /gnu/store/hnwfmnrb1r7dzajn744dafx19ps290d8-module-import/guix/build/graft.scm:
313: 6 [rewrite-directory "/gnu/store/73fvsx0qizcrbajgjwn8mkzkpxa6abx4-go-1.9rc1" ...]
In srfi/srfi-1.scm:
616: 5 [for-each #<procedure rewrite-leaf (file)> #]
In ice-9/boot-9.scm:
877: 4 [call-with-input-file "/gnu/store/73fvsx0qizcrbajgjwn8mkzkpxa6abx4-go-1.9rc1/pkg/tool/linux_amd64/link" ...]
895: 3 [call-with-output-file "/gnu/store/8bjpc7wxdxsxbf45qvwsd6jbn7zgi871-go-1.9rc1/pkg/tool/linux_amd64/link" ...]
In /gnu/store/hnwfmnrb1r7dzajn744dafx19ps290d8-module-import/guix/build/graft.scm:
302: 2 [#<procedure 13d45c0 at /gnu/store/hnwfmnrb1r7dzajn744dafx19ps290d8-module-import/guix/build/graft.scm:301:15 (output)> #<output: /gnu/store/8bjpc7wxdxsxbf45qvwsd6jbn7zgi871-go-1.9rc1/pkg/tool/linux_amd64/link 7>]
173: 1 [replace-store-references #<input: /gnu/store/73fvsx0qizcrbajgjwn8mkzkpxa6abx4-go-1.9rc1/pkg/tool/linux_amd64/link 6> ...]
In unknown file:
?: 0 [put-bytevector #<output: /gnu/store/8bjpc7wxdxsxbf45qvwsd6jbn7zgi871-go-1.9rc1/pkg/tool/linux_amd64/link 7> ...]
ERROR: In procedure put-bytevector:
ERROR: In procedure put-bytevector: Value out of range: 0
builder for `/gnu/store/n420a0qs7vwnbaj4j3knhfy9j7zqwvs4-go-1.9rc1.drv' failed with exit code 1
@ build-failed /gnu/store/n420a0qs7vwnbaj4j3knhfy9j7zqwvs4-go-1.9rc1.drv - 1 builder for `/gnu/store/n420a0qs7vwnbaj4j3knhfy9j7zqwvs4-go-1.9rc1.drv' failed with exit code 1
--8<---------------cut here---------------end--------------->8---
Ludo’.
[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 70cae6d87..7ed9cc750 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -199,11 +199,11 @@ garbage collection, various safety features and in the style of communicating
sequential processes (CSP) concurrent programming features added.")
(license license:bsd-3)))
-(define-public go-1.8
+(define-public go-1.9
(package
(inherit go-1.4)
(name "go")
- (version "1.8.3")
+ (version "1.9rc1")
(source
(origin
(method url-fetch)
@@ -211,7 +211,7 @@ sequential processes (CSP) concurrent programming features added.")
name version ".src.tar.gz"))
(sha256
(base32
- "19lzv4lqixj3v2gjaff0fdbbmgsq5r8lrfd61z2zvp778wjflpaz"))))
+ "0bj5dcvhz48bf6704qhqnybf220kgqgi93x4mx1n3k30xac7awc7"))))
(arguments
(substitute-keyword-arguments (package-arguments go-1.4)
((#:phases phases)
@@ -242,7 +242,7 @@ sequential processes (CSP) concurrent programming features added.")
;; Add libgcc to runpath
(substitute* "cmd/link/internal/ld/lib.go"
(("!rpath.set") "true"))
- (substitute* "cmd/go/build.go"
+ (substitute* "cmd/go/internal/work/build.go"
(("cgoldflags := \\[\\]string\\{\\}")
(string-append "cgoldflags := []string{"
"\"-rpath=" gcclib "\""
@@ -265,7 +265,9 @@ sequential processes (CSP) concurrent programming features added.")
(substitute* file
((regex all before test_name)
(string-append before "Disabled" test_name)))))
- '(("net/net_test.go" "(.+)(TestShutdownUnix.+)")
+ '(;; See https://github.com/golang/go/commit/81ed9ca1d411f0bd8738ea60b3a8045446ad85fc
+ ("cmd/go/go_test.go" "(.+)(TestExecutableGOROOT.+)")
+ ("net/net_test.go" "(.+)(TestShutdownUnix.+)")
("net/dial_test.go" "(.+)(TestDialTimeout.+)")
("os/os_test.go" "(.+)(TestHostname.+)")
("time/format_test.go" "(.+)(TestParseInSydney.+)")
@@ -366,4 +368,4 @@ sequential processes (CSP) concurrent programming features added.")
`(("go" ,go-1.4)
,@(package-native-inputs go-1.4)))))
-(define-public go go-1.8)
+(define-public go go-1.9)
diff --git a/guix/build/graft.scm b/guix/build/graft.scm
index 16df169ec..83d797130 100644
--- a/guix/build/graft.scm
+++ b/guix/build/graft.scm
@@ -310,8 +310,7 @@ file name pairs."
;; Use 'exit-on-exception' to force an exit upon I/O errors, given that
;; 'n-par-for-each' silently swallows exceptions.
;; See <http://bugs.gnu.org/23581>.
- (n-par-for-each (parallel-job-count)
- (exit-on-exception rewrite-leaf)
+ (for-each rewrite-leaf
(find-files directory (const #t)
#:directories? #t))
(rename-matching-files output mapping))
Severity set to 'important' from 'normal'
Request was from
ludo <at> gnu.org (Ludovic Courtès)
to
control <at> debbugs.gnu.org
.
(Thu, 24 Aug 2017 21:49:01 GMT)
Full text and
rfc822 format available.
Reply sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
You have taken responsibility.
(Thu, 24 Aug 2017 22:12:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
bug acknowledged by developer.
(Thu, 24 Aug 2017 22:12:01 GMT)
Full text and
rfc822 format available.
Message #12 received at 28212-done <at> debbugs.gnu.org (full text, mbox):
ludo <at> gnu.org (Ludovic Courtès) skribis:
> As reported by Leo and then analyzed by Mark, grafting crashes when the
> replacement string lies near the end of buffer:
>
> https://lists.gnu.org/archive/html/guix-devel/2017-07/msg00445.html
[...]
> 173: 1 [replace-store-references #<input: /gnu/store/73fvsx0qizcrbajgjwn8mkzkpxa6abx4-go-1.9rc1/pkg/tool/linux_amd64/link 6> ...]
> In unknown file:
> ?: 0 [put-bytevector #<output: /gnu/store/8bjpc7wxdxsxbf45qvwsd6jbn7zgi871-go-1.9rc1/pkg/tool/linux_amd64/link 7> ...]
>
> ERROR: In procedure put-bytevector:
> ERROR: In procedure put-bytevector: Value out of range: 0
> builder for `/gnu/store/n420a0qs7vwnbaj4j3knhfy9j7zqwvs4-go-1.9rc1.drv' failed with exit code 1
I believe commit 94e86a6b67c7a02f5f11358743f3b9f11997059c fixes this.
Thanks a lot for your analysis, Mark!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 22 Sep 2017 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 228 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.