From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 03 May 2024 20:33:51 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1s2xjD-000FP9-2o for lore@lore.pengutronix.de; Fri, 03 May 2024 20:33:51 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1s2xjD-0005fP-Is; Fri, 03 May 2024 20:33:51 +0200 Received: from smtp69.ord1d.emailsrvr.com ([184.106.54.69]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s2xix-0005db-MD for ptxdist@pengutronix.de; Fri, 03 May 2024 20:33:36 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mev.co.uk; s=20221208-6x11dpa4; t=1714761213; bh=ZRwBMHdvCEQvjXBTvoSK/KGJstgoYJKLxqXH4lelA8Y=; h=Date:To:From:Subject:From; b=xQhJsoEL/fIfo6D1mg4Z3ThI6yNbgOytikg9K2aXWLgetenbD3AQ90jVTWRagU4UJ vMu2K5YwOJet+lIGNdDGnKothegM34b4+Y1P+cLzF1tYiOVX57kOayORyZeykYdLQ3 Oo6GOtdP85XOon0apZP3dkM7IRUgKAvocQF2XXcQ= X-Auth-ID: abbotti@mev.co.uk Received: by smtp1.relay.ord1d.emailsrvr.com (Authenticated sender: abbotti-AT-mev.co.uk) with ESMTPSA id AB49540206 for ; Fri, 3 May 2024 14:33:33 -0400 (EDT) Message-ID: Date: Fri, 3 May 2024 19:33:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-GB To: ptxdist From: Ian Abbott Organization: MEV Ltd. Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Classification-ID: 5567b419-baf3-4a1e-837e-4f2ebee3d019-1-1 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-3.3 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] Race condition between rc-once.service and systemd-remount-fs.service X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Hi, If the root file system is initially mounted read-only, there is a possible race between rc-once.service and the systemd-remount-fs.service. If rc-once.service sees the root filesystem is mounted read-only, then it will temporarily remount it read-write and later mount it read-only again. Meanwhile, systemd-remount-fs.service will also remount the root file system as specified by /etc/fstab which could be read-write. Depending on the ordering, it is possible for the root file-system to end up mounted read-only when it should have ended up mounted read-write. As long as the two services do not run simultaneously, the root file system should end up mounted in the correct state. However, I do not know what the intended order is supposed to be. Perhaps it is intentionally system-dependent? -- -=( Ian Abbott || MEV Ltd. is a company )=- -=( registered in England & Wales. Regd. number: 02862268. )=- -=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=- -=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-