Subject: Re: bug#43518: Guix substitute crash in procedure raise-exception: wrong type agument in position 1: #f

From: Maxim Cournoyer <[email-masked]>
Date: Sat, 03 Oct 2020 23:19:32 -0400

Hello!

Ludovic Courtès <[email-masked]> writes:

[...]

> The “@ download-progress” line is printed by (guix scripts substitute)
> and later consumed by (guix status) in the client, which is why I
> mentioned ‘progress-reporter/trace’ above.
>
> I think the problem we’re looking at could occur if those traces are not
> printed in an atomic way, and thus (guix status) gets to see
> truncated/mixed up traces.  So I tried this:
>
>   _NIX_OPTIONS=print-extended-build-trace=1 sudo -E \
>     ./pre-inst-env strace -s 200 -o ,,s  guix substitute \
>        --substitute /gnu/store/pknm43xsza6nlc7bn27djip8fis92akd-gcc-toolchain-10.2.0 /tmp/t.drv
>
> It shows that traces are printed in a single write(2) call:
>
> write(2, "@ download-progress /tmp/t.drv http://ci.guix.gnu.org/nar/lzip/pknm43xsza6nlc7bn27djip8fis92akd-gcc-toolchain-10.2.0 4843 4843\n", 127) = 127
>
> So this side of things seems to be good.  But then traces could be
> mangled/truncated by the daemon maybe.  An strace log of the failing
> case would be very helpful.

Not sure this matters or not, but thought I'd add the information here
in case:  the ntpd service was stopped for unkown reasons on my local
machine, leading to 'guix offload status' to output the following
warning:

guix offload: warning: machine '127.0.0.1' is 106 seconds behind

I've since restarted the ntpd service and that warning disappeared.

Maxim