From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#28772: guix system reconfigure after kernel panic user or group not created Date: Thu, 12 Oct 2017 09:57:09 +0200 Message-ID: <871sm8ssru.fsf@gnu.org> References: <8760bnh7os.fsf@gmail.com> <87d15vm2t8.fsf@gnu.org> <87r2u9fvpz.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2YNc-00024o-0s for bug-guix@gnu.org; Thu, 12 Oct 2017 03:58:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2YNW-0004H3-6m for bug-guix@gnu.org; Thu, 12 Oct 2017 03:58:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:54362) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e2YNW-0004Gu-1i for bug-guix@gnu.org; Thu, 12 Oct 2017 03:58:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e2YNV-0005M9-O9 for bug-guix@gnu.org; Thu, 12 Oct 2017 03:58:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87r2u9fvpz.fsf@gmail.com> (Oleg Pykhalov's message of "Wed, 11 Oct 2017 20:19:36 +0300") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Oleg Pykhalov Cc: 28772@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Oleg, Oleg Pykhalov 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=E2=80=A6 > The problem > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > 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 > ;; =E2=80=A6 > (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: --=-=-= Content-Type: text/x-patch Content-Disposition: inline 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") --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > 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=3D\"$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=E2=80=99s shepherd, but that didn=E2= =80=99t work: --8<---------------cut here---------------start------------->8--- ludo@ribbon ~/src/guix$ cat ,t.scm (define s (make #: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=E2=80=99t die. What am I missing? Ludo=E2=80=99. --=-=-=--