From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QOsMIrtRUmNncQAAbAwnHQ (envelope-from ) for ; Fri, 21 Oct 2022 10:00:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mKpFIrtRUmPfMQAAauVa8A (envelope-from ) for ; Fri, 21 Oct 2022 10:00:59 +0200 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 DA4372EED5 for ; Fri, 21 Oct 2022 10:00:58 +0200 (CEST) Received: from localhost ([::1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olmxc-0002PS-3a for larch@yhetil.org; Fri, 21 Oct 2022 04:00:57 -0400 Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olmV9-00049K-QN for larch@yhetil.org; Fri, 21 Oct 2022 03:31:31 -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 1olmUg-00044k-OC for bug-guix@gnu.org; Fri, 21 Oct 2022 03:31:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olmUg-0007wl-GF for bug-guix@gnu.org; Fri, 21 Oct 2022 03:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1olmUg-0005nl-BR for bug-guix@gnu.org; Fri, 21 Oct 2022 03:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#58640: Garbage collector ('gc') deletes valid user roots when $HOME is inaccessible Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 21 Oct 2022 07:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58640 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Felix Lechner Cc: 58640@debbugs.gnu.org Received: via spool by 58640-submit@debbugs.gnu.org id=B58640.166633743722262 (code B ref 58640); Fri, 21 Oct 2022 07:31:02 +0000 Received: (at 58640) by debbugs.gnu.org; 21 Oct 2022 07:30:37 +0000 Received: from localhost ([127.0.0.1]:36822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olmUH-0005mz-6n for submit@debbugs.gnu.org; Fri, 21 Oct 2022 03:30:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olmUF-0005mc-4z for 58640@debbugs.gnu.org; Fri, 21 Oct 2022 03:30:35 -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 1olmU9-0007lr-4x; Fri, 21 Oct 2022 03:30:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=WEU7oPnCbQCusZCWdokHF7uq4g1Z77O/lb1Kcd2U2W0=; b=YyiD+NSpmwq5ORMVBty7 OCYxB8hQH4CNrRi7NmCSiJDZ2fdHI8kfPSw3QBB/Bc/5bQQLCHtrh6Jh/Oyvc3pW6qt3VWNp3J/GG Y2KGKXmdt3Cllx4Eefi8XxR28kZ2wZuwgtBEMKSZjg2TUC8sDZCKdW5LVCWmpmlUBKixaVJgFlvVX wSBJd8fbWl2/o4P69jFgpBB7FU1m0TAe/p9jeYo5eNINIeidLBiaxng6PQLNVAFCszSNmtcVjg4YN f2i2SoLNsSpwRZwXSjDpHpa6nuquK4AqSxTLRJnniNB/VBXGlea8DsZHVy//CPsD2PSD6IJFbOXT2 5LUUYgWo0hc3WA==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olmU8-0003XZ-HS; Fri, 21 Oct 2022 03:30:28 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Fri, 21 Oct 2022 09:30:25 +0200 In-Reply-To: (Felix Lechner's message of "Wed, 19 Oct 2022 10:14:05 -0700") Message-ID: <87r0z1ab1q.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666339259; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=WEU7oPnCbQCusZCWdokHF7uq4g1Z77O/lb1Kcd2U2W0=; b=X39DjezywGuI2F1OXrd4ndgUAuDfyiJlLpCRLgJS4PblSozbBvWy1+Dgo1fC0vAMgsNUTx q74J/c/7zq8LgTCOe7yNvW3KucFT1TNxnMNVjuXQd2d5fStEMOBHVnk9Lg4lTVknQ+rRq2 MsYrQ6hjPVOmX7+Wwc343N41hUtnnSQijtEj+LnngsGPV5h6guok34qfK2VceEt1Oqzd2G m3vpSMKFkANDAjh2XpCVkyykTlhIt+tKHmDG7teCVh/tiasEph7oaOyxIQu6Ud1QFNBVIn XWQ4BdNPMzAR8qQ85RrgOXVsw/6W96PRfrKknemB1YyyDoLNPsGN39Qz5MRjxA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666339259; a=rsa-sha256; cv=none; b=ZV4CeX1SoSG9EMz5nRgwmWF25ftMFd72C9V33Iph60Ch371wofg0/DCWUYL0YyDJpcrrhr b5MU5894baCtJs1wS9cRryszTptbZT2eiRzqIurrZPisxO/A1nTT1R3duka06EAY1E3Fxe PjP0Xs1MqzAULHaClgdepJSnA9kLOOF0BXsjpP3HO3uMwGiC9xKklwlJoHNnOri3obWemo vuRVzuB7aHCOi+zkXi70Efm/Znn3SuTNPBAEVoD4ssD+vTkWRpWMLENksQBe5sTCoGZPaY wK0b08WNPBPZJh4ftdA7LZkJd1IyUmNauduENuQNwt5+JhA9Z0yrF/bEkSgOQQ== 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=YyiD+NSp; 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" X-Migadu-Spam-Score: -1.34 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=YyiD+NSp; 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" X-Migadu-Queue-Id: DA4372EED5 X-Spam-Score: -1.34 X-Migadu-Scanner: scn1.migadu.com X-TUID: ZXl3pC3Ud8N7 Hi Felix, Felix Lechner skribis: > The Guix garbage collector ('gc') deletes valid user roots when those > links are not resolvable via the user's home folder in places such as > > ~/.cache/guix/profiles/ > > which potentially leaves the user without a working profile. > > Home folders are not always accessible to the root user, and may > therefore also not be accessible to the Guix daemon. In some > networked setups, for example, home folders can be automounted. > > In my particular case, the home folder was inaccessible due to my > encrypted filesystem's security policies, which are enforced by FUSE > when using gocryptfs. [1] To complement what Liliana wrote, there are two kinds of GC root: =E2=80=9Cregular roots=E2=80=9D (the symlinks under /var/guix/profiles and /var/guix/gcroots), and =E2=80=9Cindirect roots=E2=80=9D (symlinks created = when you run =E2=80=98guix shell=E2=80=99 or when you run =E2=80=98guix package -p ~/my-= root=E2=80=99). Indirect roots are invisible to the GC if the file system where they live is inaccessible. That=E2=80=99s what you observed. There=E2=80=99s no good solution I can think of, except not storing indirect roots on a file system not visible to the GC. I hope that makes sense! Thanks, Ludo=E2=80=99.