From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline Date: Thu, 26 Jan 2023 16:50:59 +0000 Message-ID: References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21869"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 26 17:52:30 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 1pL5UD-0005R1-4w for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Jan 2023 17:52:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pL5U0-0001oI-P7; Thu, 26 Jan 2023 11:52:16 -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 1pL5Tp-0001o2-IT for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 11:52: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 1pL5Tm-0001oO-Mo for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 11:52:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pL5Tm-000592-CR for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 11:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Jan 2023 16:52: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.167475186319700 (code B ref 60996); Thu, 26 Jan 2023 16:52:02 +0000 Original-Received: (at 60996) by debbugs.gnu.org; 26 Jan 2023 16:51:03 +0000 Original-Received: from localhost ([127.0.0.1]:36037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL5Sp-00057f-8d for submit@debbugs.gnu.org; Thu, 26 Jan 2023 11:51:03 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:63999) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL5Sn-00057F-9V for 60996@debbugs.gnu.org; Thu, 26 Jan 2023 11:51:02 -0500 Original-Received: from ma.sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 30QGoxhm004937 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Thu, 26 Jan 2023 16:51:00 GMT In-Reply-To: <83a629i3aj.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 23 Jan 2023 19:11:48 +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:254217 Archived-At: Eli Zaretskii writes: >> Cc: 60996@debbugs.gnu.org >> From: Andrea Corallo >> Date: Mon, 23 Jan 2023 17:04:30 +0000 >> >> yes I confirm that's a trampoline compilation. The file starts with >> "lambda" as the mechanism is the same used for compiling function not >> not defined in source files. > > Thanks. Could the problem be caused by the fact that we nowadays > compile trampolines in the same session where it is needed, instead of > in a separate sub-process? IOW, could this cause a situation where we > are still using the renamed .eln.tmp trampoline when we want to delete > it? I don't know, still I've to understand why we try to delete this trampoline. What I've understood from the trace is that `comp--native-compile' is trying to delete the trampoline that was just compiled. This is not expected in normal conditions so we have to understand why. The only case where we might do that AFAIR is when `inhibit-automatic-native-compilation' is used. This was the infamous mechanism that was installed by Lars where, if I'm not wrong, we are supposed to compile a trampoline, load it, and remove it to pretend we didn't compiled anything :x If (as I understand) in Windows we can't delete a mapped file we have a problem more to solve. Andrew do you happen to have `inhibit-automatic-native-compilation' set? If not could we debug why we reach delete-file in this piece of code at the end of `comp--native-compile'? (when (and (not (stringp function-or-file)) comp-ctxt (comp-ctxt-output comp-ctxt) (file-exists-p (comp-ctxt-output comp-ctxt))) (delete-file (comp-ctxt-output comp-ctxt))) Thanks Andrea