From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id gKj/GD0WE2YnBQEAqHPOHw:P1 (envelope-from ) for ; Sun, 07 Apr 2024 23:55:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id gKj/GD0WE2YnBQEAqHPOHw (envelope-from ) for ; Sun, 07 Apr 2024 23:55:09 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=eHs6MECm; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712526909; a=rsa-sha256; cv=none; b=q6yI+0uL/hGxqIGgHx2k/dlMrLfJAyDD0+dQ16fFYF3azbLcwGymm4Fsbhd2nyXkiqGJCm BsnG1k2hXxXMsSXcg85JvkLSG7YeZFxCf/uJakH5SrMSW+1e78aRkK+TuvhSihj6GDR77g PhQiVR22h9LWW10rTs7e6xQJlzhPJNK7kmHlqZUTsmENG0JTgpisbZV3Djs8srsqUXCzNA SROnB9jDojHGZBfN1GF3gFhIFA86XKi65Cqru3h+0ZJlWnC6++loxmvjBtKzLtLG+hHuLE ++qGJvEr4/EH/RJpWxuDId56utZ45g0jarOrJHe86R6zK47/3cpXHIDtC+4kxQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=eHs6MECm; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712526909; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=O3iVuNcKT+rQwXuYQznH+C4GbkDVgyZ4aTaHr4/QgcM=; b=Xn9bI0ho0pQd/ME0dGqsjTnnJxyGX/ZhLmNOrAJ15fXGqKWHZM+5KM4zk4g7hHywY4KyL/ 4Qpd237GWGiwtAIcDLeQxlgohsbhLLo3QKwwnMUGeSnkDZAwVrrQxzo2AZW5g2P3mzDo3n hd0Nw9QcRgKHRkL+nPUYr6eve0L81dOyMj9Pk63/gSQ97n1Xr8ALRdSJMfCGo7Lq/cHB/v C3i7eI4TSEb8ct5Hi+5dkTfxBQOvK+376GjVfx9cmCtjXZgN4Tzh08St1BFdcuW0aB+pHP 5ZN/nKBzQYfKzmEcp89kCdP4zOiyTAIGM+OLDwdg2n4WWn8RIYvmpMI+CLyniA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CA1F97606B for ; Sun, 7 Apr 2024 23:55:08 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtaTZ-00051r-T3; Sun, 07 Apr 2024 17:54:57 -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 1rtaTX-000513-6H for bug-guix@gnu.org; Sun, 07 Apr 2024 17:54:56 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtaTW-0000Yy-Sw for bug-guix@gnu.org; Sun, 07 Apr 2024 17:54:54 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtaTd-0001dH-SW for bug-guix@gnu.org; Sun, 07 Apr 2024 17:55:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#70266: Failure to open LUKS devices from a Shepherd service Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 07 Apr 2024 21:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70266 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 70266@debbugs.gnu.org Received: via spool by 70266-submit@debbugs.gnu.org id=B70266.17125268896225 (code B ref 70266); Sun, 07 Apr 2024 21:55:01 +0000 Received: (at 70266) by debbugs.gnu.org; 7 Apr 2024 21:54:49 +0000 Received: from localhost ([127.0.0.1]:44921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtaTR-0001cL-9v for submit@debbugs.gnu.org; Sun, 07 Apr 2024 17:54:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtaTN-0001bI-Pj for 70266@debbugs.gnu.org; Sun, 07 Apr 2024 17:54:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtaTB-0000YY-EP for 70266@debbugs.gnu.org; Sun, 07 Apr 2024 17:54:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=O3iVuNcKT+rQwXuYQznH+C4GbkDVgyZ4aTaHr4/QgcM=; b=eHs6MECmblnnApoxfnRj nsgW+4VkYpuhCqyPfpB0ja4FS/2iXsBrP/cmM14nSfLk+y+OJBsOazWeT78sFK6Nw4lVWix+5V72x EWqMd+k8JlHZdrzXG8EMsmlB/jhfP3fDjANpcGxAtBq71BZiyb85/+ZbAQW9KvIviWqMp5voaqJ34 V/gia3ByV2wd6H2RPLfrLU82oEI+vr7xvd2OEWFcZcfCTBs95F/+31iQGVPJ0yNK9BJRQLICyoq4y ljFby46QsbApMIfriDjwZ7hiRMLEBElCQK9LIbuehc+85a76zajAijFcbbqWdzMKzjOarIwKuXJWt BSiCa/nKzI6Wwg==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <87h6gcoo85.fsf@inria.fr> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sun, 07 Apr 2024 23:30:02 +0200") References: <87h6gcoo85.fsf@inria.fr> Date: Sun, 07 Apr 2024 23:54:30 +0200 Message-ID: <87cyr0on3d.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -7.07 X-Migadu-Queue-Id: CA1F97606B X-Migadu-Spam-Score: -7.07 X-Migadu-Scanner: mx10.migadu.com X-TUID: PKobyZYmXVgS Ludovic Court=C3=A8s skribis: > Commit 6f9d844d2ece7b369d17bbe678978462425f869c led to a regression: > when a =E2=80=98luks-device-mapping=E2=80=99 mapped device is opened from= a Shepherd > service (for instance a =E2=80=98device-mapping-XXX=E2=80=99 service crea= ted by > =E2=80=98device-mapping-service-type=E2=80=99 because, say, /home is a se= parate LUKS > partition), said service fails to start with: > > Unbound variable: bytevector? > > This is the =E2=80=98bytevector?=E2=80=99 referred to in =E2=80=98open-lu= ks-device=E2=80=99. This is a situation with a non-top-level =E2=80=98use-modules=E2=80=99. The problem can be illustrated like this: --8<---------------cut here---------------start------------->8--- $ cat ~/src/guile-debugging/non-top-level-use-modules.scm ;; (define-module (xxxx)) (define (foo x) (use-modules (rnrs bytevectors)) ;bad!! (bytevector? x)) ;; (pk '-> (foo (call-with-input-string "#vu8(1 2 3)" read))) (pk 'foo foo) $ guild compile -O1 ~/src/guile-debugging/non-top-level-use-modules.scm=20 /home/ludo/src/guile-debugging/non-top-level-use-modules.scm:3:3: warning: = possibly unbound variable `bytevector?' wrote `/home/ludo/.cache/guile/ccache/3.0-LE-8-4.7/home/ludo/src/guile-debu= gging/non-top-level-use-modules.scm.go' $ guile GNU Guile 3.0.99-git Copyright (C) 1995-2024 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> ,m(sdf) scheme@(sdf)> ,use(guile) scheme@(sdf)> (load-compiled "/home/ludo/.cache/guile/ccache/3.0-LE-8-4.7/h= ome/ludo/src/guile-debugging/non-top-level-use-modules.scm.go") ;;; (foo #) $1 =3D # scheme@(sdf)> ,m(guile-user) scheme@(guile-user)> ($1 123) ;;; :7:1: warning: possibly unbound variable `$1' ice-9/boot-9.scm:1676:22: In procedure raise-exception: Unbound variable: bytevector? Entering a new prompt. Type `,bt' for a backtrace or `,q' to contin --8<---------------cut here---------------end--------------->8--- =E2=80=98use-modules=E2=80=99, when used this way, loads the specified modu= les in (current-module) at that point (at run time). If you change what the current module is, as I did above, then it breaks. Ludo=E2=80=99.