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 19:46:25 +0000 Message-ID: References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> <83r0vhcf9m.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="2952"; 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 20:47:28 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 1pL8DY-0000Ym-CP for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Jan 2023 20:47:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pL8DA-0001I5-DU; Thu, 26 Jan 2023 14:47:04 -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 1pL8D9-0001Hw-1p for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 14:47: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 1pL8D8-0001Lu-M4 for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 14:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pL8D7-0001V3-Rm for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 14:47:01 -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 19:47: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.16747623905717 (code B ref 60996); Thu, 26 Jan 2023 19:47:01 +0000 Original-Received: (at 60996) by debbugs.gnu.org; 26 Jan 2023 19:46:30 +0000 Original-Received: from localhost ([127.0.0.1]:36252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL8Cc-0001U9-87 for submit@debbugs.gnu.org; Thu, 26 Jan 2023 14:46:30 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:52483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL8CZ-0001Ty-Hp for 60996@debbugs.gnu.org; Thu, 26 Jan 2023 14:46:28 -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 30QJkPMM012596 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Thu, 26 Jan 2023 19:46:25 GMT In-Reply-To: <83r0vhcf9m.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 26 Jan 2023 20:38:45 +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:254230 Archived-At: Eli Zaretskii writes: >> From: Andrea Corallo >> Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org >> Date: Thu, 26 Jan 2023 16:50:59 +0000 >> >> 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 > > OK, this seems to be what is happening here, because we compile the > trampoline to a temporary directory. Otherwise, I don't see why we > would do that, and why we would delete a trampoline we just compiled. Agree, or at least I hope (otherwise we have two problems in place of one :). >> If (as I understand) in Windows we can't delete a mapped file we have a >> problem more to solve. > > Yes. If this is what happens, then I think we will have to maintain a > list of such trampolines, and delete them just before exiting, after > calling dynlib_close for them. Mmmhh, and what if another Emacs tries to delete or overwrite the same file? But my question is: is this mechanism _really_ necessary? >From my POV it's just a kludge that was, is and will be source of problems. Was never clear to me for which specific reason this was implemented as, at the time, I had the impression that all Debian requirements could be handled with what we already offered. At the time I firmly opposed to this change, but I was told by Lars it went into master "for discussion" (!?), indeed the review discussion never happened... and now we are left with this present. Unless we have a very strong reason to keep it, I believe we should just get rid of this mechanism, otherwise it will be source of pain for us again and again in the future. Best Regards Andrea