Wrong locale settings for guix-daemon causes confusing error

OpenSubmitted by Marius Bakke.
Details
2 participants
  • Ludovic Courtès
  • Marius Bakke
Owner
unassigned
Severity
normal
M
M
Marius Bakke wrote on 10 Dec 2020 23:30
(address . bug-guix@gnu.org)
87wnxp2t0y.fsf@gnu.org
Hello,

User sss2 reported on #guix[0] that running guix-daemon with an invalid
locale causes the following error:

# guix pull
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
Building from this channel:
Computing Guix derivation for 'x86_64-linux'... |
guix pull: error: got unexpected path `hint: Consider installing the `glibc-utf8-locales' or `glibc-locales' package and' from substituter


I can reproduce it on a foreign distro by adding this to the systemd
service file:

Environment='GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale' LC_ALL=en-US.utf8

(note the en-US typo)

This seems to be a recent regression, as I could not reproduce with an
old guix-daemon (I believe beba9ff82123c4a82721b2ed14df2c7576e22e85).
-----BEGIN PGP SIGNATURE-----

iQFDBAEBCgAtFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl/SoY0PHG1hcml1c0Bn
bnUub3JnAAoJEKKgbfKjOlT6v3oH/RjDonR6NvySJQE9tDyzSYz+h3HUrxOZinEy
PB4zVcVi0W+sLCpNR+xqf+9mGKVYQiKQOCmSz89YdjVfAIA+6usxH+xkNuJeAp+c
Cz4rTsk1JNtV7DCR4RT1eLTf10eMkBK5pRi+LpP7G4XZahDgoCK1JM6PFlVnldUt
tHdLqbLr/ezObLjls3QTdbnCi4FapDuSgpRI0XQKwNhNGRkDKbPUaVo53eO7xqiC
14n9GSUfqYx2+hGXBqwt5syDPgR17PKgkifaVwrjSh276i66r2UqeXMR/FY7j5zR
wTzBbh038UZaELCjQ4xebA3VEXCLWcnXohZY78F2C/A4IZAjbD8=
=qew4
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 14 Dec 2020 11:01
(name . Marius Bakke)(address . marius@gnu.org)(address . 45166@debbugs.gnu.org)
87eejsvh7t.fsf@gnu.org
Hi,

Marius Bakke <marius@gnu.org> skribis:

Toggle quote (10 lines)
> User sss2 reported on #guix[0] that running guix-daemon with an invalid
> locale causes the following error:
>
> # guix pull
> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> Building from this channel:
> guix https://git.savannah.gnu.org/git/guix.git 77667e2
> Computing Guix derivation for 'x86_64-linux'... |
> guix pull: error: got unexpected path `hint: Consider installing the `glibc-utf8-locales' or `glibc-locales' package and' from substituter

How did they run the daemon? The systemd unit file we provide normally
makes sure it runs with the right GUIX_LOCPATH and with a valid locale.

Thanks,
Ludo’.
M
M
Marius Bakke wrote on 14 Dec 2020 11:33
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 45166@debbugs.gnu.org)
87ft48ad8x.fsf@gnu.org
Ludovic Courtès <ludo@gnu.org> skriver:

Toggle quote (17 lines)
> Hi,
>
> Marius Bakke <marius@gnu.org> skribis:
>
>> User sss2 reported on #guix[0] that running guix-daemon with an invalid
>> locale causes the following error:
>>
>> # guix pull
>> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
>> Building from this channel:
>> guix https://git.savannah.gnu.org/git/guix.git 77667e2
>> Computing Guix derivation for 'x86_64-linux'... |
>> guix pull: error: got unexpected path `hint: Consider installing the `glibc-utf8-locales' or `glibc-locales' package and' from substituter
>
> How did they run the daemon? The systemd unit file we provide normally
> makes sure it runs with the right GUIX_LOCPATH and with a valid locale.

It was a hand-written systemd unit file, hence the error. My main
concern is with this error message:

guix pull: error: got unexpected path `hint: Consider installing the `glibc-utf8-locales' or `glibc-locales' package and' from substituter

Previously, the daemon would continue in the face of wrong locale
settings, but print lots of warnings, now it fails hard and early with
this unhelpful message.

If that is intended, can we catch it and provide a more actionable error
message?
-----BEGIN PGP SIGNATURE-----

iQFDBAEBCgAtFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl/XP24PHG1hcml1c0Bn
bnUub3JnAAoJEKKgbfKjOlT6esgIAIzxFx4KgKovbJu3+JgRiySrPMAQdw4+EyrO
XNi+SNH0iLPTmni62Rg9N+0t9Pvpw9/XDkF+zhh65gBdC8xc8f8DJVsX5OkzpPGj
f17A2Coj+bqnPDs53DFrl1EdPRMQCVgQrGDsPoByLB6a19wumOiNtbqIaRoQ51qI
ePDaB2RotTYabfujURJL3GizipjP1/XCb9F6sFBcuLsjbioAp14YxDsl2rrhbLA2
HhUDNvrs0LhTA9UbhYHTKmXUM/zbSX7AGndBk4+Zl2FarDuS23+WFuRu/MG+7lbB
V+lDws4SbFrTUOehARKOC4qAj3YNolD6y9aklbPPHcdGdUDejG0=
=LlA6
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 14 Dec 2020 23:27
(name . Marius Bakke)(address . marius@gnu.org)(address . 45166@debbugs.gnu.org)
875z54qazs.fsf@gnu.org
Hi,

Marius Bakke <marius@gnu.org> skribis:

Toggle quote (31 lines)
> Ludovic Courtès <ludo@gnu.org> skriver:
>
>> Hi,
>>
>> Marius Bakke <marius@gnu.org> skribis:
>>
>>> User sss2 reported on #guix[0] that running guix-daemon with an invalid
>>> locale causes the following error:
>>>
>>> # guix pull
>>> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
>>> Building from this channel:
>>> guix https://git.savannah.gnu.org/git/guix.git 77667e2
>>> Computing Guix derivation for 'x86_64-linux'... |
>>> guix pull: error: got unexpected path `hint: Consider installing the `glibc-utf8-locales' or `glibc-locales' package and' from substituter
>>
>> How did they run the daemon? The systemd unit file we provide normally
>> makes sure it runs with the right GUIX_LOCPATH and with a valid locale.
>
> It was a hand-written systemd unit file, hence the error. My main
> concern is with this error message:
>
> guix pull: error: got unexpected path `hint: Consider installing the `glibc-utf8-locales' or `glibc-locales' package and' from substituter
>
> Previously, the daemon would continue in the face of wrong locale
> settings, but print lots of warnings, now it fails hard and early with
> this unhelpful message.
>
> If that is intended, can we catch it and provide a more actionable error
> message?

No, that must be a regression somewhere, but I’m not sure where.

Does it happen if you run say “guix build hello” and a substitute is
downloaded? Or “guix build hello -S --no-substitutes”?

Thanks,
Ludo’.
?