got unexpected path `Backtrace:' from substituter

  • Done
  • quality assurance status badge
Details
2 participants
  • Zhu Zihao
  • Ludovic Courtès
Owner
unassigned
Submitted by
Zhu Zihao
Severity
important
Z
Z
Zhu Zihao wrote on 7 Feb 2021 13:42
(address . bug-guix@gnu.org)
86a6sgcan1.fsf@163.com
This issue is similar with https://issues.guix.gnu.org/45828.But it
still not fixed in 127a88d390417d5d7b1b4a18c1b69c7169dcaf34.

When you have multiple substituters, Guix will try to fetch narinfo from
the second or even third substituters, and it dies.

```
chino@asus-laptop:~$ guix build opencv --substitute-urls="https://mirror.sjtu.edu.cn/guixhttps://mirror.guix.org.cn https://mirror.c1r3u.xyz https://ci.guix.gnu.org"
substitute: updating substitutes from 'https://mirror.sjtu.edu.cn/guix'...100.0%
substitute:
guix build: error: got unexpected path `Backtrace:' from substituter
```

If there's one substituter, it will work and do the substitution.
--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQTUepyLKuOQW1Y9kTW+QrNSqfaCHwUCYB/gIxUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQvkKzUqn2gh8rEQEAq+HkamvgiP8oj9q6gfbtrO3WdlWV
s5Y1bRBz1b8OMNwBAL3pDtTdm3PaC4KCSUEO94a2t0Mj4mR/0kB2FM3E1bwC
=EtzF
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 19 Feb 2021 16:17
control message for bug #46362
(address . control@debbugs.gnu.org)
8735xsm6iq.fsf@gnu.org
severity 46362 important
quit
L
L
Ludovic Courtès wrote on 25 Feb 2021 09:21
Re: bug#46362: got unexpected path `Backtrace:' from substituter
(name . Zhu Zihao)(address . all_but_last@163.com)(address . 46362@debbugs.gnu.org)
87eeh41rsb.fsf@gnu.org
Hi,

Zhu Zihao <all_but_last@163.com> skribis:

Toggle quote (13 lines)
> This issue is similar with https://issues.guix.gnu.org/45828.But it
> still not fixed in 127a88d390417d5d7b1b4a18c1b69c7169dcaf34.
>
> When you have multiple substituters, Guix will try to fetch narinfo from
> the second or even third substituters, and it dies.
>
> ```
> chino@asus-laptop:~$ guix build opencv --substitute-urls="https://mirror.sjtu.edu.cn/guix https://mirror.guix.org.cn https://mirror.c1r3u.xyz https://ci.guix.gnu.org"
> substitute: updating substitutes from 'https://mirror.sjtu.edu.cn/guix'... 100.0%
> substitute:
> guix build: error: got unexpected path `Backtrace:' from substituter
> ```

Commit ee3226e9d54891c7e696912245e4904435be191c addresses the
error-reporting issue: now the backtrace will be properly displayed (we
still need to update the ‘guix’ package before you can deploy the fix.)

Toggle quote (2 lines)
> If there's one substituter, it will work and do the substitution.

Did you find out which of these substitute URLs is causing troubles? I
tried the exact same command and it works for me.

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 24 Mar 2021 15:39
control message for bug #46362
(address . control@debbugs.gnu.org)
87blb8fweg.fsf@gnu.org
tags 46362 fixed
close 46362
quit
L
L
Ludovic Courtès wrote on 6 Apr 2021 11:25
(address . control@debbugs.gnu.org)
87pmz7ojc4.fsf@gnu.org
reopen 46362
tags 46362 - fixed patch
quit
L
L
Ludovic Courtès wrote on 6 Apr 2021 12:20
Re: bug#46362: got unexpected path `Backtrace:' from substituter
(address . 46362@debbugs.gnu.org)
87h7kjogt9.fsf@gnu.org
Hi,

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

Toggle quote (10 lines)
>> chino@asus-laptop:~$ guix build opencv --substitute-urls="https://mirror.sjtu.edu.cn/guixhttps://mirror.guix.org.cn https://mirror.c1r3u.xyz https://ci.guix.gnu.org"
>> substitute: updating substitutes from 'https://mirror.sjtu.edu.cn/guix'... 100.0%
>> substitute:
>> guix build: error: got unexpected path `Backtrace:' from substituter
>> ```
>
> Commit ee3226e9d54891c7e696912245e4904435be191c addresses the
> error-reporting issue: now the backtrace will be properly displayed (we
> still need to update the ‘guix’ package before you can deploy the fix.)

This commit did the job, but there would still be cases where error
messages would end up on file descriptor 2 (not surprisingly) and which
the daemon would wrongfully interpret as a status message from ‘guix
substitute’, leading to obscure crashes. Sébastien gives an example

guix install: error: got unexpected path `/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)' from substituter

The attached patch swaps use of file descriptors 2 and 4 of ‘guix
substitute’: FD 2 is now used for regular error reporting, while FD 4 is
used to communicate responses to the daemon. This is more natural and
avoids the kind of problem discussed above.

I’ll push this change if there are no objections.

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 6 Apr 2021 12:20
control message for bug #47297
(address . control@debbugs.gnu.org)
87ft03ogsh.fsf@gnu.org
block 47297 by 46362
quit
L
L
Ludovic Courtès wrote on 9 Apr 2021 18:10
Re: bug#46362: got unexpected path `Backtrace:' from substituter
(address . 46362-done@debbugs.gnu.org)
87im4v4ewp.fsf@gnu.org
Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (32 lines)
>>From d85353dd4bfaa57a7d5803dade91d806a169295a Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
> Date: Tue, 6 Apr 2021 12:10:29 +0200
> Subject: [PATCH] daemon: 'guix substitute' replies on FD 4.
>
> This avoids the situation where error messages would unintentionally go
> to stderr and be wrongfully interpreted as a reply by the daemon.
>
> Fixes <https://bugs.gnu.org/46362>.
> This is a followup to ee3226e9d54891c7e696912245e4904435be191c.
>
> * guix/scripts/substitute.scm (display-narinfo-data): Add 'port'
> parameter and honor it.
> (process-query): Likewise.
> (process-substitution): Likewise.
> (%error-to-file-descriptor-4?, with-redirected-error-port): Remove.
> (%reply-file-descriptor): New variable.
> (guix-substitute): Remove use of 'with-redirected-error-port'. Define
> 'reply-port' and pass it to 'process-query' and 'process-substitution'.
> * nix/libstore/build.cc (SubstitutionGoal::handleChildOutput): Swap
> 'builderOut' and 'fromAgent'.
> * nix/libstore/local-store.cc (LocalStore::getLineFromSubstituter):
> Likewise.
> * tests/substitute.scm <top level>: Set '%reply-file-descriptor'
> rather than '%error-to-file-descriptor-4?'.
> ---
> guix/scripts/substitute.scm | 183 +++++++++++++++++-------------------
> nix/libstore/build.cc | 4 +-
> nix/libstore/local-store.cc | 12 +--
> tests/substitute.scm | 4 +-
> 4 files changed, 95 insertions(+), 108 deletions(-)

Pushed as 2d73086262e1fb33cd0f0f16f74a495fe06b38aa with the
corresponding ‘guix’ package update in
ec8d09ee672e0d357bb5bb597464c8b168f14bfb.

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 46362@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 46362
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch