GNU bug report logs - #25089
Cannot build --check source derivations

Previous Next

Package: guix;

Reported by: Leo Famulari <leo <at> famulari.name>

Date: Fri, 2 Dec 2016 08:11:02 UTC

Severity: normal

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 25089 in the body.
You can then email your comments to 25089 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#25089; Package guix. (Fri, 02 Dec 2016 08:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Famulari <leo <at> famulari.name>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 02 Dec 2016 08:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: bug-guix <at> gnu.org
Subject: Can't build source derivations with Guix 0.11.0-4.1f41
Date: Fri, 2 Dec 2016 03:10:08 -0500
I'm having trouble building source code derivations using the latest
guix development snapshot, 0.11.0-4.1f41. I don't seem to have any
trouble building packages themselves.

I'm using Guix on a foreign distro (Debian).

I think the problem is in the daemon because it doesn't manifest just
because I've switched to a profile with the 0.11.0-4.1f41 snapshot; I
have to use that version of the daemon to see the problem.

It fails like this:

------
$ guix build hello --source --check
@ build-started /gnu/store/xv9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv - x86_64-linux /var/log/guix/drvs/xv//9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv.bz2
warning: failed to install locale: Invalid argument

Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
From http://ftpmirror.gnu.org/hello/hello-2.10.tar.gz...
following redirection to `http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/hello/hello-2.10.tar.gz'...
following redirection to `http://mirrors.ibiblio.org/gnu/ftp/gnu/hello/hello-2.10.tar.gz'...
ERROR: In procedure open-file: Permission denied: "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz"

Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
From ftp://ftp.cs.tu-berlin.de/pub/gnu/hello/hello-2.10.tar.gz...
ERROR: In procedure connect*: Connection timed out

Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
From ftp://ftp.funet.fi/pub/mirrors/ftp.gnu.org/gnu/hello/hello-2.10.tar.gz...
ERROR: Throw to key `ftp-error' with args `(#<input-output: socket 11> "PASV" 425 "You cannot use PASV on IPv6 connections. Use EPSV instead.\r")'.

Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
From http://ftp.gnu.org/pub/gnu/hello/hello-2.10.tar.gz...
ERROR: In procedure open-file: Permission denied: "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz"

Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
From http://mirror.hydra.gnu.org/file/hello-2.10.tar.gz/sha256/0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i...
ERROR: In procedure open-file: Permission denied: "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz"

Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
From http://tarballs.nixos.org/sha256/0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i...
following redirection to `http://tarballs.nixos.org/sha512/e301d785135c52575a8b4c35994c0316f8d366451f604eb5e74c1f907077502aebd5a1a32cd1e26cd7ca32c22f4de5623a335f8ae7e735ac977420df664f01de'...
ERROR: In procedure open-file: Permission denied: "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz"
failed to download "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz" from "mirror://gnu/hello/hello-2.10.tar.gz"
builder for `/gnu/store/xv9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv' failed to produce output path `/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz'
@ build-failed /gnu/store/xv9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv - 1 builder for `/gnu/store/xv9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv' failed to produce output path `/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz'
guix build: error: build failed: build of `/gnu/store/xv9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv' failed
------

This file /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
already exists in my store.

If I set $TMPDIR to something besides the default, it fails like this:

------
$ guix build hello --source --check
guix build: error: build failed: while setting up the build environment: changing into `/home/leo/tmp/guix-build/guix-build-hello-2.10.tar.gz.drv-0': No such file or directory
------

The previous Guix snapshot, 0.11.0-3.7ca3, works as expected:

------
$ guix build hello --source --check
@ build-started /gnu/store/gx0nbs6krwawz0z4ljy2nc8lrnxzmx7g-hello-2.10.tar.gz.drv - x86_64-linux /var/log/guix/drvs/gx//0nbs6krwawz0z4ljy2nc8lrnxzmx7g-hello-2.10.tar.gz.drv.bz2

Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
From http://ftpmirror.gnu.org/hello/hello-2.10.tar.gz...
following redirection to `http://mirror.clarkson.edu/gnu/hello/hello-2.10.tar.gz'...
 ...10.tar.gz  709KiB               2.2MiB/s 00:00 [####################] 100.0%
/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
------




Information forwarded to bug-guix <at> gnu.org:
bug#25089; Package guix. (Sun, 04 Dec 2016 21:07:02 GMT) Full text and rfc822 format available.

Message #8 received at 25089 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Leo Famulari <leo <at> famulari.name>
Cc: 25089 <at> debbugs.gnu.org
Subject: Re: bug#25089: Can't build source derivations with Guix 0.11.0-4.1f41
Date: Sun, 04 Dec 2016 22:05:48 +0100
Leo Famulari <leo <at> famulari.name> skribis:

> I'm having trouble building source code derivations using the latest
> guix development snapshot, 0.11.0-4.1f41. I don't seem to have any
> trouble building packages themselves.
>
> I'm using Guix on a foreign distro (Debian).
>
> I think the problem is in the daemon because it doesn't manifest just
> because I've switched to a profile with the 0.11.0-4.1f41 snapshot; I
> have to use that version of the daemon to see the problem.

The main difference is that downloads are performed by the daemon itself
(via the ‘guix perform-download’ internal command), which was not the
case before (see <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22774#13>.)

> It fails like this:
>
> ------
> $ guix build hello --source --check
> @ build-started /gnu/store/xv9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv - x86_64-linux /var/log/guix/drvs/xv//9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv.bz2
> warning: failed to install locale: Invalid argument

Aaaah, locales!  :-)

> Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
> From http://ftpmirror.gnu.org/hello/hello-2.10.tar.gz...
> following redirection to `http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/hello/hello-2.10.tar.gz'...
> following redirection to `http://mirrors.ibiblio.org/gnu/ftp/gnu/hello/hello-2.10.tar.gz'...
> ERROR: In procedure open-file: Permission denied: "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz"

It should definitely have write permission on the output file.

Could you ‘strace -f’ guix-daemon or something like that to see under
what UID ‘guix perform-download’ executes?  It’s expected to be running
as a build user, but not in a chroot.

I can’t reproduce this on GuixSD.

> @ build-failed /gnu/store/xv9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv - 1 builder for `/gnu/store/xv9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv' failed to produce output path `/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz'
> guix build: error: build failed: build of `/gnu/store/xv9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv' failed
> ------
>
> This file /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
> already exists in my store.

You mean it’s building it despite the fact that it’s already there?
Sounds fishy!

Could it be that the sqlite.db being used doesn’t correspond to the
store (wrong localstatedir mistake)?

> If I set $TMPDIR to something besides the default, it fails like this:
>
> ------
> $ guix build hello --source --check
> guix build: error: build failed: while setting up the build environment: changing into `/home/leo/tmp/guix-build/guix-build-hello-2.10.tar.gz.drv-0': No such file or directory
> ------

That seems to come from build.cc:2204 (probably unrelated to the problem
above.)

Again, could you ‘strace -f’ guix-daemon to see what directory it
creates?

My suspicion is that it creates /tmp/guix-build-hello… but then tries to
chdir to /home/leo/tmp/….

TIA!

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#25089; Package guix. (Tue, 06 Dec 2016 01:15:02 GMT) Full text and rfc822 format available.

Message #11 received at 25089 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 25089 <at> debbugs.gnu.org
Subject: Re: bug#25089: Can't build source derivations with Guix 0.11.0-4.1f41
Date: Mon, 5 Dec 2016 20:14:24 -0500
[Message part 1 (text/plain, inline)]
On Sun, Dec 04, 2016 at 10:05:48PM +0100, Ludovic Courtès wrote:
> Leo Famulari <leo <at> famulari.name> skribis:
> The main difference is that downloads are performed by the daemon itself
> (via the ‘guix perform-download’ internal command), which was not the
> case before (see <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22774#13>.)

Okay, I'll investigate this change.

> > Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
> > From http://ftpmirror.gnu.org/hello/hello-2.10.tar.gz...
> > following redirection to `http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/hello/hello-2.10.tar.gz'...
> > following redirection to `http://mirrors.ibiblio.org/gnu/ftp/gnu/hello/hello-2.10.tar.gz'...
> > ERROR: In procedure open-file: Permission denied: "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz"
> 
> It should definitely have write permission on the output file.
> 
> Could you ‘strace -f’ guix-daemon or something like that to see under
> what UID ‘guix perform-download’ executes?  It’s expected to be running
> as a build user, but not in a chroot.

It does appear to be running as a build user.

I realized that I can, in fact, build source derivations, but I can't
--check them. I use `guix build --source --check foo` to make sure a
package has the right source URL.

So my original report was misleading, sorry.

I can reproduce this on GuixSD, after reconfiguring my system based on
8243951ef1b9d (gnu: guix: Update development snapshot.).

Can you try reproducing it like this?

$ guix build hello --source && guix build hello --source --check

I've attached gzip compressed strace logs, created with `strace -f -p
PID -o FILE`.
[log-bad-0.11.0-7.e11c.gz (application/x-gunzip, attachment)]
[log-good-0.11.0-3.7ca3.gz (application/x-gunzip, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#25089; Package guix. (Wed, 07 Dec 2016 09:48:02 GMT) Full text and rfc822 format available.

Message #14 received at 25089 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Leo Famulari <leo <at> famulari.name>
Cc: 25089 <at> debbugs.gnu.org
Subject: Re: bug#25089: Can't build source derivations with Guix 0.11.0-4.1f41
Date: Wed, 07 Dec 2016 10:46:51 +0100
Leo Famulari <leo <at> famulari.name> skribis:

>> > Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
>> > From http://ftpmirror.gnu.org/hello/hello-2.10.tar.gz...
>> > following redirection to `http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/hello/hello-2.10.tar.gz'...
>> > following redirection to `http://mirrors.ibiblio.org/gnu/ftp/gnu/hello/hello-2.10.tar.gz'...
>> > ERROR: In procedure open-file: Permission denied: "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz"

[...]

> Can you try reproducing it like this?
>
> $ guix build hello --source && guix build hello --source --check

Indeed, I can reproduce it.

Ludo’.




Changed bug title to 'Cannot build --check source derivations' from 'Can't build source derivations with Guix 0.11.0-4.1f41' Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Wed, 07 Dec 2016 09:49:01 GMT) Full text and rfc822 format available.

Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Wed, 11 Jan 2017 16:23:02 GMT) Full text and rfc822 format available.

Notification sent to Leo Famulari <leo <at> famulari.name>:
bug acknowledged by developer. (Wed, 11 Jan 2017 16:23:02 GMT) Full text and rfc822 format available.

Message #21 received at 25089-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Leo Famulari <leo <at> famulari.name>
Cc: 25089-done <at> debbugs.gnu.org
Subject: Re: bug#25089: Can't build source derivations with Guix 0.11.0-4.1f41
Date: Wed, 11 Jan 2017 17:22:26 +0100
Leo Famulari <leo <at> famulari.name> skribis:

> $ guix build hello --source --check
> @ build-started /gnu/store/xv9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv - x86_64-linux /var/log/guix/drvs/xv//9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv.bz2
> warning: failed to install locale: Invalid argument
>
> Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
>>From http://ftpmirror.gnu.org/hello/hello-2.10.tar.gz...
> following redirection to `http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/hello/hello-2.10.tar.gz'...
> following redirection to `http://mirrors.ibiblio.org/gnu/ftp/gnu/hello/hello-2.10.tar.gz'...
> ERROR: In procedure open-file: Permission denied: "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz"

I believe this is fixed by commit
9b5364a3afb03414bd6e3ded2fbfdacabe4e8870.

Thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 09 Feb 2017 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 78 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.