GNU bug report logs -
#42161
Confusing 'guix system' backtrace when root file system is missing
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42161 in the body.
You can then email your comments to 42161 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#42161
; Package
guix
.
(Thu, 02 Jul 2020 05:24:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Thu, 02 Jul 2020 05:24:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
When doing guix system system.scm /path/to/empty/directory, I have the
following error message:
> # guix system --verbosity=99 --debug=99 --no-bootloader init
> system.scm /srv/distros/guix/ guile: warning: failed to install locale
> acquiring global GC lock `/var/guix/gc.lock'
> acquiring read lock on `/var/guix/temproots/14408'
> acquiring write lock on `/var/guix/temproots/14408'
[...]
> acquiring write lock on `/var/guix/temproots/14408'
> downgrading to read lock on `/var/guix/temproots/14408'
> Backtrace:
> 1 (primitive-load "/root/.config/guix/current/bin/guix")
> In guix/ui.scm:
> 1949:12 0 (run-guix-command _ . _)
>
> guix/ui.scm:1949:12: In procedure run-guix-command:
> In procedure struct-vtable: Wrong type argument in position 1
> (expecting struct): #f
so I'm probably doing something wrong here as I'm probably not supposed
to abuse guix system init to create chroots for lxc.
However the issue is that there is no clear error message nor backtrace
telling me what exactly is wrong here. I don't even have a line in my
file that tells me what line is wrong.
I've attached the system.scm used for reference.
Denis.
[system.scm (text/x-scheme, attachment)]
[Message part 3 (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#42161
; Package
guix
.
(Thu, 02 Jul 2020 07:49:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 42161 <at> debbugs.gnu.org (full text, mbox):
Hello,
Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org> skribis:
> When doing guix system system.scm /path/to/empty/directory, I have the
> following error message:
>
>> # guix system --verbosity=99 --debug=99 --no-bootloader init
>> system.scm /srv/distros/guix/ guile: warning: failed to install locale
>> acquiring global GC lock `/var/guix/gc.lock'
>> acquiring read lock on `/var/guix/temproots/14408'
>> acquiring write lock on `/var/guix/temproots/14408'
> [...]
>> acquiring write lock on `/var/guix/temproots/14408'
>> downgrading to read lock on `/var/guix/temproots/14408'
>> Backtrace:
>> 1 (primitive-load "/root/.config/guix/current/bin/guix")
>> In guix/ui.scm:
>> 1949:12 0 (run-guix-command _ . _)
>>
>> guix/ui.scm:1949:12: In procedure run-guix-command:
>> In procedure struct-vtable: Wrong type argument in position 1
>> (expecting struct): #f
Ah, I think it’s a longstanding bug having to do with ‘--debug’ for
levels greater than 4 or something.
In general, I recommend not using ‘--debug’: it’s rarely of any use,
even for someone working on Guix (but I reckon it’s logical to give it a
try when you’re trying to debug something!). Perhaps we should just
rename it to ‘--daemon-debug’ or something.
If you’re having troubles building your system, I’d try building with
‘-v3’ (verbose mode) for example, or ‘--on-error=debug’ if the problem
is in your ‘system.scm’ file.
> so I'm probably doing something wrong here as I'm probably not supposed
> to abuse guix system init to create chroots for lxc.
I’m not familiar with lxc, but it looks like it should work.
HTH!
Ludo’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#42161
; Package
guix
.
(Fri, 03 Jul 2020 04:42:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 42161 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, 02 Jul 2020 09:48:26 +0200
Ludovic Courtès <ludo <at> gnu.org> wrote:
> Hello,
Hi,
> If you’re having troubles building your system, I’d try building with
> ‘-v3’ (verbose mode) for example, or ‘--on-error=debug’ if the problem
> is in your ‘system.scm’ file.
Here's with -v3
> # guix system -v3 --no-bootloader init system.scm /srv/distros/guix/
> guile: warning: failed to install locale
> Backtrace:
> 1 (primitive-load "/root/.config/guix/current/bin/guix")
> In guix/ui.scm:
> 1949:12 0 (run-guix-command _ . _)
>
> guix/ui.scm:1949:12: In procedure run-guix-command:
> In procedure struct-vtable: Wrong type argument in position 1
> (expecting struct): #f
And with -v3 and --on-error=debug:
> # guix system --on-error=debug -v3 --no-bootloader init system.scm
> /srv/distros/guix/ guile: warning: failed to install locale
> Backtrace:
> 1 (primitive-load "/root/.config/guix/current/bin/guix")
> In guix/ui.scm:
> 1949:12 0 (run-guix-command _ . _)
>
> guix/ui.scm:1949:12: In procedure run-guix-command:
> In procedure struct-vtable: Wrong type argument in position 1
> (expecting struct): #f
In both cases it doesn't point to my system.scm, so I'm trying to start
suspecting that the issue is somewhere else. Though you need to keep in
mind that I just read the Scheme crashcourse from the GuiX cookbook
days ago, so I'm really far from being fluent in Scheme.
> > so I'm probably doing something wrong here as I'm probably not
> > supposed to abuse guix system init to create chroots for lxc.
>
> I’m not familiar with lxc, but it looks like it should work.
In a nutshell I'm trying to install GuiX:
- without a bootloader
- in a directory that isn't the root of a filesystem
I've tried also on /mnt which is backed by a partition:
> /dev/sdb4 on /mnt type ext4 (rw,relatime)
And again I've the same error:
> guix system --on-error=debug -v3 --no-bootloader init system.scm
> /mnt/ guile: warning: failed to install locale
> Backtrace:
> 1 (primitive-load "/root/.config/guix/current/bin/guix")
> In guix/ui.scm:
> 1949:12 0 (run-guix-command _ . _)
>
> guix/ui.scm:1949:12: In procedure run-guix-command:
> In procedure struct-vtable: Wrong type argument in position 1
> (expecting struct): #f
Is that part of my system.scm really correct:
> (file-systems %base-file-systems)
I hope that I'm not polluting bugreports for issues that I'm responsible
of, but I don't have enough knowledge to know that in advance, and I
was advised to bugreport on #guix IRC channel.
Denis.
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#42161
; Package
guix
.
(Tue, 14 Jul 2020 23:58:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 42161 <at> debbugs.gnu.org (full text, mbox):
Hi,
Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org> skribis:
> And again I've the same error:
>> guix system --on-error=debug -v3 --no-bootloader init system.scm
>> /mnt/ guile: warning: failed to install locale
>> Backtrace:
>> 1 (primitive-load "/root/.config/guix/current/bin/guix")
>> In guix/ui.scm:
>> 1949:12 0 (run-guix-command _ . _)
>>
>> guix/ui.scm:1949:12: In procedure run-guix-command:
>> In procedure struct-vtable: Wrong type argument in position 1
>> (expecting struct): #f
>
> Is that part of my system.scm really correct:
>> (file-systems %base-file-systems)
>
> I hope that I'm not polluting bugreports for issues that I'm responsible
> of, but I don't have enough knowledge to know that in advance, and I
> was advised to bugreport on #guix IRC channel.
Sorry for taking so long to get back to you. You were right: the root
cause here is that the ‘file-systems’ field does not specify a root file
system.
Could you add one and let me know how it goes?
I’ve done two things to improve the situation:
1. Commit a168c3e4f8d580f70e1c26bcdfc5b8378b2fa42d fixes a
longstanding issues where we’d get useless backtraces like the one
above in such circumstances.
2. Commit d7e9e0bbc9aadec3e1830767a8771bfbe9c43155 changes ‘guix
system’ so that a “missing root file system” error message is
printed in this case.
Thanks,
Ludo’.
Changed bug title to 'Confusing 'guix system' backtrace when root file system is missing' from 'Confusing '' error message'
Request was from
Ludovic Courtès <ludo <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 15 Jul 2020 10:07:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
:
You have taken responsibility.
(Sun, 10 Jan 2021 19:27:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
:
bug acknowledged by developer.
(Sun, 10 Jan 2021 19:27:02 GMT)
Full text and
rfc822 format available.
Message #21 received at 42161-done <at> debbugs.gnu.org (full text, mbox):
Hello Ludovic,
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hi,
>
> Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org> skribis:
>
>> And again I've the same error:
>>> guix system --on-error=debug -v3 --no-bootloader init system.scm
>>> /mnt/ guile: warning: failed to install locale
>>> Backtrace:
>>> 1 (primitive-load "/root/.config/guix/current/bin/guix")
>>> In guix/ui.scm:
>>> 1949:12 0 (run-guix-command _ . _)
>>>
>>> guix/ui.scm:1949:12: In procedure run-guix-command:
>>> In procedure struct-vtable: Wrong type argument in position 1
>>> (expecting struct): #f
>>
>> Is that part of my system.scm really correct:
>>> (file-systems %base-file-systems)
>>
>> I hope that I'm not polluting bugreports for issues that I'm responsible
>> of, but I don't have enough knowledge to know that in advance, and I
>> was advised to bugreport on #guix IRC channel.
>
> Sorry for taking so long to get back to you. You were right: the root
> cause here is that the ‘file-systems’ field does not specify a root file
> system.
>
> Could you add one and let me know how it goes?
>
> I’ve done two things to improve the situation:
>
> 1. Commit a168c3e4f8d580f70e1c26bcdfc5b8378b2fa42d fixes a
> longstanding issues where we’d get useless backtraces like the one
> above in such circumstances.
>
> 2. Commit d7e9e0bbc9aadec3e1830767a8771bfbe9c43155 changes ‘guix
> system’ so that a “missing root file system” error message is
> printed in this case.
It seems you've addressed the problem thoroughly, thank you!
Closing,
Maxim
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 08 Feb 2021 12:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 77 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.