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: Tue, 24 Jan 2023 19:50:27 +0200 Message-ID: <83k01bhlek.fsf@gnu.org> References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86wn5evv70.fsf@gmail.com> <83r0vli9gr.fsf@gnu.org> <86edrku3w6.fsf@gmail.com> <83wn5cgkgv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34114"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60996@debbugs.gnu.org To: andrewjmoreton@gmail.com, akrl@sdf.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 24 18:51:23 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 1pKNS7-0008ia-Fr for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Jan 2023 18:51:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKNRn-0007U8-Uo; Tue, 24 Jan 2023 12:51: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 1pKNRn-0007Tz-8K for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2023 12:51:03 -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 1pKNRm-00047r-Pp for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2023 12:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pKNRm-0003CP-7D for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2023 12:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Jan 2023 17:51:02 +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.167458262612249 (code B ref 60996); Tue, 24 Jan 2023 17:51:02 +0000 Original-Received: (at 60996) by debbugs.gnu.org; 24 Jan 2023 17:50:26 +0000 Original-Received: from localhost ([127.0.0.1]:57506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKNRC-0003BV-Ba for submit@debbugs.gnu.org; Tue, 24 Jan 2023 12:50:26 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKNRA-0003BH-7I for 60996@debbugs.gnu.org; Tue, 24 Jan 2023 12:50:24 -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 1pKNR4-0003yF-Eq; Tue, 24 Jan 2023 12:50:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=k8dxglHzqmUX6BM92EP0HdyewaPlj/i4UmDXeIx6Wh4=; b=AS7QDdZV4PmY6G0HlQb5 mY9gRna8SdR4HdK4JioKGonXFee87oJvJAW+hvrolS+WCcM2pW4YiarLP8L2ApkOUFri2GTiAl6Hb S2Oa27Di8lBCD6ADiXKpCVLGexKJCN9IlHw/jmYP8OtzLFVDGeqM49Cy4DVjklqwM3nB2oEtXbEzQ TcB3Q8BGIBcwr43073MhgCUj0N37tPjfty8vdgazQFGpkuWNOhXFC+YqoCB6PK6XxPueCQVEI0maD Im3cfsstNaprJXi0AbPkvXoouNcl96QrYF8Y0FXROKFALo+M81oT6LbDRJIUbtWoi4BxItgwVNAKS KQr+GMCP2s/lug==; 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 1pKNR1-00026m-RU; Tue, 24 Jan 2023 12:50:17 -0500 In-Reply-To: <83wn5cgkgv.fsf@gnu.org> (message from Eli Zaretskii on Tue, 24 Jan 2023 14:56:00 +0200) 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:254057 Archived-At: > Cc: 60996@debbugs.gnu.org > Date: Tue, 24 Jan 2023 14:56:00 +0200 > From: Eli Zaretskii > > But first, I'd like to understand whether indeed it could happen that > we are deleting a temporary .eln file for a trampoline we just > compiled when we are still using that .eln file. If this happens, > we'd need to find a way to delay the deletion till Emacs is about to > exit or something. I keep looking at the backtraces you provided, this: > 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...") >   #f(compiled-function () #)() >   comp--native-compile((lambda (arg0 &optional arg1 arg2 arg3) (let ((f > #'format-mode-line)) (funcall f arg0 arg1 arg2 arg3))) nil nil) >   comp-trampoline-compile(format-mode-line) >   comp-subr-trampoline-install(format-mode-line) >   advice--add-function(:around (#f(compiled-function () # 0x3c5d8019df7e91>) . #f(compiled-function (gv--val) # 0x8fdecbbba7cb3c2>)) delight--format-mode-line nil) >   advice-add(format-mode-line :around delight--format-mode-line) >   require(delight nil t) And this: > delete file("path/to/comp-lambda-XXXXX.eln") > comp--native-compile((lambda (...) ...)) > comp-trampoline-compile(function-name) > comp-subr-trampoline-install(function-name) > advice--add-function(...) > advice-add(function-name ...) and I still don't have a clear picture regarding which code calls delete-file and why. For example, the first backtrace above says that comp--native-compile calls delete-file via some byte-compiled function, not directly. But what is that byte-compiled function? can you figure that out? There is a direct call to delete-file in comp--native-compile, but is that the call which fails? And if so, why does it fail? Which code created the .eln file that comp--native-compile tries to delete? Andrea, can you please describe in detail what happens, step by step, when comp-subr-trampoline-install is called like above, to compile a trampoline for an advised function? What is that file which comp--native-compile is deleting at the end? Thanks.