Subject: bug#18935: closed (Re: bug#18935: gexp->derivation test failure)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 04 Nov 2014 20:20:03 +0000

Your bug report

#18935: gexp->derivation test failure

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
18935: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18935
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#18935: gexp->derivation test failure
From: [email-masked] (Ludovic Courtès)
To: Mark H Weaver <[email-masked]>
Cc: [email-masked]
Date: Tue, 04 Nov 2014 21:20:08 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Mark H Weaver <[email-masked]> skribis:

> Test begin:
>   test-name: "gexp->derivation"
>   source-file: "tests/gexp.scm"
>   source-line: 227
>   source-form: (test-assert "gexp->derivation" (run-with-store %store (mlet* %store-monad ((file (text-file "foo" "Hello, world!")) (exp -> (gexp (begin (mkdir (ungexp output)) (chdir (ungexp output)) (symlink (string-append (ungexp %bootstrap-guile) "/bin/guile") "foo") (symlink (ungexp file) (ungexp output "2nd"))))) (drv (gexp->derivation "foo" exp)) (out -> (derivation->output-path drv)) (out2 -> (derivation->output-path drv "2nd")) (done (built-derivations (list drv))) (refs ((store-lift references) out)) (refs2 ((store-lift references) out2)) (guile (package-file %bootstrap-guile "bin/guile"))) (return (and (string=? (readlink (string-append out "/foo")) guile) (string=? (readlink out2) file) (equal? refs (list (dirname (dirname guile)))) (equal? refs2 (list file))))) #:guile-for-build (%guile-for-build)))
> Test end:
>   result-kind: fail
>   actual-value: #f
>   actual-error: (srfi-34 #<condition &nix-protocol-error [message: "path `/tmp/nix-build-guix-0.7.14e84b2.drv-0/source/test-tmp/store/ry17r3hm48ckcchz9ls6yhd00alyiipx-foo' is not valid" status: 1] a587d68>)

This can only happen if FILE in that test were deleted after its
creation and before the ‘gexp-derivation’...  which cannot even happen
since FILE remains live for the duration of the ‘%store’ session...
except if another daemon instance deletes it!

Commit 834ea02 fixes that: it turns out that tests/nar.scm was creating
the exact same store item, and then calling the GC to delete it.

I’ll update the Guix snapshot in Guix.  (In the meantime, chances are
that you can just restart the build and won’t stumble upon this bug,
which was unlikely to occur.)

While looking at this code, I fixed a small issue with caches in
000c59b.

Thanks,
Ludo’.

Subject: gexp->derivation test failure
From: Mark H Weaver <[email-masked]>
To: [email-masked]
Date: Mon, 03 Nov 2014 10:51:50 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

On my i686 standalone Guix system, using Guix v0.7-642-g3b50925 to build
its 'guix' package (0.7.14e84b2) fails, due to a failed test.  Here's
the relevant section from gexp.log:

--8<---------------cut here---------------start------------->8---
Test begin:
  test-name: "gexp->derivation"
  source-file: "tests/gexp.scm"
  source-line: 227
  source-form: (test-assert "gexp->derivation" (run-with-store %store (mlet* %store-monad ((file (text-file "foo" "Hello, world!")) (exp -> (gexp (begin (mkdir (ungexp output)) (chdir (ungexp output)) (symlink (string-append (ungexp %bootstrap-guile) "/bin/guile") "foo") (symlink (ungexp file) (ungexp output "2nd"))))) (drv (gexp->derivation "foo" exp)) (out -> (derivation->output-path drv)) (out2 -> (derivation->output-path drv "2nd")) (done (built-derivations (list drv))) (refs ((store-lift references) out)) (refs2 ((store-lift references) out2)) (guile (package-file %bootstrap-guile "bin/guile"))) (return (and (string=? (readlink (string-append out "/foo")) guile) (string=? (readlink out2) file) (equal? refs (list (dirname (dirname guile)))) (equal? refs2 (list file))))) #:guile-for-build (%guile-for-build)))
Test end:
  result-kind: fail
  actual-value: #f
  actual-error: (srfi-34 #<condition &nix-protocol-error [message: "path `/tmp/nix-build-guix-0.7.14e84b2.drv-0/source/test-tmp/store/ry17r3hm48ckcchz9ls6yhd00alyiipx-foo' is not valid" status: 1] a587d68>)
--8<---------------cut here---------------end--------------->8---

The 'guix-daemon' used to do this failed build is also 0.7.14e84b2.

The 'guix' used to do this failed build was v0.7-642-g3b50925 plus one
local patch that adds
"--with-default-trust-store-file=/etc/ssl/certs/ca-certificates.crt" to
the GnuTLS configure flags.

      Mark