From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline Date: Sun, 22 Jan 2023 08:17:02 +0200 Message-ID: <833583ks9t.fsf@gnu.org> References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36505"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60996@debbugs.gnu.org To: Andy Moreton , Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 22 07:18:34 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 1pJTgX-0009J3-K7 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Jan 2023 07:18:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJTg7-0004nt-KV; Sun, 22 Jan 2023 01:18:07 -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 1pJTg2-0004na-Pv for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 01:18:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJTg2-0008Hp-Cb for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 01:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pJTg1-0000Sw-Vi for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 01:18:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Jan 2023 06:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60996 X-GNU-PR-Package: emacs Original-Received: via spool by 60996-submit@debbugs.gnu.org id=B60996.16743682261722 (code B ref 60996); Sun, 22 Jan 2023 06:18:01 +0000 Original-Received: (at 60996) by debbugs.gnu.org; 22 Jan 2023 06:17:06 +0000 Original-Received: from localhost ([127.0.0.1]:50480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJTf8-0000Rh-G2 for submit@debbugs.gnu.org; Sun, 22 Jan 2023 01:17:06 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJTf6-0000RB-IU for 60996@debbugs.gnu.org; Sun, 22 Jan 2023 01:17:04 -0500 Original-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 1pJTf1-00080d-97; Sun, 22 Jan 2023 01:16:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=TM4jNUN+j+PoratbKlGbOUIlsTZjTvrD/cOOhAYRYZc=; b=dmTKvGfrVeXS WlSTd5qR9zsKPg3xKaGLhDf+VtR5OGn3s04Dp6JxJOfqzA9L54Majvu9JU5dPfVSpNtKTXGi87Gg/ gGxafGlgtqx7/EFggvU0oWrPUNWIYy1+cUhn0czwM8q9rVUJk7VFnjClbAVa51Vi87hS7DL608deJ QUUCqx81E1HOwmNhvPsO9GgOsBvKdNZiHhUYtFa3QLY6fhMP/CCr2eagmOTK4UVDSRdSb9QBJjfwR 6avJ9FnjedCQzhk2Ks/UE5rmoAkgE4/X1jC616L8lA7ILodElTCHe02aDkhvJnYWc8a95SCDUWN1Y z7EP+QPfgn8sw5OrrY5YzA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJTf0-0004jz-DM; Sun, 22 Jan 2023 01:16:58 -0500 In-Reply-To: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> (message from Andy Moreton on Sat, 21 Jan 2023 22:12:10 +0000) 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:253905 Archived-At: > Date: Sat, 21 Jan 2023 22:12:10 +0000 > From: Andy Moreton > > Recently emacs 29 (and master) has started showing an error and > backtrace during startup: > > Debugger entered--Lisp error: (permission-denied "Removing old name" > "Permission denied" "c:/Users/ajm/AppData/Local/Temp/comp-lambda-MTAMbr...") > delete-file("c:/Users/ajm/AppData/Local/Temp/comp-lambda-MTAMbr...") We need a reproducible recipe to investigate this, or results of such investigation by you: which code has the file open when we try deleting it, and why that other code has it open? For a recipe, it should be enough to present a minimal init file which causes the problem (but pleased make it really minimal: as few lines as strictly needed for reproduction) Btw, "comp-lambda-MTAMbr..." seems to tell that it's some part of comp.el, which sounds strange: comp.el is supposed to be natively-compiled during the build, and that includes the trampolines for it. Hmm... > Tracing execution of emacs with Process Explorer shows that the temp > file used to native compile trampolines is opened and closed repeatedly > by emacs, and at the point of the backtrace is still open by the same > emacs process. We need to know which code opened it the last time and didn't close it. Can you figure that out? All the files Emacs opens go through 2 functions in w32.c: sys_fopen and sys_open, so by running with 2 breakpoints there that show the backtrace and continue, you should be able to see the culprit, and we can then take it from there. > I am not sure excactly when this issue started, but I did not see it in > emacs-29 or master bootstrapped before this month. Could be because we now compile trampolines differently (to avoid the danger of the "fork bomb" due to recursive compilation of trampolines by async subprocesses). Andrea, any suggestions or comments? Thanks.