all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#28212: Grafting crashes when replacement lies near the end of buffer
@ 2017-08-24  6:56 Ludovic Courtès
  2017-08-24 22:10 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2017-08-24  6:56 UTC (permalink / raw)
  To: 28212

[-- Attachment #1: Type: text/plain, Size: 3180 bytes --]

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@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’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 3107 bytes --]

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))

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#28212: Grafting crashes when replacement lies near the end of buffer
  2017-08-24  6:56 bug#28212: Grafting crashes when replacement lies near the end of buffer Ludovic Courtès
@ 2017-08-24 22:10 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2017-08-24 22:10 UTC (permalink / raw)
  To: 28212-done

ludo@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’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-24 22:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-24  6:56 bug#28212: Grafting crashes when replacement lies near the end of buffer Ludovic Courtès
2017-08-24 22:10 ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.