GNU bug report logs - #37449
Bug when using non-trivial inferiors/channel setup

Previous Next

Package: guix;

Reported by: Carl Dong <contact <at> carldong.me>

Date: Wed, 18 Sep 2019 16:09:01 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 37449 in the body.
You can then email your comments to 37449 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#37449; Package guix. (Wed, 18 Sep 2019 16:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carl Dong <contact <at> carldong.me>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 18 Sep 2019 16:09:02 GMT) Full text and rfc822 format available.

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

From: Carl Dong <contact <at> carldong.me>
To: "bug-guix <at> gnu.org" <bug-guix <at> gnu.org>
Subject: Bug when using non-trivial inferiors/channel setup
Date: Wed, 18 Sep 2019 16:08:45 +0000
Hi all,

This is a followup to some discussion between rekado, civodul, and I on IRC (see
end of email for transcript). There is a curious bug that happens when using
non-trivial inferiors/channels setup that triggers an error with vague output,
something like:

```
building path(s) `/gnu/store/myrl5p8fy3qhpdv7376sak8wmhdsrl5f-profile'
Backtrace:
           2 (primitive-load "/home/dongcarl/.config/guix/current/bi…")
In guix/ui.scm:
  1692:12  1 (run-guix-command _ . _)
   623:13  0 (_ srfi-34 #<inferior-object #<condition &store-protoco…>)

guix/ui.scm:623:13: Throw to key `wrong-type-arg' with args `("condition-has-type?" "Wrong type argument")'.
```

Both rekado and I have ran into this problem. Rekado ran into this problem when
using inferiors with more than one channel, and I ran into this problem when
using an inferior with a channel that has a .guix-channel file specifying a
'guix channel. A detail here is that it only triggers, but triggers reliably,
for certain packages in our manifests, with is quite odd.

I've attached the IRC conversation below for convenience.


Cheers,
Carl Dong
contact <at> carldong.me
"I fight for the users"


```
<dongcarl> question about general Guix debugging... I'm building a manifest, and I see this: https://pastebin.com/JjpEjxaG
<rekado> dongcarl: I’ve bumped into this very same bug just a day ago
<dongcarl> It's hard to know where to look... :-/
<rekado> I’m not sure what’s going on here.
<dongcarl> rekado: REALLY?!
<rekado> a user at the institute, actually
<dongcarl> Where did you bump into it?
<dongcarl> Sounds like it needs to be fixed
<rekado> we’re using inferiors with more than one channel
<dongcarl> rekado: Right exactly!
<rekado> the user managed to avoid the problem for now by pinning the 'guix channel to commit 2f43e5db1c36ec93a80ed1e3cbe763a8d64adcb5.
<rekado> this sounds like a meta error, really
<dongcarl> Hmm... Well let me describe what I have
<rekado> there’s something triggering an error in an expression that is wrapped in “call-with-error-handling”
<dongcarl> Perhaps the info will be helpful for debugging
<rekado> but the error is not a condition, so the guard fails
<rekado> or something like that
<dongcarl> my manifest only has one channel in it, called `'bitcoin-guix`, and that channel's repo has a `.guix-channel` file that specifies a `'guix` channel
<rekado> actually, the error says that it got a “condition” but wrapped inside an “inferior-object”
<rekado> that’s the problem, I think
<rekado> it should just be a condition.
<rekado> the fact that we’re using an inferior results in a wrapped value
<rekado> it should be unwrapped before raising the condition.
<dongcarl> another piece of info, this is only happens for one of the packages in the manifest (I narrowed it down), all others are fine
— dongcarl reading
<rekado> same here
<rekado> it happened for python-scanpy
<rekado> others were ine
<rekado> *fine
<rekado> I’m guessing that this may be related to sexp->object in read-repl-response in guix/inferior.scm
<dongcarl> rekado: Huh...
<rekado> conditions don’t have a self-quoting sexp representation
<rekado> so they end up being wrapped in inferior-object
<dongcarl> rekado: Is this easy to fix?
<rekado> I don’t know.
<dongcarl> rekado: what should I look for in guix/inferior.scm? I can take a look
<rekado> read-repl-response expects to read either (values …) or (exception …) from the port
<rekado> I don’t know what a condition value would look like
<rekado> we probably need to a) make sure that conditions are serialized properly and b) handle them in read-repl-response.
<dongcarl> rekado: Why does this error only happen for _some_ objects and but not all?
<rekado> I don’t know
<rekado> we don’t even see the actual error.
<rekado> I guess (a) needs to be done in guix/repl.scm in send-repl-response
<rekado> the problem seems to be that there we only catch plain exceptions, but not conditions
— dongcarl needs to read up on exceptions and conditions
<rekado> (error 'foo) is an exception
<rekado> conditions are more complex and are defined in srfi-35
<rekado> conditions have proper types whereas plain errors really only have a key and optional arguments
<rekado> errors can be caught with (catch 'the-key …) or (catch #t …) for any error
<civodul> dongcarl: could you paste the error on, say, paste.debian.net? (patebin.com cannot be accessed over Tor)
<dongcarl> civodul: Yes, would love to, one second
<dongcarl> rekado: Ah the type distinction is good to know
<civodul> debugging exceptions from an inferior is... inconvenient
<dongcarl> civodul: http://paste.debian.net/hidden/03c69d6b/
<dongcarl> civodul: agreed
<dongcarl> I was actually thinking that perhaps inferiors can be a first-class `guix` cli construct... Not sure if that's possible
<dongcarl> As in, run the CLI as if `guix` was at this commit
<dongcarl> Maybe that's dumb :man-shrugging:
<dongcarl> gunna be back online in 30 mins if you guys need more logs or wtv
<civodul> dongcarl: oh, i see
<civodul> actually i don't see that much, mostly ellipses
<civodul> ah the re-throw for SRFI-34/35 is interesting
<civodul> it cannot work
<civodul> we should maybe serialize &store-error conditions over the wire
```




Information forwarded to bug-guix <at> gnu.org:
bug#37449; Package guix. (Fri, 20 Sep 2019 21:13:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Carl Dong <contact <at> carldong.me>
Cc: 37449 <at> debbugs.gnu.org
Subject: Re: bug#37449: Bug when using non-trivial inferiors/channel setup
Date: Fri, 20 Sep 2019 23:12:07 +0200
Hi Carl,

Carl Dong <contact <at> carldong.me> skribis:

> building path(s) `/gnu/store/myrl5p8fy3qhpdv7376sak8wmhdsrl5f-profile'
> Backtrace:
>            2 (primitive-load "/home/dongcarl/.config/guix/current/bi…")
> In guix/ui.scm:
>   1692:12  1 (run-guix-command _ . _)
>    623:13  0 (_ srfi-34 #<inferior-object #<condition &store-protoco…>)
>
> guix/ui.scm:623:13: Throw to key `wrong-type-arg' with args `("condition-has-type?" "Wrong type argument")'.

With commit e773b3918f51231f28363905b64ca164b172b47a, you should be able
to see the actual error condition.

From there, we should have clues as to why some inferior packages in
your manifest are problematic.

Let me know!

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#37449; Package guix. (Sat, 21 Sep 2019 20:29:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Carl Dong <contact <at> carldong.me>
Cc: 37449 <at> debbugs.gnu.org
Subject: Re: bug#37449: Bug when using non-trivial inferiors/channel setup
Date: Sat, 21 Sep 2019 22:28:21 +0200
Ludovic Courtès <ludo <at> gnu.org> skribis:

> With commit e773b3918f51231f28363905b64ca164b172b47a, you should be able
> to see the actual error condition.

Actually commit 71507435225f10d8d944ba183cbcc77ef953e0e5.




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

Notification sent to Carl Dong <contact <at> carldong.me>:
bug acknowledged by developer. (Sun, 06 Oct 2019 12:32:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Carl Dong <contact <at> carldong.me>
Cc: 37449-done <at> debbugs.gnu.org
Subject: Re: bug#37449: Bug when using non-trivial inferiors/channel setup
Date: Sun, 06 Oct 2019 14:31:07 +0200
Hi Carl,

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

> Carl Dong <contact <at> carldong.me> skribis:
>
>> building path(s) `/gnu/store/myrl5p8fy3qhpdv7376sak8wmhdsrl5f-profile'
>> Backtrace:
>>            2 (primitive-load "/home/dongcarl/.config/guix/current/bi…")
>> In guix/ui.scm:
>>   1692:12  1 (run-guix-command _ . _)
>>    623:13  0 (_ srfi-34 #<inferior-object #<condition &store-protoco…>)
>>
>> guix/ui.scm:623:13: Throw to key `wrong-type-arg' with args `("condition-has-type?" "Wrong type argument")'.
>
> With commit e773b3918f51231f28363905b64ca164b172b47a, you should be able
> to see the actual error condition.
>
>>From there, we should have clues as to why some inferior packages in
> your manifest are problematic.

[...]

> Actually commit 71507435225f10d8d944ba183cbcc77ef953e0e5.

IIRC you mentioned on IRC that the problem is solved, so I’m closing
this bug.  Please reopen it if anything’s wrong!

Thanks,
Ludo’.




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

This bug report was last modified 4 years and 146 days ago.

Previous Next


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