guix offload: error: corrupt input while restoring archive from #<closed: file 7f68866bf770>

  • Done
  • quality assurance status badge
Details
3 participants
  • Madhavan Krishnan
  • Ludovic Courtès
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Madhavan Krishnan
Severity
normal
M
M
Madhavan Krishnan wrote on 31 May 2021 01:15
(address . bug-guix@gnu.org)
87sg23u83o.fsf@gmail.com
Hi there, I am trying to follow this instruction [[info:guix#Daemon
Offload Setup][guix#Daemon Offload Setup]] with guix
6086e6ed1a038793e358becddded50d97593f691 on the host and build machine
to set up a offload build machine, and I end up with the error below.

~ $ guix offload test
guix offload: testing 1 build machines defined in '/etc/guix/machines.scm'...
guix offload: Guix is usable on 'build-machine' (test returned "/gnu/store/883yjkl46dxw9mzykykmbs0yzwyxm17z-test")
guix offload: 'build-machine' is running GNU Guile 3.0.5
guix offload: sending 1 store item (0 MiB) to 'build-machine'...
exporting path `/gnu/store/hqisv30c33ka8xascqh2x0lyqd0bp6z4-export-test'
guix offload: error: corrupt input while restoring archive from
#<closed: file 7f68866bf770>

Side note I tried testing if I could export manually to said build-machine,
which worked with out any problems.

~ $ guix archive --export -r emacs | ssh build-machine guix archive --import

and same goes for =guix offload status= which work fine as well.

Regards
--
Madhavan Krishnan
L
L
Ludovic Courtès wrote on 14 Jun 2021 15:23
(name . Madhavan Krishnan)(address . krishnanmadhavan000@gmail.com)(address . 48756@debbugs.gnu.org)
87tum0wpei.fsf@gnu.org
Hi Madhavan,

Madhavan Krishnan <krishnanmadhavan000@gmail.com> skribis:

Toggle quote (14 lines)
> Hi there, I am trying to follow this instruction [[info:guix#Daemon
> Offload Setup][guix#Daemon Offload Setup]] with guix
> 6086e6ed1a038793e358becddded50d97593f691 on the host and build machine
> to set up a offload build machine, and I end up with the error below.
>
> ~ $ guix offload test
> guix offload: testing 1 build machines defined in '/etc/guix/machines.scm'...
> guix offload: Guix is usable on 'build-machine' (test returned "/gnu/store/883yjkl46dxw9mzykykmbs0yzwyxm17z-test")
> guix offload: 'build-machine' is running GNU Guile 3.0.5
> guix offload: sending 1 store item (0 MiB) to 'build-machine'...
> exporting path `/gnu/store/hqisv30c33ka8xascqh2x0lyqd0bp6z4-export-test'
> guix offload: error: corrupt input while restoring archive from
> #<closed: file 7f68866bf770>

Does /etc/guix/signing-key.{pub,sec} exist on both machines?

You can generate it with ‘guix archive’ (info "(guix) Invoking guix
archive").

HTH,
Ludo’.
M
M
Madhavan Krishnan wrote on 14 Jun 2021 15:33
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 48756@debbugs.gnu.org)
87zgvsmv03.fsf@gmail.com
Hello Ludo,
Toggle quote (1 lines)
> Does /etc/guix/signing-key.{pub,sec} exist on both machines?
Toggle quote (2 lines)
> You can generate it with ‘guix archive’ (info "(guix) Invoking guix
> archive").
Yes, the files are generated by
#+begin_example
sudo guix archieve --generate-key
#+end_example
/etc/guix/signing-key.pub
/etc/guix/signing-key.sec
and send the =signing-key.pub= to the build machine.
#+begin_src shell
sudo guix archieve --authorize< master/build.txt
#+end_src
both ways master <-> build
Kindly let me know If am I missing something here obvious?
Thanks
--
Madhavan Krishnan
L
L
Ludovic Courtès wrote on 15 Jun 2021 11:24
(name . Madhavan Krishnan)(address . krishnanmadhavan000@gmail.com)(address . 48756@debbugs.gnu.org)
87v96ftr87.fsf@gnu.org
Hi,

Madhavan Krishnan <krishnanmadhavan000@gmail.com> skribis:

Toggle quote (23 lines)
>> Does /etc/guix/signing-key.{pub,sec} exist on both machines?
>
>> You can generate it with ‘guix archive’ (info "(guix) Invoking guix
>> archive").
>
> Yes, the files are generated by
>
> #+begin_example
> sudo guix archieve --generate-key
> #+end_example
>
>
> /etc/guix/signing-key.pub
> /etc/guix/signing-key.sec
>
> and send the =signing-key.pub= to the build machine.
>
> #+begin_src shell
> sudo guix archieve --authorize< master/build.txt
> #+end_src
>
> both ways master <-> build

OK, so /etc/guix/acl exists on both machines, right?

Could you attach strace to sshd on the build machine:

sudo strace -p $(pidof sshd) -f -o /tmp/sshd.log -s 500

and then run this on the head machine:

sudo guix offload test

?

Looking at /tmp/sshd.log starting from the end might reveal an error
that occurs on the build machine.

You can share (part of) /tmp/sshd.log with me, but note that it may
contain sensitive material such as SSH secret keys or passwords.

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 1 Jul 2021 15:05
(name . Madhavan Krishnan)(address . krishnanmadhavan000@gmail.com)(address . 48756@debbugs.gnu.org)
87eecimbf1.fsf@gnu.org
Hi,

(+Cc: 48756@debbugs.gnu.org, so we record the end of the story.)

Madhavan Krishnan <krishnanmadhavan000@gmail.com> skribis:

Toggle quote (9 lines)
> 89747 pipe([8, 10]) = 0

> 89748 execve("/gnu/store/6rn4l3h0p9x0m615pp1ynlv9v0743kl3-guix-1.2.0/bin/guix", ["/gnu/store/6rn4l3h0p9x0m615pp1ynlv9v0743kl3-guix-1.2.0/bin/guix", "authenticate"], 0x7ffe0b69df60 /* 7 vars */) = 0

> 89748 dup2(10, 2) = 2
> 89748 dup2(2, 1) = 1

> 89747 write(12, "sign 25:/etc/guix/signing-key.sec 64:a8c094df57101bf8684c4afe31e58bc03bf6200a1d009e7c5bfe8bad0a48fa61\n", 102 <unfinished ...>

[...]

Toggle quote (6 lines)
> 89748 write(2, "/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)\n", 136) = 136


> 89747 read(8, <unfinished ...>
> 89747 <... read resumed>"/", 1) = 1

[...]

Toggle quote (2 lines)
> 89747 write(2, "guix-daemon: nix/libutil/serialise.cc:15: virtual nix::BufferedSink::~BufferedSink(): Assertion `!bufPos' failed.\n", 114 <unfinished ...>

[...]

Toggle quote (2 lines)
> 89747 --- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=89747, si_uid=0} ---

Now we know! ‘guix-daemon’ hit the assertion failure above, which is a
bug. That happens because while talking to the ‘guix authenticate’
subprocess, said process emits that warning:

/gnu/store/…/bin/bash: warning: setlocale: LC_ALL: …

and guix-daemon reads the leading “/” and explodes, somehow.

However, it seems you’re running guix-daemon from Guix 1.2.0,
which is quite old, and chances are that the bug you hit has long been
fixed.

Could you try upgrading guix-daemon?


Thanks,
Ludo’.
M
M
Madhavan Krishnan wrote on 1 Jul 2021 15:19
(name . Ludovic Courtès)(address . ludo@gnu.org)
87tule2muw.fsf@gmail.com
Many thanks for your time and effort in debugging this.

I can confirm this issue is resolved.

Regards
--
Madhavan Krishnan
M
M
Maxim Cournoyer wrote on 22 Jul 2021 03:46
(name . Madhavan Krishnan)(address . krishnanmadhavan000@gmail.com)
87bl6vjf1v.fsf@gmail.com
Hello,

Madhavan Krishnan <krishnanmadhavan000@gmail.com> writes:

Toggle quote (6 lines)
> Many thanks for your time and effort in debugging this.
>
> I can confirm this issue is resolved.
>
> Regards

Good to know!

Closing.

Maxim
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 48756
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