GNU bug report logs - #34402
Inferior channel (I believe 'inferior-for-channels' function specifically) sometimes fails

Previous Next

Package: guix;

Reported by: <pkill9 <at> runbox.com>

Date: Sat, 9 Feb 2019 11:12:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

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 34402 in the body.
You can then email your comments to 34402 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#34402; Package guix. (Sat, 09 Feb 2019 11:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to <pkill9 <at> runbox.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 09 Feb 2019 11:12:02 GMT) Full text and rfc822 format available.

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

From: <pkill9 <at> runbox.com>
To: "bug-guix" <bug-guix <at> gnu.org>
Subject: Inferior channel (I believe 'inferior-for-channels' function
 specifically) sometimes fails
Date: Sat, 09 Feb 2019 11:11:39 +0000 (GMT)
Often I'll get this output when building a manifest* with an inferior:

```
itsme <at> antelope /tmp$ guix package -n -m example-inferior.scm 
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
guix package: error: failed to load 'example-inferior.scm':
```

I believe this is the 'inferior-for-channels' function that fails.

After investigating a while back, it seems removing the relevant checkout in ~/.cache/guix/checkouts temporarily fixes it, but the issue often comes back.




* The manifest used is the example from the Guix manual in the section on Inferiors, with the guix commit in the manifest replaced with my guix revision:

```
(use-modules (guix inferior) (guix channels)
             (srfi srfi-1))   ;for 'first'

(define channels
  ;; This is the old revision from which we want to
  ;; extract guile-json.
  (list (channel
         (name 'guix)
         (url "https://git.savannah.gnu.org/git/guix.git")
         (commit
          "722ac64cd7dc1f09fb77e2ae780427fa13c03110"))))

(define inferior
  ;; An inferior representing the above revision.
  (inferior-for-channels channels))

;; Now create a manifest with the current "guile" package
;; and the old "guile-json" package.
(packages->manifest
 (list (first (lookup-inferior-packages inferior "guile-json"))
       (specification->package "guile")))
```



Information forwarded to bug-guix <at> gnu.org:
bug#34402; Package guix. (Sat, 09 Feb 2019 14:13:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: <pkill9 <at> runbox.com>
Cc: 34402 <at> debbugs.gnu.org
Subject: Re: bug#34402: Inferior channel (I believe 'inferior-for-channels'
 function specifically) sometimes fails
Date: Sat, 09 Feb 2019 15:12:24 +0100
Hello,

<pkill9 <at> runbox.com> skribis:

> Often I'll get this output when building a manifest* with an inferior:
>
> ```
> itsme <at> antelope /tmp$ guix package -n -m example-inferior.scm 
> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> guix package: error: failed to load 'example-inferior.scm':
> ```

There’s nothing following the colon above?

> I believe this is the 'inferior-for-channels' function that fails.
>
> After investigating a while back, it seems removing the relevant checkout in ~/.cache/guix/checkouts temporarily fixes it, but the issue often comes back.

I wonder if it could be <https://issues.guix.info/issue/34016>, though
I’ve never experienced it in ~/.cache/guix, despite using ‘guix pull’ &
co. a lot.

Next time this happens, could you run:

  strace -s 100 -o log guix package -n -m example-inferior.scm

and post the last few hundred lines of ‘log’?

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#34402; Package guix. (Sat, 09 Feb 2019 15:50:01 GMT) Full text and rfc822 format available.

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

From: <pkill9 <at> runbox.com>
To: "Ludovic Courtès" <ludo <at> gnu.org>
Cc: 34402 <34402 <at> debbugs.gnu.org>
Subject: Re: bug#34402: Inferior channel (I believe 'inferior-for-channels'
 function specifically) sometimes fails
Date: Sat, 09 Feb 2019 15:49:09 +0000 (GMT)
Nope, there is nothing after the colon in the output when this error shows up.

Ok, I will run that next time I get this error.

On Sat, 09 Feb 2019 15:12:24 +0100, Ludovic Courtès <ludo <at> gnu.org> wrote:

> Hello,
> 
> <pkill9 <at> runbox.com> skribis:
> 
> > Often I'll get this output when building a manifest* with an inferior:
> >
> > ```
> > itsme <at> antelope /tmp$ guix package -n -m example-inferior.scm 
> > Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> > guix package: error: failed to load 'example-inferior.scm':
> > ```
> 
> There’s nothing following the colon above?
> 
> > I believe this is the 'inferior-for-channels' function that fails.
> >
> > After investigating a while back, it seems removing the relevant checkout in ~/.cache/guix/checkouts temporarily fixes it, but the issue often comes back.
> 
> I wonder if it could be <https://issues.guix.info/issue/34016>, though
> I’ve never experienced it in ~/.cache/guix, despite using ‘guix pull’ &
> co. a lot.
> 
> Next time this happens, could you run:
> 
>   strace -s 100 -o log guix package -n -m example-inferior.scm
> 
> and post the last few hundred lines of ‘log’?
> 
> Thanks,
> Ludo’.






