Subject: bug#46186: Some substitutes are broken (TLS error)

From: Maxime Devos <[email-masked]>
Date: Sat, 30 Jan 2021 10:52:14 +0100

Hi Guix,

When running "guix package -u libreoffice", substituting libreoffice
is fast at first, then it hangs at ~50%, then after a while it seems
to get unstuck, going to 50.6% or so (the exact percentage varies
with each attempt).

Output of "guix package -u libreoffice":
The following package will be upgraded:
   libreoffice (dependencies or package changed)
substitute: guix substitute: warning: twinkling-star.local: host not found: System error
downloading from https://ci.guix.gnu.org/nar/lzip/hrdzapsn1sxsybl1x2yfjj31lp84wi4s-libreoffice-6.4.7.2 ...
 libreoffice-6.4.7.2  117.1MiB                                 2.5MiB/s 00:23 [########          ]  50.0%
 libreoffice-6.4.7.2  117.1MiB                                 486KiB/s 02:08 [#########         ]  51.8%

This time, it seems like "guix package -u libreoffice" is just going on
forever, but in the past, I've got the following error message:
guix substitute: error: TLS error in procedure 'read_from_session_record_port': Error decoding the received TLS packet.
substitution of /gnu/store/hrdzapsn1sxsybl1x2yfjj31lp84wi4s-libreoffice-6.4.7.2 failed
guix package: error: some substitutes for the outputs of derivation `/gnu/store/h53qbz8hnam2nd99byi4kzwy20fjy0pz-libreoffice-6.4.7.2.drv' failed (usually happens due to networking issues); try `--fallback' to build derivation from source 

Oddly, downloading
<https://ci.guix.gnu.org/nar/lzip/hrdzapsn1sxsybl1x2yfjj31lp84wi4s-libreoffice-6.4.7.2>
with the browser (IceCat) or `guix download` works just fine
(fast and 100% completion).

To reproduce:
guix time-machine --commit=23a5dcce1d893b8f5c5301ae3c1af863776ed3cf \
  build libreoffice

Some other packages seem to be affected as well, but I don't recall
exactly which.

Maxime