Subject: bug#21097: verify-store test failure on armhf-linux

From: [email-masked] (Ludovic Courtès)
Date: Tue, 03 Nov 2015 23:41:16 +0100

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

> Test begin:
>   test-name: "verify-store"
>   source-file: "tests/store.scm"
>   source-line: 638
>   source-form: (test-assert "verify-store" (let* ((text (random-text)) (file1 (add-text-to-store %store "foo" text)) (file2 (add-text-to-store %store "bar" (random-text) (list file1)))) (and (pk (quote verify1) (verify-store %store)) (begin (delete-file file1) (not (pk (quote verify2) (verify-store %store)))) (begin (call-with-output-file file1 (lambda (port) (display text port))) (pk (quote verify3) (verify-store %store))))))
> Test end:
>   result-kind: fail
>   actual-value: #f
>   actual-error: (srfi-34 #<condition &nix-protocol-error [message: "invalidating path `/tmp/nix-build-guix-0.8.2.72cd8ec.drv-0/source/test-tmp/store/pp8ls5jri3l8x8y24g1x3h6lkj0lr4gv-bash-light-4.3.39-guile-builder' in database: FOREIGN KEY constraint failed" status: 1] 6112e8>)

[...]

> path `/tmp/nix-build-guix-0.8.2.72cd8ec.drv-0/source/test-tmp/store/pp8ls5jri3l8x8y24g1x3h6lkj0lr4gv-bash-light-4.3.39-guile-builder' disappeared, removing from database...

I’ve become convinced that this is due to parallelism: several
guix-daemon processes run at the same time.  In this case, I bet this
process tries to remove an item from the ValidPaths table while another
is trying to add it in the Refs table or something.

In dc57d527 I added #:parallel-tests? #f for ‘guix-devel’.  Eventually
we should fix the makefile to run this test alone, as is done for
‘guix-gc.sh’.

Thanks,
Ludo’.