From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.bugs Subject: bug#68083: 30.0.50; Intermittent build failure with native compilation Date: Sat, 30 Dec 2023 14:54:53 -0600 Message-ID: References: <83le9e743s.fsf@gnu.org> <835y0g5gq8.fsf@gnu.org> <838r5b4me9.fsf@gnu.org> <831qb34jgv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000004d9fcc060dc05c16" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7921"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68083@debbugs.gnu.org, Andrea Corallo , Jens Schmidt To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 30 21:56:24 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rJgNb-0001jt-5D for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Dec 2023 21:56:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJgNH-0004RN-44; Sat, 30 Dec 2023 15:56:03 -0500 Original-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 1rJgNF-0004R0-O1 for bug-gnu-emacs@gnu.org; Sat, 30 Dec 2023 15:56:01 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJgNF-0000Ni-EH for bug-gnu-emacs@gnu.org; Sat, 30 Dec 2023 15:56:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rJgNF-00034O-Ko for bug-gnu-emacs@gnu.org; Sat, 30 Dec 2023 15:56:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Aaron Jensen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Dec 2023 20:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68083 X-GNU-PR-Package: emacs Original-Received: via spool by 68083-submit@debbugs.gnu.org id=B68083.170396970311720 (code B ref 68083); Sat, 30 Dec 2023 20:56:01 +0000 Original-Received: (at 68083) by debbugs.gnu.org; 30 Dec 2023 20:55:03 +0000 Original-Received: from localhost ([127.0.0.1]:45138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJgMI-00032w-Vj for submit@debbugs.gnu.org; Sat, 30 Dec 2023 15:55:03 -0500 Original-Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]:57778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJgMG-00032L-M0 for 68083@debbugs.gnu.org; Sat, 30 Dec 2023 15:55:01 -0500 Original-Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2cceb90b398so20352961fa.3 for <68083@debbugs.gnu.org>; Sat, 30 Dec 2023 12:54:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703969694; x=1704574494; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Mp9BVH5OV152v6kwoaUJ+TLD/ewnHmcR2pSQPJtFn5g=; b=HhvTuPrv0bow0BdIXnuq2cV+TLFTON/cL4KIxNyWG3Le8tqGUdEWc5+4cv5roYeGXg 7TDldDvFoTjd0QXgzMt9NiGn3UbOdldhv4XgVHv0ZuLxG827tObNXiKH0OIF6hsW7Oli nO5I7R7nO6VEvd55+S/BLkSM1pI10AjbMXQVzDWXJbOPn5G9nvi+ra0AYziEsQfAzt3k AX2rZP2xbq526BXAG0k2SfBFnveRSj61OtN8A9bjP7DIF9en+710VkYdpQSCkcE5HoF4 RgbbbirnIQyHCCyDwhKj+h1sqoKcqfX0Xa3feSNKAESDhWANhtySxQNMelYjRpZYLzEk pPUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703969694; x=1704574494; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Mp9BVH5OV152v6kwoaUJ+TLD/ewnHmcR2pSQPJtFn5g=; b=ojmfLVrZKh1HULgJPti3EcRrFj5DcpNAYjV/e5HQ/vHfSv5iwCia3YJrjuTpvevGn+ 4LpLGl/U1zxzIrqAIJugcCIX2nwkCQB509zwnrOe+jiMQqM8qc/0Fbj/atfkNRZ2V2Tn F9fgFEElRKjfbjWvQaH+iJtFgQV/Ri0pBadsZ2AyHO7laksdOX55WoCgcE3l115HOZ9h cEEhprMcNmfqR5BGQeC0S8ltAK6nUx5c1eOBotCgHDLB0MItKU5hU51yjKxcgtk0cx9w Aq/z0xPylGuhYriPcPeeZrw002mKrKkmDcZrte8Os++m6P4yfq1F0HA0o07LiPK3+BCr 5oCw== X-Gm-Message-State: AOJu0YyloZMwSrm7BnEGLwqNwQRj2Z7M52VBRuzA3+TF/YP/m5BeCZ0e zrMiK/fq5G23U3swbQRx+/unpoOlD/ZizgW6nMo= X-Google-Smtp-Source: AGHT+IH8rAh2OUSTiZO1zYV4ANM5XZIrOJj4dKJk+Qt2GzaNSUodAOW+k6m+X/92c/UAdlwyorvSE5slhctTwTjkdVY= X-Received: by 2002:a2e:9186:0:b0:2cc:9342:a810 with SMTP id f6-20020a2e9186000000b002cc9342a810mr5530228ljg.88.1703969693735; Sat, 30 Dec 2023 12:54:53 -0800 (PST) Original-Received: from 649336022844 named unknown by gmailapi.google.com with HTTPREST; Sat, 30 Dec 2023 14:54:53 -0600 In-Reply-To: <831qb34jgv.fsf@gnu.org> X-Superhuman-Draft-ID: draft00439ccdbe70bf4f X-Superhuman-ID: lqsjjh3z.c573d461-1374-4cac-b025-86b615f4bfe6 X-Mailer: Superhuman iOS 11007 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277101 Archived-At: --0000000000004d9fcc060dc05c16 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Works for me, though is it still an outstanding question as to whether or not we should add macro expand back? Also yeah if we add the t we can do what you suggested where it=E2=80=99s e= ither a delete or rename force. Aaron On Sat, Dec 30 2023 at 1:46 PM, Eli Zaretskii wrote: > From: Aaron Jensen > Date: Sat, 30 Dec 2023 13:06:55 -0500 > Cc: acorallo@gnu.org, 68083@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de > > On Sat, Dec 30, 2023 at 12:43=E2=80=AFPM Eli Zaretskii wro= te: > > > > What happens if, instead of wrapping rename-file in condition-case, > > you change that to say > > > > (t (if newfile > > (rename-file newfile oldfile) > > (delete-file oldfile)) > > I don't really understand this change. The previous version of the code > wraps the rename in a (when newfile) and deletes the oldfile right before > that. The deletion would always be necessary if the oldfile exists unless > OK-IF-ALREADY-EXISTS is specified in rename-file. > > Sorry, I meant to add the OK-IF-ALREADY-EXISTS argument non-nil, of > course. > > The point is that you can rename a file if the OLDFILE exists with no > problem, and that is supposed to be an atomic operation, so no race > conditions. > > Indeed, but we aren't specifying OK-IF-ALREADY-EXISTS, so if another > process does the same compile at the same time (and therefore the same > rename), they will conflict. We could specify OK-IF-ALREADY-EXISTS instea= d > and that works as well: > > Then I prefer this version. > --0000000000004d9fcc060dc05c16 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Works for me, though is it still an outstanding que= stion as to whether or not we should add macro expand back?

