all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#42161: Confusing '' error message
@ 2020-07-02  4:40 Denis 'GNUtoo' Carikli
  2020-07-02  7:48 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-07-02  4:40 UTC (permalink / raw)
  To: 42161


[-- Attachment #1.1: Type: text/plain, Size: 1196 bytes --]

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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: system.scm --]
[-- Type: text/x-scheme, Size: 1060 bytes --]

(use-modules (gnu))
(use-service-modules networking ssh)
(use-package-modules irc screen ssh tor)

(operating-system
 (host-name "test")
 (timezone "Europe/Paris")
 (locale "en_US.utf8")

 (bootloader (bootloader-configuration
	      (bootloader grub-bootloader)
	      (target "/dev/sdX")))
 (file-systems %base-file-systems)

 (users (cons (user-account
	       (name "irssi")
	       (group "users")
	       (home-directory "/home/irssi"))
	      %base-user-accounts))

 (packages (cons* irssi openssh screen tor %base-packages ))
 (services (cons* (service dhcp-client-service-type)
                  (service openssh-service-type
                           (openssh-configuration
			    (port-number 222)
			    (permit-root-login #t)
			    ; No passwords logins
			    (password-authentication? #f)
			    (challenge-response-authentication? #f)
			    (use-pam? #f)
			    )
			   )
;                 (service tor-service)
;                 (service tor-hidden-service ((222 "127.0.0.1:222")) )
		  %base-services)))

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#42161: Confusing '' error message
  2020-07-02  4:40 bug#42161: Confusing '' error message Denis 'GNUtoo' Carikli
@ 2020-07-02  7:48 ` Ludovic Courtès
  2020-07-02 23:53   ` Denis 'GNUtoo' Carikli
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2020-07-02  7:48 UTC (permalink / raw)
  To: Denis 'GNUtoo' Carikli; +Cc: 42161

Hello,

Denis 'GNUtoo' Carikli <GNUtoo@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’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#42161: Confusing '' error message
  2020-07-02  7:48 ` Ludovic Courtès
@ 2020-07-02 23:53   ` Denis 'GNUtoo' Carikli
  2020-07-14 23:57     ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-07-02 23:53 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 42161

[-- Attachment #1: Type: text/plain, Size: 2633 bytes --]

On Thu, 02 Jul 2020 09:48:26 +0200
Ludovic Courtès <ludo@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.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#42161: Confusing '' error message
  2020-07-02 23:53   ` Denis 'GNUtoo' Carikli
@ 2020-07-14 23:57     ` Ludovic Courtès
  2021-01-10 19:26       ` bug#42161: Confusing 'guix system' backtrace when root file system is missing Maxim Cournoyer
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2020-07-14 23:57 UTC (permalink / raw)
  To: Denis 'GNUtoo' Carikli; +Cc: 42161

Hi,

Denis 'GNUtoo' Carikli <GNUtoo@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’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#42161: Confusing 'guix system' backtrace when root file system is missing
  2020-07-14 23:57     ` Ludovic Courtès
@ 2021-01-10 19:26       ` Maxim Cournoyer
  0 siblings, 0 replies; 5+ messages in thread
From: Maxim Cournoyer @ 2021-01-10 19:26 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 42161-done, Denis 'GNUtoo' Carikli

Hello Ludovic,

Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> Denis 'GNUtoo' Carikli <GNUtoo@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




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-10 19:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-02  4:40 bug#42161: Confusing '' error message Denis 'GNUtoo' Carikli
2020-07-02  7:48 ` Ludovic Courtès
2020-07-02 23:53   ` Denis 'GNUtoo' Carikli
2020-07-14 23:57     ` Ludovic Courtès
2021-01-10 19:26       ` bug#42161: Confusing 'guix system' backtrace when root file system is missing Maxim Cournoyer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.