Information forwarded to bug-guix <at> gnu.org:
bug#34402; Package guix. (Sun, 10 Feb 2019 17:12:02 GMT) Full text and rfc822 format available.

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

From: <pkill9 <at> runbox.com>
To: "Ludovic Courtès" <ludo <at> gnu.org>
Cc: 34402 <34402 <at> debbugs.gnu.org>
Subject: Re: bug#34402: Inferior channel (I believe 'inferior-for-channels'
 function specifically) sometimes fails
Date: Sun, 10 Feb 2019 17:01:20 +0000 (GMT)
[Message part 1 (text/plain, inline)]
I got the error again, I've attached the output.

It looks like line 16205 (at the bottom pretty much) shows that a permissions issue is the culprit:

openat(AT_FDCWD, "/home/itsme/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq/.git/FETCH_HEAD", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = -1 EACCES (Permission denied)

That file, along with  is owned by root and is in the root group, and permissions are set to `-rw-r--r--`.

It looks like this is caused by me running a guix command as root, with `sudo -E` (the -E is probably why it's modifying ownership of files in my user's guix cache directory), that checks out the git commit (I assume since it's only changing the ownership on those two files, the rest in that directory are owned by my user).

Changing the owner of that file back to my user has made the error go away when running `guix package -n -m example-manifest.scm` - and if i then run that command again with 'sudo -E', the ownership of those files is changed back to root.

On Sat, 09 Feb 2019 15:12:24 +0100, Ludovic Courtès <ludo <at> gnu.org> wrote:

> Hello,
> 
> <pkill9 <at> runbox.com> skribis:
> 
> > Often I'll get this output when building a manifest* with an inferior:
> >
> > ```
> > itsme <at> antelope /tmp$ guix package -n -m example-inferior.scm 
> > Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> > guix package: error: failed to load 'example-inferior.scm':
> > ```
> 
> There’s nothing following the colon above?
> 
> > I believe this is the 'inferior-for-channels' function that fails.
> >
> > After investigating a while back, it seems removing the relevant checkout in ~/.cache/guix/checkouts temporarily fixes it, but the issue often comes back.
> 
> I wonder if it could be <https://issues.guix.info/issue/34016>, though
> I’ve never experienced it in ~/.cache/guix, despite using ‘guix pull’ &
> co. a lot.
> 
> Next time this happens, could you run:
> 
>   strace -s 100 -o log guix package -n -m example-inferior.scm
> 
> and post the last few hundred lines of ‘log’?
> 
> Thanks,
> Ludo’.


[example-inferior-fail.log (text/x-log, attachment)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Tue, 12 Feb 2019 22:36:02 GMT) Full text and rfc822 format available.

Notification sent to <pkill9 <at> runbox.com>:
bug acknowledged by developer. (Tue, 12 Feb 2019 22:36:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: <pkill9 <at> runbox.com>
Cc: 34402 <34402-done <at> debbugs.gnu.org>
Subject: Re: bug#34402: Inferior channel (I believe 'inferior-for-channels'
 function specifically) sometimes fails
Date: Tue, 12 Feb 2019 23:35:44 +0100
Hi,

<pkill9 <at> runbox.com> skribis:

> It looks like line 16205 (at the bottom pretty much) shows that a permissions issue is the culprit:
>
> openat(AT_FDCWD, "/home/itsme/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq/.git/FETCH_HEAD", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = -1 EACCES (Permission denied)
>
> That file, along with  is owned by root and is in the root group, and permissions are set to `-rw-r--r--`.
>
> It looks like this is caused by me running a guix command as root, with `sudo -E` (the -E is probably why it's modifying ownership of files in my user's guix cache directory), that checks out the git commit (I assume since it's only changing the ownership on those two files, the rest in that directory are owned by my user).
>
> Changing the owner of that file back to my user has made the error go away when running `guix package -n -m example-manifest.scm` - and if i then run that command again with 'sudo -E', the ownership of those files is changed back to root.

Great that you found out!

Commits 70a50305c495ca96fdec3d31e7e7972cfc54f8ee and
1d8b10d00f0c242bc5ce9540737af3d3f24a05c0 fix error reporting in this
case: you now get an error message mentioning Git and the invalid
permissions on a file in ~/.cache/guix/checkouts.

Thanks,
Ludo'.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 13 Mar 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 39 days ago.

Previous Next


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