Also yeah if we add the t we can do what yo= u suggested where it=E2=80=99s either a delete or rename force.=C2=A0


Aaron
=20

On Sat, Dec 30 2023 at 1:46 PM, Eli Zaretskii <eliz@gnu.org<= /a>> wrote:

From: Aaron Jensen <aaronjensen= @gmail.com>
Date: Sat, 30 Dec 2023 13:06:55 -0500
Cc: acorallo@gnu.org, 68083@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de

On Sat, Dec 30, 2023 at 12:43=E2=80=AFPM Eli Zaretskii <eliz@gnu.org> wrote:
>
> What happens if, instead of wrapping rename-file in condition-case,
> you change that to say
>
> (t (if newfile
> (rename-file newfile oldfile)
> (delete-file oldfile))

I don't really understand this change. The previous version of the code wraps the rename in a (when newfile) and deletes the oldfile right before that. The deletion would always be necessary if the oldfile exists unless OK-IF-ALREADY-EXISTS is specified in rename-file.

Sorry, I meant to add the OK-IF-ALREADY-EXISTS argument non-nil, of course.

The point is that you can rename a file if the OLDFILE exists with no problem, and that is supposed to be an atomic operation, so no race conditions.

Indeed, but we aren't specifying OK-IF-ALREADY-EXISTS, so if another process does the same compile at the same time (and therefore the same rename), they will conflict. We could specify OK-IF-ALREADY-EXISTS instead and that works as well:

Then I prefer this version.

--0000000000004d9fcc060dc05c16--