From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 20 23:53:36 2023 Received: (at submit) by debbugs.gnu.org; 21 Apr 2023 03:53:36 +0000 Received: from localhost ([127.0.0.1]:39030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pphq4-0001Gh-1E for submit@debbugs.gnu.org; Thu, 20 Apr 2023 23:53:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:45776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pphq2-0001GZ-Mm for submit@debbugs.gnu.org; Thu, 20 Apr 2023 23:53:34 -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 1pphq1-0004qU-Ej for bug-guix@gnu.org; Thu, 20 Apr 2023 23:53:33 -0400 Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pphq0-0001uW-28 for bug-guix@gnu.org; Thu, 20 Apr 2023 23:53:33 -0400 Received: by mail-qk1-x72f.google.com with SMTP id af79cd13be357-74d981be825so83476485a.0 for ; Thu, 20 Apr 2023 20:53:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682049211; x=1684641211; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=0XzbYwh3LC+OAUTl1eIpE0ZfjURNYhUGP5rM+Tj4Hp4=; b=Cj9NWxGii3yjleFm9JY4Mwhl7vGTV8ptEd4vDhU/uUu5+dDgYNtPVCBRu3PtQaWJlD Va0FxxxFA2Y2ybqrl1rQkmXFRHjnDPooLVZC9tJghPpQdlW5Rp9shOgQjZmBz39pcVyU 8piU748guZeTFg9sfR+Ck1T+vpgDfHohb/vFBBxNHzoLJ2ucubQZLxfYS3l/3wUAdIpP UXS45O8lSFBE7TRbrYqBXP3Sc2T0FDQUuE/dbI2XJ7+2sNATQq3Imv9mqmw0fZX93SKu fUDLPGh/Tyy5KPZBqc9UWLKqFJcc6fVkwlgf9mJ8hH05mkYPvH/71/RYRltIBFr5YHHy UgdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682049211; x=1684641211; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=0XzbYwh3LC+OAUTl1eIpE0ZfjURNYhUGP5rM+Tj4Hp4=; b=ht+AtWgGnEgBOXVUK85onh9TT1xvVqUI6bpF6F8AwXxKIGaZHqA9snOFcTxbR3+Szp cgn0ffrxvylvOQGmGkEAwjVrkS1+oPzWIW7bgmnFU5KEEnhTIVrD0TW4cm4EE6y8q0XM g0tc9SkARvPh+wk5JQOyNwzs/BJGVRAxh8KAU85usjZCnjWJemTMWoLtOuiOK0H8VCst laaQJQj0VQYbJoZxuNdwwzw/xtmE6IBQ8V3WNDZSeE5MwyIoCJToqhrhTRdEYiQLxk89 KTDwsCAinkSfK5G6EAWSWck6i/EsO5WPXhvJm253NZdtV494tDvc3RoVRgPadsatD5yD IZzg== X-Gm-Message-State: AAQBX9e8aZqPdVq+aZ+oqpNz9NIFhOvRixCd7ffcI0MDPqAm57BPlZFs 9G4fr+d46ouw4vQTJVRYG5Db3b/Opjc= X-Google-Smtp-Source: AKy350YOgSVpwq/vG4XxZtYCUtMNEYPCKO7iYFKzTMc2LwSo5tQe4Jwu1z9mT77G0sAiXCwn/SLDkA== X-Received: by 2002:ad4:5fce:0:b0:5ea:c6f7:6d53 with SMTP id jq14-20020ad45fce000000b005eac6f76d53mr7510109qvb.31.1682049210728; Thu, 20 Apr 2023 20:53:30 -0700 (PDT) Received: from hurd (dsl-155-56.b2b2c.ca. [66.158.155.56]) by smtp.gmail.com with ESMTPSA id q15-20020a0cf5cf000000b00603551afd50sm335913qvm.39.2023.04.20.20.53.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 20:53:30 -0700 (PDT) From: Maxim Cournoyer To: bug-guix Subject: Guix System cannot shutdown when there are NFS mounts Date: Thu, 20 Apr 2023 23:53:29 -0400 Message-ID: <87edodyjpi.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::72f; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x72f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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.3 (--) Hello, This has been reported by others in #guix as well, although we're currently short on details. When an NFS mount is active at the time a shutdown is requested, the system hangs, and doesn't shut down. The power button must be long-pressed to power off the machine. -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Thu May 18 14:13:42 2023 Received: (at 62986) by debbugs.gnu.org; 18 May 2023 18:13:42 +0000 Received: from localhost ([127.0.0.1]:54488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzi8E-0002MN-0H for submit@debbugs.gnu.org; Thu, 18 May 2023 14:13:42 -0400 Received: from smtpmciv1.myservices.hosting ([185.26.107.237]:35286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzi8C-0002ME-Ck for 62986@debbugs.gnu.org; Thu, 18 May 2023 14:13:40 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv1.myservices.hosting (Postfix) with ESMTP id 3F38020DFC; Thu, 18 May 2023 20:13:38 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id ABBAF8009A; Thu, 18 May 2023 20:13:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id jtcFMuIS8qZ4; Thu, 18 May 2023 20:13:37 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 23E1C80098; Thu, 18 May 2023 20:13:37 +0200 (CEST) Message-ID: Date: Thu, 18 May 2023 19:13:36 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: bug#62986: Guix System cannot shutdown when there are NFS mounts Content-Language: en-US To: Maxim Cournoyer References: <87edodyjpi.fsf@gmail.com> From: Bruno Victal In-Reply-To: <87edodyjpi.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 62986 Cc: 62986@debbugs.gnu.org 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.1 (--) Hi Maxim, On 2023-04-21 04:53, Maxim Cournoyer wrote: > Hello, > > This has been reported by others in #guix as well, although we're > currently short on details. > > When an NFS mount is active at the time a shutdown is requested, the > system hangs, and doesn't shut down. The power button must be > long-pressed to power off the machine. I suspect this is because 'networking is disengaged before the NFS mount is unmounted. Supposing that a NFS volume is mounted at /x/y/z (either manually or via a shepherd service), probably what's happening is that the parent shepherd service of that path (be it /x/y, /x or /) never unmounts due to the NFS child path. It can't unmount the NFS path because: a. manual NFS mount, 'networking has no knowledge of this and is already gone; b. if provisioned through operating-system, since it doesn't support adding arbitrary shepherd dependencies and it does not add 'networking to its 'requires' field, 'networking is already gone by the time it reaches here. [1] If the NFS volume is manually unmounted (or there's some mechanism in place to unmount it before 'networking) then no hang should occur. [1]: Though it's tempting to simply add a 'networking dependency to any file-system-type = “nfs”, this is not the best idea since: a. not every service has a way to indicate that 'networking is ready (NFS mounts will fail to be automatically mounted but in theory they should be able to unmount without interaction) b. Interfaces that are configured outside of the 'networking service (be it manually, via custom shepherd service, etc.) or that do not “depend” on the general idea of 'networking, such as NFS mounts using interface scoped Link-Local addresses. Cheers, Bruno