From unknown Sat Sep 06 09:27:35 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#71402] [PATCH] services: Never throw when stopping mount-may-fail file systems. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 06 Jun 2024 21:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71402 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71402@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17177105631418 (code B ref -1); Thu, 06 Jun 2024 21:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Jun 2024 21:49:23 +0000 Received: from localhost ([127.0.0.1]:43787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFKz1-0000MY-Th for submit@debbugs.gnu.org; Thu, 06 Jun 2024 17:49:23 -0400 Received: from lists.gnu.org ([209.51.188.17]:40446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFKyy-0000M5-24 for submit@debbugs.gnu.org; Thu, 06 Jun 2024 17:49:18 -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 1sFKeQ-0002U2-E0 for guix-patches@gnu.org; Thu, 06 Jun 2024 17:28:02 -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 1sFKeP-0004Da-FT; Thu, 06 Jun 2024 17:28:01 -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:Subject:To:From:in-reply-to: references; bh=UHAwyw6yOR98j8HXQxw2KH6zgChQahfz1Arv9ZfKpjo=; b=lsF7F+xYT1eLIT vFE76MCt8XAWV3ARnwUqZQlv5OmiOPyeEfMVEvlN8FdG15efwXp5Ri8PdUF8hv3B+eIZDUKP55UNH +d/jQIR040Sbr9BA1Bi/4vzPcRU3PXbJdVZd76udiuy5sji/sKjFnOWz0LSKPd7UR6aa8jZKop0x0 ODbcx+OftxRBg/0gededBg7iBTEKQcAsQlvSQ84CSO6q1Ili7tlhZ7tNK43SmDsjpwUn31ptNz/hq 0zmz4VJFeEOCJCGYdjmYMri3AUyY++L0AEGEgN80ig1VpVZYDvqsbaw5Y3CkAGswJ4FvwcNrxsD7n pGj0MoRjhR6z1fTUSIsA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Thu, 6 Jun 2024 23:27:48 +0200 Message-ID: <559a95a6e1df354eb1415fa78163a8d3f009c61a.1717709187.git.ludo@gnu.org> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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: -3.3 (---) This is a followup to 7c27bd115b14afd142da7684cc349369965f9eab. * gnu/services/base.scm (file-system-shepherd-service): Catch 'system-error from ‘umount’ call when FILE-SYSTEM is marked as mount-may-fail. Change-Id: I2234f8da320b43089f4ee058cad8608ce9c078f8 --- gnu/services/base.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) Hi! File systems marked as mount-may-fail could throw when stopped (when the file system hadn't actually been mount). This was mostly harmless, but it should be ignored as well. Thoughts? Ludo'. diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 2d6b0f00e02..c7a14c7ed43 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -448,7 +448,11 @@ (define (file-system-shepherd-service file-system) ;; Make sure PID 1 doesn't keep TARGET busy. (chdir "/") - (umount #$target) + #$(if (file-system-mount-may-fail? file-system) + #~(catch 'system-error + (lambda () (umount #$target)) + (const #f)) + #~(umount #$target)) #f)) ;; We need additional modules. base-commit: 40c6f708393885a2d28f847350e8f47beb11e745 -- 2.45.1 From unknown Sat Sep 06 09:27:35 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#71402: closed (Re: [bug#71402] [PATCH] services: Never throw when stopping mount-may-fail file systems.) Message-ID: References: <87frsz9wfd.fsf@gnu.org> <559a95a6e1df354eb1415fa78163a8d3f009c61a.1717709187.git.ludo@gnu.org> X-Gnu-PR-Message: they-closed 71402 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 71402@debbugs.gnu.org Date: Wed, 26 Jun 2024 22:23:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1719440582-12216-1" This is a multi-part message in MIME format... ------------=_1719440582-12216-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #71402: [PATCH] services: Never throw when stopping mount-may-fail file sys= tems. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 71402@debbugs.gnu.org. --=20 71402: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D71402 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1719440582-12216-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 71402-done) by debbugs.gnu.org; 26 Jun 2024 22:22:26 +0000 Received: from localhost ([127.0.0.1]:40551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMb22-0003AE-ED for submit@debbugs.gnu.org; Wed, 26 Jun 2024 18:22:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMb20-00039z-Aa for 71402-done@debbugs.gnu.org; Wed, 26 Jun 2024 18:22:24 -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 1sMb1s-0002Ew-CC for 71402-done@debbugs.gnu.org; Wed, 26 Jun 2024 18:22:16 -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=CzxXRzPCTbinLqX9wYYaNy/+94NeiJcnZMBs5xqcO0Q=; b=J70QmeAiUgo6y5gql8ce CvHz2njc5Ll7uk3rZEUgDHbAMBnWSq0VgQe/JZ2RPpVWur5VM12i5T4XsitRqpd4BrSmxC9atkigZ gxzNzxCRnIVNgIW9NRP9tUkR6ll+uWgV2pfEl0aGWGIwwXYi50UHOUdFyqsNKdJE5aTakGxxKTkv4 PZHs85Oa4OHRm/Wee9jfyy20AziOWSmu2MiBWmge/gxwrFxYnyMljL4CHOrjKQayZgelsUdGqowfr HanvdrqWgYda98uwIfLeFaAlfoM/BdI5qN1eLUAshQKOqdxN5B+lwBA/1e3BOPMwR9i9ZJlAV4+x4 CcdlHGJK9ofnxQ==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 71402-done@debbugs.gnu.org Subject: Re: [bug#71402] [PATCH] services: Never throw when stopping mount-may-fail file systems. In-Reply-To: <559a95a6e1df354eb1415fa78163a8d3f009c61a.1717709187.git.ludo@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22's?= message of "Thu, 6 Jun 2024 23:27:48 +0200") References: <559a95a6e1df354eb1415fa78163a8d3f009c61a.1717709187.git.ludo@gnu.org> Date: Thu, 27 Jun 2024 00:22:14 +0200 Message-ID: <87frsz9wfd.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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71402-done 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: -3.3 (---) Ludovic Court=C3=A8s skribis: > This is a followup to 7c27bd115b14afd142da7684cc349369965f9eab. > > * gnu/services/base.scm (file-system-shepherd-service): Catch > 'system-error from =E2=80=98umount=E2=80=99 call when FILE-SYSTEM is mark= ed as > mount-may-fail. > > Change-Id: I2234f8da320b43089f4ee058cad8608ce9c078f8 I went ahead and pushed this as 7c8d38f91e7bd4aed106aacc78eb454789538c31. Ludo=E2=80=99. ------------=_1719440582-12216-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 6 Jun 2024 21:49:23 +0000 Received: from localhost ([127.0.0.1]:43787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFKz1-0000MY-Th for submit@debbugs.gnu.org; Thu, 06 Jun 2024 17:49:23 -0400 Received: from lists.gnu.org ([209.51.188.17]:40446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFKyy-0000M5-24 for submit@debbugs.gnu.org; Thu, 06 Jun 2024 17:49:18 -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 1sFKeQ-0002U2-E0 for guix-patches@gnu.org; Thu, 06 Jun 2024 17:28:02 -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 1sFKeP-0004Da-FT; Thu, 06 Jun 2024 17:28:01 -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:Subject:To:From:in-reply-to: references; bh=UHAwyw6yOR98j8HXQxw2KH6zgChQahfz1Arv9ZfKpjo=; b=lsF7F+xYT1eLIT vFE76MCt8XAWV3ARnwUqZQlv5OmiOPyeEfMVEvlN8FdG15efwXp5Ri8PdUF8hv3B+eIZDUKP55UNH +d/jQIR040Sbr9BA1Bi/4vzPcRU3PXbJdVZd76udiuy5sji/sKjFnOWz0LSKPd7UR6aa8jZKop0x0 ODbcx+OftxRBg/0gededBg7iBTEKQcAsQlvSQ84CSO6q1Ili7tlhZ7tNK43SmDsjpwUn31ptNz/hq 0zmz4VJFeEOCJCGYdjmYMri3AUyY++L0AEGEgN80ig1VpVZYDvqsbaw5Y3CkAGswJ4FvwcNrxsD7n pGj0MoRjhR6z1fTUSIsA==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: guix-patches@gnu.org Subject: [PATCH] services: Never throw when stopping mount-may-fail file systems. Date: Thu, 6 Jun 2024 23:27:48 +0200 Message-ID: <559a95a6e1df354eb1415fa78163a8d3f009c61a.1717709187.git.ludo@gnu.org> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= 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: -3.3 (---) This is a followup to 7c27bd115b14afd142da7684cc349369965f9eab. * gnu/services/base.scm (file-system-shepherd-service): Catch 'system-error from ‘umount’ call when FILE-SYSTEM is marked as mount-may-fail. Change-Id: I2234f8da320b43089f4ee058cad8608ce9c078f8 --- gnu/services/base.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) Hi! File systems marked as mount-may-fail could throw when stopped (when the file system hadn't actually been mount). This was mostly harmless, but it should be ignored as well. Thoughts? Ludo'. diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 2d6b0f00e02..c7a14c7ed43 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -448,7 +448,11 @@ (define (file-system-shepherd-service file-system) ;; Make sure PID 1 doesn't keep TARGET busy. (chdir "/") - (umount #$target) + #$(if (file-system-mount-may-fail? file-system) + #~(catch 'system-error + (lambda () (umount #$target)) + (const #f)) + #~(umount #$target)) #f)) ;; We need additional modules. base-commit: 40c6f708393885a2d28f847350e8f47beb11e745 -- 2.45.1 ------------=_1719440582-12216-1--