Report forwarded
to bug-guix@gnu.org: bug#28772; Package guix.
(Tue, 10 Oct 2017 05:52:01 GMT) (full text, mbox, link).
Acknowledgement sent
to Oleg Pykhalov <go.wigust@gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix@gnu.org.
(Tue, 10 Oct 2017 05:52:01 GMT) (full text, mbox, link).
Subject: guix system reconfigure after kernel panic user or group not created
Date: Tue, 10 Oct 2017 08:51:15 +0300
Hello Guix,
During 'guix system reconfigure' I got a kernel panic.
Getting it quite often while 'guix system reconfigure' at Linux magnolia
4.13.4-gnu #1 SMP 1 x86_64 GNU/Linux. But it's not a subject of current
report.
After reboot I tried another attempt to make a 'guix system
reconfigure', but because of /etc/group.lock and /etc/passwd.lock
operating-system groups and users fields didn't applied.
I tried to get a creation of adbusers group and add my user to it, but
because of those files I cannot do it, until manually removed them.
So, do we need to check if *.lock files are exist and remove them at the
start of 'guix system reconfigure' OR abort reconfigure and creation of
Grub boot entry OR something else?
Thanks,
Oleg.
Information forwarded
to bug-guix@gnu.org: bug#28772; Package guix.
(Tue, 10 Oct 2017 14:56:02 GMT) (full text, mbox, link).
Subject: Re: bug#28772: guix system reconfigure after kernel panic user or
group not created
Date: Tue, 10 Oct 2017 17:55:39 +0300
Oleg Pykhalov <go.wigust@gmail.com> writes:
[...]
> Getting it quite often while 'guix system reconfigure' at Linux magnolia
> 4.13.4-gnu #1 SMP 1 x86_64 GNU/Linux. But it's not a subject of current
> report.
Kernel panic was caused by my miss configuring. I used a Guile module
on reconfigure via GUILE_LOAD_PATH and (use-modles (my-module) in
config.scm. I guess it's also required after reconfigure, according to
some times getting errors after reconfigure: cannot find my-module. So
I need to add my-module globally on system.
[...]
Information forwarded
to bug-guix@gnu.org: bug#28772; Package guix.
(Tue, 10 Oct 2017 15:38:01 GMT) (full text, mbox, link).
Subject: Re: bug#28772: guix system reconfigure after kernel panic user or
group not created
Date: Tue, 10 Oct 2017 17:37:39 +0200
Hello,
Oleg Pykhalov <go.wigust@gmail.com> skribis:
> During 'guix system reconfigure' I got a kernel panic.
Can you show the exact command and its output?
A user-land program is not supposed to be able to cause a kernel panic;
if it does, that’s a kernel bug.
But perhaps you got the kernel panic *after* rebooting in the
reconfigured system? That could well be a GuixSD bug, indeed.
> After reboot I tried another attempt to make a 'guix system
> reconfigure', but because of /etc/group.lock and /etc/passwd.lock
> operating-system groups and users fields didn't applied.
>
> I tried to get a creation of adbusers group and add my user to it, but
> because of those files I cannot do it, until manually removed them.
>
> So, do we need to check if *.lock files are exist and remove them at the
> start of 'guix system reconfigure' OR abort reconfigure and creation of
> Grub boot entry OR something else?
I’m not sure I understand what happened. Could you copy/paste commands
and outputs, or transcribe what happened?
TIA,
Ludo’.
Information forwarded
to bug-guix@gnu.org: bug#28772; Package guix.
(Wed, 11 Oct 2017 13:28:02 GMT) (full text, mbox, link).
Subject: Re: bug#28772: guix system reconfigure after kernel panic user or
group not created
Date: Wed, 11 Oct 2017 15:27:18 +0200
Oleg Pykhalov <go.wigust@gmail.com> skribis:
> Oleg Pykhalov <go.wigust@gmail.com> writes:
>
> [...]
>
>> Getting it quite often while 'guix system reconfigure' at Linux magnolia
>> 4.13.4-gnu #1 SMP 1 x86_64 GNU/Linux. But it's not a subject of current
>> report.
>
> Kernel panic was caused by my miss configuring. I used a Guile module
> on reconfigure via GUILE_LOAD_PATH and (use-modles (my-module) in
> config.scm. I guess it's also required after reconfigure, according to
> some times getting errors after reconfigure: cannot find my-module. So
> I need to add my-module globally on system.
Without seeing the config, I cannot tell whether it’s a bug on our side
or not.
However, if you’re confident that the bug is in your code, that’s good.
;-) Should we close this bug?
Thanks,
Ludo’.
Information forwarded
to bug-guix@gnu.org: bug#28772; Package guix.
(Wed, 11 Oct 2017 17:20:02 GMT) (full text, mbox, link).
Hello Ludovic,
apologies for not adding logs before. It's hard to do when I do guix
commands from Xterm and not from Emacs. Emacs *shell* or *compilation*
buffers will eat all memory if they get too much text.
Probably need to redirect STDOUT STDERR in file when Xterm do guix.
I heard Guix folks work on implementing tiny log output to console and
redirect everything else to a log file. This will be my life saver.
ludo@gnu.org (Ludovic Courtès) writes:
> Hello,
>
> Oleg Pykhalov <go.wigust@gmail.com> skribis:
>
>> During 'guix system reconfigure' I got a kernel panic.
>
> Can you show the exact command and its output?
Sorry, as I said this is not a topic and I don't want to do it again and
I caution to make it on my current system.
I will setup a specific Guix VM for this, where I could make a 'system
reconfigure'. Then I'll create a new bug report with full log.
Neverless I'll leave a how-to reproduce it below for at least for myself
TODO list.
The problem
===========
The bigger problem from my view are files like /etc/group.lock and
/etc/passwd.lock. For example:
sudo touch /etc/group.lock
/etc/config.scm
(operating-system
;; …
(groups (cons
(user-group (name "test"))
%base-groups)))
reconfigure log
The new system generation was produced without "test" group, so you
could reboot into it. And it could lead to problems if we will have a
tiny output to console and big output to a log file, I guess.
> A user-land program is not supposed to be able to cause a kernel panic;
> if it does, that’s a kernel bug.
How to make a kernel panic
The problem will be No defined variable IPTABLES-SSH after 'guix system
reconfigure' and kernel crash after.
$HOME/src/iptables/iptables/ru.scm
(define-module (iptables ru)
;; …
)
(define %iptables-ssh
"-A INPUT -p tcp --dport 22 \
-m state --state NEW -m recent --set --name SSH -j ACCEPT")
/etc/config.scm
(use-modules ;; …
(iptables ru))
(define start-firewall
#~(let ((iptables
(lambda (str)
(zero? (system (string-join `(,#$(file-append iptables
"/sbin/iptables")
,str) " "))))))
(format #t "Install iptables rules.~%")
(and
;; …
(iptables %iptables-ssh))))
(define firewall-service
(simple-service 'firewall shepherd-root-service-type
(list
(shepherd-service
(provision '(firewall))
(requirement '())
(start #~(lambda _
#$start-firewall))
(respawn? #f)
(stop #~(lambda _
(zero?
(system* #$(file-append iptables
"/sbin/iptables")
"-F"))))))))
(operating-system
;; …
(services (cons* ;; …
firewall-service)))
Make a kernel panic
sudo GUILE_LOAD_PATH=\"$HOME/src/iptables\
:$GUILE_LOAD_PATH\" guix system reconfigure \
$HOME/dotfiles/guix/system-magnolia.scm
# Run above again and kernel will panic.
> But perhaps you got the kernel panic *after* rebooting in the
> reconfigured system? That could well be a GuixSD bug, indeed.
No, it happens after second 'guix system reconfigure' with howto above.
[...]
Thanks,
Oleg.
Information forwarded
to bug-guix@gnu.org: bug#28772; Package guix.
(Thu, 12 Oct 2017 07:58:01 GMT) (full text, mbox, link).
Hi Oleg,
Oleg Pykhalov <go.wigust@gmail.com> skribis:
> apologies for not adding logs before. It's hard to do when I do guix
> commands from Xterm and not from Emacs. Emacs *shell* or *compilation*
> buffers will eat all memory if they get too much text.
I sympathize…
> The problem
> ===========
>
> The bigger problem from my view are files like /etc/group.lock and
> /etc/passwd.lock. For example:
>
> sudo touch /etc/group.lock
>
> /etc/config.scm
>
> (operating-system
> ;; …
> (groups (cons
> (user-group (name "test"))
> %base-groups)))
>
> reconfigure log
I think we can avoid the problem by forcefully removing these two lock
files at boot time:
> How to make a kernel panic
>
> The problem will be No defined variable IPTABLES-SSH after 'guix system
> reconfigure' and kernel crash after.
[...]
> Make a kernel panic
>
> sudo GUILE_LOAD_PATH=\"$HOME/src/iptables\
> :$GUILE_LOAD_PATH\" guix system reconfigure \
> $HOME/dotfiles/guix/system-magnolia.scm
>
> # Run above again and kernel will panic.
I tried to reproduce it with my user’s shepherd, but that didn’t work:
--8<---------------cut here---------------start------------->8---
ludo@ribbon ~/src/guix$ cat ,t.scm
(define s
(make <service>
#:provides '(nothing)
#:start (lambda _ unbound)))
(register-services s)
(start s)
ludo@ribbon ~/src/guix$ herd load root ,t.scm
Loading ,t.scm.
herd: exception caught while executing 'load' on service 'root':
ERROR: Unbound variable: foo
ludo@ribbon ~/src/guix$ herd load root ,t.scm
Loading ,t.scm.
herd: exception caught while executing 'start' on service 'nothing':
ERROR: Unbound variable: unbound
ludo@ribbon ~/src/guix$ herd load root ,t.scm
Loading ,t.scm.
Assertion (null? (lookup-services (canonical-name new))) failed.
herd: exception caught while executing 'load' on service 'root':
ERROR: Throw to key `assertion-failed' with args `()'.
ludo@ribbon ~/src/guix$ echo $?
1
ludo@ribbon ~/src/guix$ herd status
[...]
ludo@ribbon ~/src/guix$ echo $?
0
--8<---------------cut here---------------end--------------->8---
IOW, shepherd caught the exceptions and didn’t die.
What am I missing?
Ludo’.
Information forwarded
to bug-guix@gnu.org: bug#28772; Package guix.
(Thu, 12 Oct 2017 08:16:02 GMT) (full text, mbox, link).
Subject: Re: bug#28772: guix system reconfigure after kernel panic user or
group not created
Date: Thu, 12 Oct 2017 11:15:48 +0300
Hello Ludovic,
ludo@gnu.org (Ludovic Courtès) writes:
[...]
> I think we can avoid the problem by forcefully removing these two lock
> files at boot time:
>
> diff --git a/gnu/services.scm b/gnu/services.scm
> index 329b7b151..2ef1d8530 100644
> --- a/gnu/services.scm
> +++ b/gnu/services.scm
> @@ -368,6 +368,8 @@ boot."
> #t))))
> ;; Ignore I/O errors so the system can boot.
> (fail-safe
> + (delete-file "/etc/group.lock")
> + (delete-file "/etc/passwd.lock")
> (delete-file-recursively "/tmp")
> (delete-file-recursively "/var/run")
> (mkdir "/tmp")
>
>
There is also a '/etc/.pwd.lock'. Info about this file
https://lists.debian.org/debian-user/2005/07/msg02949.html
I'm not sure if any files are exist. Days past after reconfigure
failure.
$ sudo find /etc -name '*.lock' # Shows nothing.
[...]
> IOW, shepherd caught the exceptions and didn’t die.
>
> What am I missing?
I'll try to make a reproducible thing later.
Thanks,
Oleg.
Information forwarded
to bug-guix@gnu.org: bug#28772; Package guix.
(Fri, 13 Oct 2017 08:26:02 GMT) (full text, mbox, link).
Subject: Re: bug#28772: guix system reconfigure after kernel panic user or
group not created
Date: Fri, 13 Oct 2017 10:25:52 +0200
Hi Oleg,
Oleg Pykhalov <go.wigust@gmail.com> skribis:
> ludo@gnu.org (Ludovic Courtès) writes:
>
> [...]
>
>> I think we can avoid the problem by forcefully removing these two lock
>> files at boot time:
>>
>> diff --git a/gnu/services.scm b/gnu/services.scm
>> index 329b7b151..2ef1d8530 100644
>> --- a/gnu/services.scm
>> +++ b/gnu/services.scm
>> @@ -368,6 +368,8 @@ boot."
>> #t))))
>> ;; Ignore I/O errors so the system can boot.
>> (fail-safe
>> + (delete-file "/etc/group.lock")
>> + (delete-file "/etc/passwd.lock")
>> (delete-file-recursively "/tmp")
>> (delete-file-recursively "/var/run")
>> (mkdir "/tmp")
>>
>>
>
> There is also a '/etc/.pwd.lock'. Info about this file
> https://lists.debian.org/debian-user/2005/07/msg02949.html
>
>
> I'm not sure if any files are exist. Days past after reconfigure
> failure.
>
> $ sudo find /etc -name '*.lock' # Shows nothing.
I’ve pushed it as aad8a143000600abec5c8ebfadec4c09f34f1b73.
> [...]
>
>> IOW, shepherd caught the exceptions and didn’t die.
>>
>> What am I missing?
>
> I'll try to make a reproducible thing later.
Awesome.
Thanks,
Ludo’.
Information forwarded
to bug-guix@gnu.org: bug#28772; Package guix.
(Fri, 13 Oct 2017 08:36:01 GMT) (full text, mbox, link).
Subject: Re: bug#28772: guix system reconfigure after kernel panic user or
group not created
Date: Fri, 20 Oct 2017 18:02:08 +0200
Hi,
Oleg Pykhalov <go.wigust@gmail.com> skribis:
> ludo@gnu.org (Ludovic Courtès) writes:
>
> [...]
>
>> I think we can avoid the problem by forcefully removing these two lock
>> files at boot time:
>>
>> diff --git a/gnu/services.scm b/gnu/services.scm
>> index 329b7b151..2ef1d8530 100644
>> --- a/gnu/services.scm
>> +++ b/gnu/services.scm
>> @@ -368,6 +368,8 @@ boot."
>> #t))))
>> ;; Ignore I/O errors so the system can boot.
>> (fail-safe
>> + (delete-file "/etc/group.lock")
>> + (delete-file "/etc/passwd.lock")
>> (delete-file-recursively "/tmp")
>> (delete-file-recursively "/var/run")
>> (mkdir "/tmp")
>>
>>
>
> There is also a '/etc/.pwd.lock'. Info about this file
> https://lists.debian.org/debian-user/2005/07/msg02949.html
>
>
> I'm not sure if any files are exist. Days past after reconfigure
> failure.
>
> $ sudo find /etc -name '*.lock' # Shows nothing.
>
> [...]
>
>> IOW, shepherd caught the exceptions and didn’t die.
>>
>> What am I missing?
>
> I'll try to make a reproducible thing later.
Did you eventually gather more info?
Thanks,
Ludo’.
Added tag(s) moreinfo.
Request was from ludo@gnu.org (Ludovic Courtès)
to control@debbugs.gnu.org.
(Fri, 20 Oct 2017 16:03:04 GMT) (full text, mbox, link).
Information forwarded
to bug-guix@gnu.org: bug#28772; Package guix.
(Sun, 22 Oct 2017 14:42:01 GMT) (full text, mbox, link).
Hello Ludovic,
Apologies for the late reply.
ludo@gnu.org (Ludovic Courtès) writes:
[...]
> Did you eventually gather more info?
Yes, I got an undefined %iptables-rst variable in reconfigure output
at first run.
But at second run substitutions didn't work. GuixSD rebuilds the world.
I didn't wait for this.
I also didn't make guix pull.
/tmp/guixsd
├── bootstrap.sh
├── iptables
│ └── iptables.scm
├── panic.sh
└── vm-image.scm
1 directory, 4 files
Subject: Re: bug#28772: guix system reconfigure after kernel panic user or
group not created
Date: Sun, 22 Oct 2017 16:01:39 -0700
Hi Oleg,
Oleg Pykhalov <go.wigust@gmail.com> skribis:
> ludo@gnu.org (Ludovic Courtès) writes:
>
> [...]
>
>> Did you eventually gather more info?
>
> Yes, I got an undefined %iptables-rst variable in reconfigure output
> at first run.
>
> But at second run substitutions didn't work. GuixSD rebuilds the world.
> I didn't wait for this.
In my previous message I showed a way to (attempt to) reproduce the
problem by directly using ‘herd load’.
Could you try to reproduce the problem in this way?
You should even be able to check with a shepherd instance not running as
PID 1, which is more convenient.
Thanks in advance,
Ludo’.
Information forwarded
to bug-guix@gnu.org: bug#28772; Package guix.
(Fri, 26 Nov 2021 01:22:02 GMT) (full text, mbox, link).
Subject: Re: bug#28772: guix system reconfigure after kernel panic user or
group not created
Date: Fri, 26 Nov 2021 02:19:09 +0100
Hi,
On Tue, 10 Oct 2017 at 08:51, Oleg Pykhalov <go.wigust@gmail.com> wrote:
> During 'guix system reconfigure' I got a kernel panic.
>
> Getting it quite often while 'guix system reconfigure' at Linux magnolia
> 4.13.4-gnu #1 SMP 1 x86_64 GNU/Linux. But it's not a subject of current
> report.
>
> After reboot I tried another attempt to make a 'guix system
> reconfigure', but because of /etc/group.lock and /etc/passwd.lock
> operating-system groups and users fields didn't applied.
>
> I tried to get a creation of adbusers group and add my user to it, but
> because of those files I cannot do it, until manually removed them.
>
> So, do we need to check if *.lock files are exist and remove them at the
> start of 'guix system reconfigure' OR abort reconfigure and creation of
> Grub boot entry OR something else?
The last message for bug 28772 [1] is 22 Oct 2017 and it is marked
’moreinfo’ since 2017. I propose to close or provide more details.
1: <http://issues.guix.gnu.org/issue/28772>
Cheers,
simon
Debbugs is free software and licensed under the terms of the
GNU Public License version 2. The current version can be
obtained from https://bugs.debian.org/debbugs-source/.