From unknown Fri Jun 20 20:11:08 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#73966 <73966@debbugs.gnu.org> To: bug#73966 <73966@debbugs.gnu.org> Subject: Status: 'guix deploy' fails when adding 'elogind-service-type' Reply-To: bug#73966 <73966@debbugs.gnu.org> Date: Sat, 21 Jun 2025 03:11:08 +0000 retitle 73966 'guix deploy' fails when adding 'elogind-service-type' reassign 73966 guix submitter 73966 Fabio Natali severity 73966 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 23 11:05:11 2024 Received: (at submit) by debbugs.gnu.org; 23 Oct 2024 15:05:11 +0000 Received: from localhost ([127.0.0.1]:60397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t3cv9-00006S-AS for submit@debbugs.gnu.org; Wed, 23 Oct 2024 11:05:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:44044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t3cv7-00006K-Mj for submit@debbugs.gnu.org; Wed, 23 Oct 2024 11:05:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t3cud-0005G3-V9 for bug-guix@gnu.org; Wed, 23 Oct 2024 11:04:39 -0400 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t3cuZ-00020t-Az for bug-guix@gnu.org; Wed, 23 Oct 2024 11:04:39 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 71CEF24000C for ; Wed, 23 Oct 2024 15:04:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fabionatali.com; s=gm1; t=1729695870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=3Q1UrFttklwYsi8WXG5mGbvHhej6leN2qSWPgFKW4XU=; b=QCjFCPeg8v3GAt4dmrWL/tsl3hiO3R1Vwci5ZW6v4vUhdD8p89Nm8RFF0p+8W0dvnbqSND faU2lbc5hW3qCuBUBsrQweGxZAh2TbyT/0fSCLNIRsiZZPEEmsVNEoD1QcxzeG+zszflVT GwqVT/mKcVDpDO1xYzLhxgtuv9ebjDE0SyZ9wNILk9G379QceqkbADPXayuS1bjex1i/3y 2MbFbF2A3FptZXchSTeTEuvBSFcJBNdPxeyYYFdxngUHlQ7+/a6YeqYbl6G34ZRWwEylK/ 5V91GZvwYaaZqJRYzhX7DKpkU69cRLrOW7QQua2KT3DzDMMD1O5dzwJIM1gXhA== From: Fabio Natali To: bug-guix@gnu.org Subject: 'guix deploy' fails when adding 'elogind-service-type' Date: Wed, 23 Oct 2024 16:04:28 +0100 Message-ID: <87ed46dfnn.fsf@fabionatali.com> MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: me@fabionatali.com Received-SPF: pass client-ip=2001:4b98:dc4:8::221; envelope-from=me@fabionatali.com; helo=relay1-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) Dear All, This is to briefly report an issue that I encountered yesterday, while reconfiguring one of my servers. The machine is headless and has a minimalist system without desktop-related software. Yesterday I had to install the elogind service, so I add a one-liner to my configuration file and redeploy with 'guix deploy' - which fails badly. 'guix deploy' terminates with this error: --8<---------------cut here---------------start------------->8--- guix deploy: error: failed to deploy host: remote command '/run/setuid-programs/sudo -n -- /gnu/store/xv4cd7qz4yan93zkjisbmbpxfz78hah2-guile-3.0.9/bin/guile --no-auto-compile -L /gnu/store/gai5i4ba2xf084big8h56q6pc0vwx2sj-module-import -C / gnu/store/gai5i4ba2xf084big8h56q6pc0vwx2sj-module-import -c "(begin (use-modules (guix repl)) (send-repl-response (quote (with-output-to-port (current-error-por t) (lambda () (primitive-load \"/gnu/store/gkh9yvyfdlnzpi9j9h8w4df0qz3jim2x-remo te-exp.scm\")))) (current-output-port)) (force-output))"' failed with status 1 --8<---------------cut here---------------end--------------->8--- The system is left in a non-working state. Attempts at opening new terminal sessions fail, with the user being logged out immediately, both when connecting via SSH and when logging in from a TTY. Already established terminal sessions start throwing errors like this: --8<---------------cut here---------------start------------->8--- user@host ~$ sudo su - sudo: pam_open_session: Error in service module sudo: policy plugin failed session initialization Segmentation fault --8<---------------cut here---------------end--------------->8--- I have to use Magic SysRq to reboot and get back to a working system. I initially blamed this to some quirk of this particular machine, but then I was able to reproduce this in a VM. Here are the steps. Start from a system definition 'server.scm', along the lines of: --8<---------------cut here---------------start------------->8--- (use-modules (gnu) (gnu machine) (gnu machine ssh) (gnu services desktop) (gnu services networking) (gnu services ssh)) (define %user-authorized-key (plain-file "user-authorized-key.pub" "ssh-rsa SSH-PUBLIC-KEY")) (define %guix-authorized-key (plain-file "guix-authorized-key.pub" "(public-key (ecc (curve Ed25519) (q GUIX-AUTHORIZED-KEY)))")) (define test-server-operating-system (operating-system (host-name "host") (bootloader (bootloader-configuration (bootloader grub-bootloader) (targets '("/dev/vda")))) (file-systems (cons (file-system (device "/dev/vda1") (mount-point "/") (type "ext4")) %base-file-systems)) (users (list (user-account (name "user") (group "users") (supplementary-groups '("wheel"))))) (sudoers-file (plain-file "sudoers" (string-append (plain-file-content %sudoers-specification) "%wheel ALL = NOPASSWD: ALL"))) (services (cons* (service dhcp-client-service-type) (service openssh-service-type (openssh-configuration (authorized-keys `(("user" ,%user-authorized-key) ("root" ,%user-authorized-key))) (permit-root-login 'prohibit-password))) ;; Enable the elogind service and redeploy to trigger the issue. ;; (service elogind-service-type) (modify-services %base-services (guix-service-type config => (guix-configuration (authorized-keys (cons %guix-authorized-key %default-authorized-guix-keys))))))))) (define test-server-machine (machine-ssh-configuration (host-key "ssh-ed25519 MACHINE-PUBLIC-KEY") (host-name "localhost") (port 2222) (identity "/home/user/.ssh/id_rsa_guix_image") (system "x86_64-linux") (user "user"))) (list (machine (operating-system test-server-operating-system) (environment managed-host-environment-type) (configuration test-server-machine))) test-server-operating-system --8<---------------cut here---------------end--------------->8--- Create an image 'image.qcow2' based on the above definition: --8<---------------cut here---------------start------------->8--- cp `guix system image \ --image-size=20GB \ --image-type=qcow2 \ server.scm` image.qcow2 chmod u+w image.qcow2 --8<---------------cut here---------------end--------------->8--- The image can be run with this incantation or a variation thereof: --8<---------------cut here---------------start------------->8--- guix shell qemu -- qemu-system-x86_64 \ -nic user,model=virtio-net-pci,hostfwd=tcp::2222-:22 \ -enable-kvm -m 4096 -smp 2 \ -device virtio-blk,drive=myhd \ -drive if=none,file=/tmp/image.qcow2,id=myhd --8<---------------cut here---------------end--------------->8--- Everything should look fine so far. Log in as a user, take note of the SSH public key in '/etc/ssh/ssh_host_ed25519_key.pub' which needs to be used as the 'host-key' in the 'machine-ssh-configuration' in 'server.scm'. Now uncomment the line with 'elogind' service and comment out the last line 'test-server-operating-system', so that the system definition can be fed to 'guix deploy'. Run 'guix deploy server.scm', while the QEMU machine is still running. BOOM. This should have triggered the error: the deploy fails and the VM is no longer responsive. Note that this is only triggered if the system definition includes a non-root user. Also note that the reconfiguration succeeds when run from within the machine, i.e. via 'guix system reconfigure ...' (from within the guest) as opposed to 'guix deploy' (from the host). I just wanted to brain-dump this here. It's not blocking for me at the moment but I guess it's good to have it reported. Any idea is welcome. I'll also try and get back to this when time permits. Thanks, cheers, Fabio. -- Fabio Natali https://fabionatali.com From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 04 13:51:35 2025 Received: (at 73966) by debbugs.gnu.org; 4 Mar 2025 18:51:35 +0000 Received: from localhost ([127.0.0.1]:60934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tpXMc-0006yn-Rr for submit@debbugs.gnu.org; Tue, 04 Mar 2025 13:51:35 -0500 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:45213) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tpXMa-0006yR-0e for 73966@debbugs.gnu.org; Tue, 04 Mar 2025 13:51:32 -0500 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-22382657540so67513855ad.2 for <73966@debbugs.gnu.org>; Tue, 04 Mar 2025 10:51:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741114285; x=1741719085; darn=debbugs.gnu.org; h=mime-version:message-id:date:user-agent:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=U9uKh2XjTm5g3hdgnQjWlPU2LEN5deNPbuuTsubToeU=; b=MG1nmX0/czU6uR9RnvRdTin5B9cL/52w5yGEI/LbFZh+NTWQKQRBsFRH/crwRWhJoU yLICDnEqevn+7gV7DSeOQOHNeAm4BR4zIfS+0UdYJhgB8xU3qxip5WNghotoj8iVxtZj txJHN5xBrCN+3OIFw2ScE69iLCb0+AYOC5CYX7S23bVrzwtHlYPuz2Mpj/v+Y6HtOK96 TYvxMGb2FR/++nsoUHjLb1I/LtRucM/L9sV/P9enolCXtosMONWgSzT10JrEgMX1q14D OKiKrfJVf0K+Uj625a6CgJs/BDpQTIPNsqVEG35/b+wQ8N0fgKmaoT155A5ggNvG21jP UnGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741114285; x=1741719085; h=mime-version:message-id:date:user-agent:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=U9uKh2XjTm5g3hdgnQjWlPU2LEN5deNPbuuTsubToeU=; b=KjgHEI+N/5A0hCeVoxoSWA4wJSEWreRvqSPVy0iF2EjHQTx0+3yaDGCM5t6/gGB3g8 WhjuoWGXk/zyZ1zJ9MCyPhgE04v2SX26qr8+wXyCw3g+LokUejgYYp8DRyxNLFwp7xUi fsyI/+2ta4xTSGJfJGifCi9Xy2WFC3wW+mibwk9slEWR3Wn73jiVa6Y2t7qLJDgoHEwl 02VeJGtOKcj0DzpmGiMe5CF/kUcUNjLlGMx6nzXKF0xOybLBe08AAa2GVYN0pyk3zZ3s inPRg/9qpaarHbuFqe2vK4Y/X+/pvCDer5ycxrUH1OqtSj0TiUsXZs71KrtZpEwvECef YFtw== X-Gm-Message-State: AOJu0YyhhcBo6rlfJ2bG0XBQIRLiwFX6sQ7DPTC61vrS3OF65tuG2Rmk PS7HW+eCacuV8dliriGjiok9QWNXgJPDQUsoVhDocO5YAl3XMOxuv4sN X-Gm-Gg: ASbGnctIwLaE0ul4+eePvn14eu+CTQJAYTGoQ9THV5hRdXQwzsMxaDBmtRPbQSO3v5A 8clBNSdNCXaeecE6aae1xbCKAoMbI2ovflKAIEFWMFy17vz7xraB4GW7XuGxQlcwdk015HrcpGO r/03pWIDcoGh+UtAwOb+Uy11EIPhm6iT2kXSsJqkuidGQpDOECvl9Kn1FlQ930tpknQMTaQkDfl RHqAxhSyuBUEsBdCCHgbJcmLF2YHYsGVLRqjSNyNJjKYLO31iZY3YOSl8ZTq7FEzTA6tk4XBDG1 moz8AH97UuZ/BYXpenK8OGwBa+CDUs6qDjiwFsY= X-Google-Smtp-Source: AGHT+IHMi5OKLxEvAYE9Y/EX9q1MmPKApbK/vXleuRRziB815g5R51+bEMI9Xh3jjXnEkKEsE3Y8XA== X-Received: by 2002:a17:902:c94b:b0:21a:8300:b9ce with SMTP id d9443c01a7336-223f1d40770mr3749365ad.49.1741114285471; Tue, 04 Mar 2025 10:51:25 -0800 (PST) Received: from MachineY ([139.5.251.204]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-223504dc93csm98983575ad.167.2025.03.04.10.51.23 for <73966@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Mar 2025 10:51:24 -0800 (PST) From: Apoorv Singh To: 73966@debbugs.gnu.org Subject: RE: 'guix deploy' fails when adding 'elogind-service-type' User-Agent: mu4e 1.12.8; emacs 30.0.92 Date: Wed, 05 Mar 2025 00:21:20 +0530 Message-ID: <87ldtkbpef.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 73966 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) I am facing the exact issue with guix deploy. I also tried to reconfigure system directly inside VM and still the same issue, so this is not guix deploy specific (for me at least). -- - Apoorv Singh - Sent from Emacs.