From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id oEW7Ce0wD2OV9AAAbAwnHQ (envelope-from ) for ; Wed, 31 Aug 2022 11:59:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qG3CCe0wD2MUXQAA9RJhRA (envelope-from ) for ; Wed, 31 Aug 2022 11:59:09 +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 9C51A3D2D7 for ; Wed, 31 Aug 2022 11:59:07 +0200 (CEST) Received: from localhost ([::1]:43868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTKV0-0005kE-GI for larch@yhetil.org; Wed, 31 Aug 2022 05:59:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTKUx-0005jj-4N for bug-guix@gnu.org; Wed, 31 Aug 2022 05:59:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48486) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTKUw-0002LI-SB for bug-guix@gnu.org; Wed, 31 Aug 2022 05:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oTKUw-0000rv-C8 for bug-guix@gnu.org; Wed, 31 Aug 2022 05:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#57501: call-with-file-lock does not remove lock file Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 31 Aug 2022 09:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57501 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 57501@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16619398833253 (code B ref -1); Wed, 31 Aug 2022 09:59:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 Aug 2022 09:58:03 +0000 Received: from localhost ([127.0.0.1]:38232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTKTy-0000qP-PD for submit@debbugs.gnu.org; Wed, 31 Aug 2022 05:58:03 -0400 Received: from lists.gnu.org ([209.51.188.17]:53700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTKTv-0000pw-Ul for submit@debbugs.gnu.org; Wed, 31 Aug 2022 05:58:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTKTv-0005dd-LM for bug-guix@gnu.org; Wed, 31 Aug 2022 05:57:59 -0400 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21124) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTKTt-0002Fb-Uw for bug-guix@gnu.org; Wed, 31 Aug 2022 05:57:59 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1661939875; cv=none; d=zohomail.com; s=zohoarc; b=U6oLZZVZV1D5WPh0aZEy/Pj7IKLN6CDIjiNPdsdgOD3Jv9VIhvKMeUqB3MsiurD/D6f1O2eF/BnAPfuVWX6fFNP2YJHh0E8uOuYRwauzOqR3lp4FTd6wxH8o6HnXVEHnDCEFQFiCA0J3d2xxu1Og56b1O6w3FL0yYPvO3kDvqJM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661939875; h=Content-Type:Content-Transfer-Encoding:Date:From:MIME-Version:Message-ID:Subject:To; bh=gYTX3fxxwWZASCD7Y49W7YdoO2fVEUzZfW28q8Znf1U=; b=NtkT70wve/iPeN3TYjsw3MENDmMUhNjnCT1oKcrLJFFyGHQ5bd7/p0ZeLotGFflag/1Lbv8EzqCPpNdvqt2kwXu1y1IgfHfT27uhNpyHz+2fPteYV0EWgJZBPGyMpaU4qGl1BhfW1DsgQnhtcrgLpnSSP1VJ1n4nkff6j/LroS4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1661939875; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:From:To:To:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To:Cc; bh=gYTX3fxxwWZASCD7Y49W7YdoO2fVEUzZfW28q8Znf1U=; b=HTC4Z8rDkIfmR2Eo2Edd22ZyYJEG+OFQ8c3Xi9bByeBDIDSMUA2Q9uv9qzHn3fZZ bX4YJMq61MruTxRDcO2IL1eeOcd9ojrvGUYsWCRMqEp4QR/7Im265Np3VMYBnZ5gozK YBHppK0eu4EPyMRH4BZUCyX8bdjB0ePaeF88YlEk= Received: from localhost (i5E862DD2.versanet.de [94.134.45.210]) by mx.zohomail.com with SMTPS id 1661939874184666.9667178691935; Wed, 31 Aug 2022 02:57:54 -0700 (PDT) User-agent: mu4e 1.8.7; emacs 28.1 From: Ricardo Wurmus Date: Wed, 31 Aug 2022 11:50:38 +0200 X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Message-ID: <87v8q8razk.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.51; envelope-from=rekado@elephly.net; helo=sender4-of-o51.zoho.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, 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-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-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1661939949; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=gYTX3fxxwWZASCD7Y49W7YdoO2fVEUzZfW28q8Znf1U=; b=Ptz7VV3kg2fsKfuUnbI2Khmh7erAJVsDAwmqPl0lF7eWRjVig9supciUdvc9tmoYsZsnoa KCDVtc4F1wNFOTh9WLMIG527G9mybX3/XPAO8eNgwuenjNt0QKDvp1tnONZRBEBXwbGAg1 xH1tBGkMmii6ZfsNTEB4m8BZK6XkZQPyr34yv8MTb8UNjW87kwND6c+5lYRGTMjkHRf5Gp 8bnmrsi+QuWxHP7qJZTEYUmKkkySNpTzSZGZspfH6r5dKH0l8xvjrAY5CI33cOLubePfEz +zYx86kP3YcLKk1oas/jrbt/SF6R260hamJGO5lt2v7TYafpIypJshMe6E9cag== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1661939949; a=rsa-sha256; cv=fail; b=CaYEGqAVkB+Q9ElxbZNxowgmci7xf7VPpN1q2aRPMOmBKMfa9NyqdCreY3ztQnLt3zhJek G/+62jwWw813kf7/U1wDenxv74MBanMTmTADJPt1HD4YPWUs125tFUXwU5oPSPvi+qyDvE WhWbHBIxU4BON2D3611tK9CdM1HrXPcrjomiGjSnMI42phTQFU6cyGFMJdPFsIMLEhuzLw FB9WbJa+14v0Y+fdCmSACmpY+VaoxKKUULDnW42+cF3jHRSzkKDF1EtOptsxe2l2bR2dO1 CqRzqRxI6pwW1KEMlv92tYt+d/a3KYFzHqCxNYGdSJOsX+f4tUOCdoFm9aXJ/Q== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=HTC4Z8rD; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}"); dmarc=none; 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: 3.51 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=HTC4Z8rD; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}"); dmarc=none; 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: 9C51A3D2D7 X-Spam-Score: 3.51 X-Migadu-Scanner: scn1.migadu.com X-TUID: CkjTDNLjENHi =E2=80=9Ccall-with-file-lock=E2=80=9D and =E2=80=9Ccall-with-file-lock/no-w= ait=E2=80=9D create a lock file but don=E2=80=99t remove the lock file when they exit. (guix build syscalls) defines these procedures with =E2=80=9Cdynamic-wind= =E2=80=9D so that the lock is always lifted with =E2=80=9Cunlock-file=E2=80=9D. While = =E2=80=9Cunlock-file=E2=80=9D uses the fcntl syscall to remove the lock on the file, the lock file itself is not deleted. I think it should be deleted. When the lock file sticks around we may run into problems due to lock file ownership. For example, imagine a cron job running as a different user that upgrades the contents of a user profile. That cron job would leave behind an unlocked lock file owned by that user, preventing the owner of the profile from operating on the profile even though the lock has already been lifted with =E2=80=9Cunlock-file=E2=80=9D. I propose letting either unlock-file or with-profile-lock delete the lock file. --=20 Ricardo