From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 21 17:12:26 2023 Received: (at submit) by debbugs.gnu.org; 21 Jan 2023 22:12:26 +0000 Received: from localhost ([127.0.0.1]:50023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJM65-0005J6-Qc for submit@debbugs.gnu.org; Sat, 21 Jan 2023 17:12:26 -0500 Received: from lists.gnu.org ([209.51.188.17]:60660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJM63-0005Iy-T1 for submit@debbugs.gnu.org; Sat, 21 Jan 2023 17:12:24 -0500 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 1pJM62-0003qv-R1 for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2023 17:12:22 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJM5x-000339-8E for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2023 17:12:19 -0500 Received: by mail-wr1-x42f.google.com with SMTP id e3so7683569wru.13 for ; Sat, 21 Jan 2023 14:12:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:from:content-language:subject:to :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=1lu/yp6anNhAJtHnscAr42ZjODtw1m9lVNsdCGg9fWI=; b=GK/Cb9I3LCVfr82RuMIV2X/hy/PszfHJqWw8Dn4FT83tquYw4qmu8p9k+WjhwwnPvi g21BEtkFREjxQvDlMgb4aaKdyNyve5xsVLU42tna0HE+EPauDqYhutbt0TYNSfX1RaHp 0pvhHhzDiJJHqsXnSTGQQyWnCjX+Wd13m11byOgj4/qO+IQndKFcFXy8JKmp+iLhDMGc ZDlnwzWXmljBJgI9ZMaC+dVwawbJovrXkisj7YJLmQyNGzIuVFUsrDXk51jSWRP6QAAv gKYjfDBH6A+8Sj57M6W/cNxtNRGgHqemWAmHaIYGA5MoYelDmHsZ5+JmM9nWfRivikY9 aXlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:from:content-language:subject:to :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=1lu/yp6anNhAJtHnscAr42ZjODtw1m9lVNsdCGg9fWI=; b=RGgCXH+/dSt+Snmmx9ROkKBFx09ChrOP+dl0OS5aBzMbn4zxd7/pBsfkZ1ZTqBYnBn kM+p6gi8Hoe6cAI2tgnIDF3JSynjXawqh3JoK/6wz2Zr97x0cauhgP4APyqOhe2D9rsP apyVpJsIywpqElpfKyYwcJS9lSNWqntqe3XLHvw7+v2EpUa5l7aCmOBPAvNB4Nz93Jbj DqB2NuPPC6TCj+cvWUWTFLNviKzlXMMkznKQIDQ9JdvTeuuMik5hFz/+cAzzCaKyp3B3 7X7Cb7mzvZAXra4/X5eHeG/TOF4mJOy45wdzuS4k4wh7ub6jkOjKNJ/E6WAoYaAyscHm scig== X-Gm-Message-State: AFqh2kpJzfKWmLSHvUA+NxCwMoWZ2IxF9l8aquyuxgTi+pAFTCAcPYtu U3UOJKZdzCz50mg9EfhdKn2GM5KM2eg= X-Google-Smtp-Source: AMrXdXstVLZDKYXK+jglHXA6vmhbka6aTSPXgO4ZSMu5hl5RNwoiWKCwV4zchzgkMjprS1YZDt+EIw== X-Received: by 2002:a5d:568f:0:b0:2be:b09:796c with SMTP id f15-20020a5d568f000000b002be0b09796cmr16700206wrv.64.1674339132723; Sat, 21 Jan 2023 14:12:12 -0800 (PST) Received: from [192.168.0.3] (82-69-64-228.dsl.in-addr.zen.co.uk. [82.69.64.228]) by smtp.gmail.com with ESMTPSA id z17-20020adfec91000000b0028965dc7c6bsm1732010wrn.73.2023.01.21.14.12.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 21 Jan 2023 14:12:12 -0800 (PST) Message-ID: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> Date: Sat, 21 Jan 2023 22:12:10 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 To: bug-gnu-emacs@gnu.org Subject: 29.0.60; Native compile fails to remove temp file for trampoline Content-Language: en-US From: Andy Moreton Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=andrewjmoreton@gmail.com; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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...")   #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 () #) . #f(compiled-function (gv--val) #)) delight--format-mode-line nil)   advice-add(format-mode-line :around delight--format-mode-line)   require(delight nil t)   (not (require 'delight nil t))   (if (not (require 'delight nil t)) (display-warning 'use-package (format "Cannot load %s" 'delight) :error))   (prog1 (if (not (require 'delight nil t)) (display-warning 'use-package (format "Cannot load %s" 'delight) :error)) (let ((elapsed (float-time (time-subtract (current-time) now)))) (if (> elapsed 0.1) (message "%s...done (%.3fs)" "Loading package delight" elapsed) (message "%s...done" "Loading package delight"))))   (let ((now (current-time))) (message "%s..." "Loading package delight") (prog1 (if (not (require 'delight nil t)) (display-warning 'use-package (format "Cannot load %s" 'delight) :error)) (let ((elapsed (float-time (time-subtract (current-time) now)))) (if (> elapsed 0.1) (message "%s...done (%.3fs)" "Loading package delight" elapsed) (message "%s...done" "Loading package delight")))))   (condition-case err (let ((now (current-time))) (message "%s..." "Loading package delight") (prog1 (if (not (require 'delight nil t)) (display-warning 'use-package (format "Cannot load %s" 'delight) :error)) (let ((elapsed (float-time (time-subtract ... now)))) (if (> elapsed 0.1) (message "%s...done (%.3fs)" "Loading package delight" elapsed) (message "%s...done" "Loading package delight"))))) ((debug error) (funcall use-package--warning1 :catch err)))   load-with-code-conversion("c:/home/ajm/.emacs.d/init.el" "c:/home/ajm/.emacs.d/init.el" t t)   load("c:/home/ajm/.emacs.d/init" noerror nomessage)   startup--load-user-init-file(#f(compiled-function () #) #f(compiled-function () #) t)   command-line()   normal-top-level() 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. Adding a workaround to .emacs.d/init.el mitigates this problem:  (setq comp-enable-subr-trampolines nil) Running "emacs -Q" does not show the problem, but is then less likely to native compile trampolines during startup. I am not sure excactly when this issue started, but I did not see it in emacs-29 or master bootstrapped before this month.     AndyM In GNU Emacs 29.0.60 (build 8, x86_64-w64-mingw32) of 2023-01-21 built  on QUIETUS Repository revision: b875c9bf67ebf858648a00307c370d7a196aab56 Repository branch: emacs-29 Windowing system distributor 'Microsoft Corp.', version 10.0.19045 System Description: Microsoft Windows 10 Pro (v10.0.2009.19045.2486) Configured using:  'configure --prefix=c:/emacs/29.0.60/mingw64-x86_64-O2-native-aot  --cache-file=/c/emacs/git/emacs/emacs-29/build/mingw64-x86_64-O2-native-aot/config.cache  --without-compress-install --without-dbus --with-gif --with-gnutls  --without-imagemagick --with-jpeg --with-json --with-lcms2  --with-modules --with-native-compilation=aot --with-png --without-pop  --with-rsvg --with-sqlite3 --with-tiff --with-tree-sitter --with-xml2  --with-xpm --enable-checking 'CPPFLAGS= -DNO_SHLWAPI_ISOS=1' 'CFLAGS=  -O2 -g3 -gdwarf-4 -fdiagnostics-color=never'  PKG_CONFIG_PATH=/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB Important settings:   value of $LANG: ENG   locale-coding-system: cp1252 Major mode: ELisp/l Minor modes in effect:   hexl-follow-ascii: t   which-function-mode: t   global-so-long-mode: t   display-fill-column-indicator-mode: t   desktop-save-mode: t   auto-image-file-mode: t   minibuffer-electric-default-mode: t   override-global-mode: t   tooltip-mode: t   global-eldoc-mode: t   eldoc-mode: t   show-paren-mode: t   mouse-wheel-mode: t   menu-bar-mode: t   file-name-shadow-mode: t   global-font-lock-mode: t   font-lock-mode: t   blink-cursor-mode: t   column-number-mode: t   line-number-mode: t   transient-mark-mode: t   auto-composition-mode: t   auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message yank-media rfc822 mml mml-sec epa derived gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils add-log time mule-util jka-compr bug-reference dired-aux xcscope autorevert dired-x dired dired-loaddefs sh-script treesit executable time-date vc-svn rnc-mode rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap sgml-mode facemenu dom nxml-util nxml-enc xmltok lua-mode advice rust-utils rust-mode rust-rustfmt rust-playpen rust-compile rust-cargo meson-mode smie eglot external-completion array filenotify jsonrpc ert ewoc debug backtrace find-func xref flymake-proc flymake thingatpt project hexl grep vc-git diff-mode vc-dispatcher graphviz-dot-mode compile text-property-search xr which-func imenu so-long display-fill-column-indicator desktop frameset cygwin-mount ange-ftp comint ansi-osc ansi-color ring hl-line pcase image-file image-converter edmacro kmacro use-package-bind-key use-package-delight minibuf-eldef delight comp comp-cstr warnings rx bind-key easy-mmode cl-extra help-mode use-package-ensure use-package-core finder-inf yaml-mode-autoloads xr-autoloads rust-mode-autoloads rnc-mode-autoloads powershell-autoloads plantuml-mode-autoloads meson-mode-autoloads markdown-mode-autoloads lua-mode-autoloads htmlize-autoloads haskell-mode-autoloads graphviz-dot-mode-autoloads gnuplot-autoloads gnu-elpa-keyring-update-autoloads epg rfc6068 epg-config gnu-elpa-keyring-update delight-autoloads debbugs-autoloads info dash-autoloads cus-edit pp cus-load icons wid-edit package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json url-vars nsm map byte-opt gv bytecomp byte-compile subr-x gnutls puny cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 388657 216671)  (symbols 48 25171 486)  (strings 32 119123 37613)  (string-bytes 1 3096676)  (vectors 16 49749)  (vector-slots 8 1397743 432730)  (floats 8 85 750)  (intervals 56 5657 2026)  (buffers 984 25)) From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 22 01:17:06 2023 Received: (at 60996) by debbugs.gnu.org; 22 Jan 2023 06:17:06 +0000 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 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 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==; 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 Date: Sun, 22 Jan 2023 08:17:02 +0200 Message-Id: <833583ks9t.fsf@gnu.org> From: Eli Zaretskii To: Andy Moreton , Andrea Corallo In-Reply-To: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> (message from Andy Moreton on Sat, 21 Jan 2023 22:12:10 +0000) Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60996 Cc: 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 22 07:51:59 2023 Received: (at submit) by debbugs.gnu.org; 22 Jan 2023 12:51:59 +0000 Received: from localhost ([127.0.0.1]:50830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJZpH-00077G-9b for submit@debbugs.gnu.org; Sun, 22 Jan 2023 07:51:59 -0500 Received: from lists.gnu.org ([209.51.188.17]:36460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJZpC-000772-IQ for submit@debbugs.gnu.org; Sun, 22 Jan 2023 07:51:58 -0500 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 1pJZp9-0004jr-8F for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 07:51:52 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJZp1-0003ZD-TI for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 07:51:46 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pJZoy-0001lQ-32 for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 13:51:40 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline Date: Sun, 22 Jan 2023 12:51:34 +0000 Message-ID: <86tu0iwx49.fsf@gmail.com> References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:k0qdkIV6PpXqhAK0kZ2Gus/dnus= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.4 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.112, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) On Sun 22 Jan 2023, Eli Zaretskii wrote: >> 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) It may take considerable time and effort to reduce my init file down to a simple reproducer... > 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... The backtrace always seems to contain: 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 ...) So it looks very much like compiling trampolines is involved. >> 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. Thanks. I'll take a look in gdb and report back if I get further info. >> 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 22 21:30:59 2023 Received: (at submit) by debbugs.gnu.org; 23 Jan 2023 02:30:59 +0000 Received: from localhost ([127.0.0.1]:52912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJmbp-0003TX-RG for submit@debbugs.gnu.org; Sun, 22 Jan 2023 21:30:59 -0500 Received: from lists.gnu.org ([209.51.188.17]:42718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJmbm-0003TP-Sy for submit@debbugs.gnu.org; Sun, 22 Jan 2023 21:30:56 -0500 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 1pJmbm-0004VK-IG for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 21:30:54 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJmbj-00057M-Nb for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 21:30:54 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pJmbi-0004RX-2r for bug-gnu-emacs@gnu.org; Mon, 23 Jan 2023 03:30:50 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline Date: Mon, 23 Jan 2023 02:30:43 +0000 Message-ID: <86wn5evv70.fsf@gmail.com> References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:z2d8vDFQMFqshQZpobpAUM8UJ5k= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.4 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.112, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) --=-=-= Content-Type: text/plain On Sun 22 Jan 2023, Eli Zaretskii wrote: >> 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) Agreed, but this appear to be tiing sensitive, so a minimised reproducer may take a while to reduce down from my init file. > 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... >From more expermenting with a debug build in gdb, it seem to be related to this code in native-elisp-load: /* If in this session there was ever a file loaded with this name, rename it before loading, to make sure we always get a new handle! */ Lisp_Object tmp_filename = Fmake_temp_file_internal (filename, Qnil, build_string (".eln.tmp"), Qnil); if (NILP (Ffile_writable_p (tmp_filename))) comp_u->handle = dynlib_open_for_eln (SSDATA (encoded_filename)); else { Frename_file (filename, tmp_filename, Qt); comp_u->handle = dynlib_open_for_eln (SSDATA (ENCODE_FILE (tmp_filename))); Frename_file (tmp_filename, filename, Qnil); } The renaming results in the ".eln.tmp" suffixed name having an open handle. That handle is still open when other code tries to delete the renamed ".eln" file, which fails. The attached .csv file shows filesystem activity captured by Process Monitor for the relevant "...\comp-lambda-*" temp files during emacs startup. (It may be easier to read if imported into a spreadsheet). --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=procmon-emacs-29-jit-O0.csv Content-Description: filesystem activity "Time of Day","Process Name","PID","Operation","Path","Result","Detail" "14:15:21.8965246","emacs.exe","6452","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Generic Read/Write, Disposition: Create, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: 0, OpenResult: Created" "14:15:21.8968228","emacs.exe","6452","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.4141153","emacs.exe","7976","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Desired Access: Generic Read/Write, Disposition: Create, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: 0, OpenResult: Created" "14:15:24.4143658","emacs.exe","7976","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","" "14:15:24.8245971","emacs.exe","7976","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Desired Access: Generic Write, Read Attributes, Disposition: OverwriteIf, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: 0, OpenResult: Overwritten" "14:15:24.8248010","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 0, Length: 4,096, Priority: Normal" "14:15:24.8250025","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 4,096, Length: 4,096, Priority: Normal" "14:15:24.8251398","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 8,192, Length: 4,096, Priority: Normal" "14:15:24.8252491","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 12,288, Length: 4,096" "14:15:24.8253186","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 16,384, Length: 4,096" "14:15:24.8253869","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 20,480, Length: 4,096" "14:15:24.8254553","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 24,576, Length: 4,096" "14:15:24.8255238","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 28,672, Length: 4,096" "14:15:24.8256255","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 32,768, Length: 4,096, Priority: Normal" "14:15:24.8257619","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 36,864, Length: 4,096, Priority: Normal" "14:15:24.8259024","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 40,960, Length: 4,096, Priority: Normal" "14:15:24.8260399","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 45,056, Length: 4,096, Priority: Normal" "14:15:24.8261815","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 49,152, Length: 4,096, Priority: Normal" "14:15:24.8262978","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 53,248, Length: 4,096" "14:15:24.8263671","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 57,344, Length: 4,096" "14:15:24.8264377","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 61,440, Length: 4,096" "14:15:24.8265084","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 65,536, Length: 4,096" "14:15:24.8265771","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 69,632, Length: 4,096" "14:15:24.8266454","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 73,728, Length: 4,096" "14:15:24.8267138","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 77,824, Length: 4,096" "14:15:24.8267821","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 81,920, Length: 4,096" "14:15:24.8268504","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 86,016, Length: 4,096" "14:15:24.8271045","emacs.exe","7976","WriteFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Offset: 90,112, Length: 2,139" "14:15:24.8271425","emacs.exe","7976","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","" "14:15:24.8289434","emacs.exe","7976","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8289892","emacs.exe","7976","QueryBasicInformationFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","CreationTime: 22/01/2023 14:15:21, LastAccessTime: 22/01/2023 14:15:21, LastWriteTime: 22/01/2023 14:15:21, ChangeTime: 22/01/2023 14:15:21, FileAttributes: A" "14:15:24.8290252","emacs.exe","7976","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.8293467","emacs.exe","7976","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8293902","emacs.exe","7976","QueryBasicInformationFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","CreationTime: 22/01/2023 14:15:21, LastAccessTime: 22/01/2023 14:15:21, LastWriteTime: 22/01/2023 14:15:21, ChangeTime: 22/01/2023 14:15:21, FileAttributes: A" "14:15:24.8294253","emacs.exe","7976","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.8297901","emacs.exe","7976","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8298328","emacs.exe","7976","QueryBasicInformationFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","CreationTime: 22/01/2023 14:15:21, LastAccessTime: 22/01/2023 14:15:21, LastWriteTime: 22/01/2023 14:15:21, ChangeTime: 22/01/2023 14:15:21, FileAttributes: A" "14:15:24.8298674","emacs.exe","7976","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.8300493","emacs.exe","7976","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Write Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8301106","emacs.exe","7976","SetBasicInformationFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","CreationTime: 01/01/1601 00:00:00, LastAccessTime: 01/01/1601 00:00:00, LastWriteTime: 01/01/1601 00:00:00, ChangeTime: 01/01/1601 00:00:00, FileAttributes: AN" "14:15:24.8301488","emacs.exe","7976","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.8303279","emacs.exe","7976","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8303853","emacs.exe","7976","QueryAttributeTagFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Attributes: A, ReparseTag: 0x0" "14:15:24.8304243","emacs.exe","7976","SetDispositionInformationEx","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Flags: FILE_DISPOSITION_DELETE, FILE_DISPOSITION_POSIX_SEMANTICS, FILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK" "14:15:24.8304640","emacs.exe","7976","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.8309423","emacs.exe","7976","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","NAME NOT FOUND","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a" "14:15:24.8312547","emacs.exe","7976","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","NAME NOT FOUND","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a" "14:15:24.8316060","emacs.exe","7976","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","Desired Access: Read Attributes, Delete, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: None, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8316786","emacs.exe","7976","QueryBasicInformationFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","CreationTime: 22/01/2023 14:15:24, LastAccessTime: 22/01/2023 14:15:24, LastWriteTime: 22/01/2023 14:15:24, ChangeTime: 22/01/2023 14:15:24, FileAttributes: A" "14:15:24.8321739","emacs.exe","7976","SetRenameInformationFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7vca7Uc.eln.tmp","SUCCESS","ReplaceIfExists: False, FileName: C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln" "14:15:24.8327212","emacs.exe","7976","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.8724898","emacs.exe","6452","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8725598","emacs.exe","6452","QueryBasicInformationFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","CreationTime: 22/01/2023 14:15:21, LastAccessTime: 22/01/2023 14:15:24, LastWriteTime: 22/01/2023 14:15:24, ChangeTime: 22/01/2023 14:15:24, FileAttributes: A" "14:15:24.8726035","emacs.exe","6452","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.8729415","emacs.exe","6452","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8729962","emacs.exe","6452","QueryBasicInformationFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","CreationTime: 22/01/2023 14:15:21, LastAccessTime: 22/01/2023 14:15:24, LastWriteTime: 22/01/2023 14:15:24, ChangeTime: 22/01/2023 14:15:24, FileAttributes: A" "14:15:24.8730581","emacs.exe","6452","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.8734177","emacs.exe","6452","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8734703","emacs.exe","6452","QueryBasicInformationFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","CreationTime: 22/01/2023 14:15:21, LastAccessTime: 22/01/2023 14:15:24, LastWriteTime: 22/01/2023 14:15:24, ChangeTime: 22/01/2023 14:15:24, FileAttributes: A" "14:15:24.8735148","emacs.exe","6452","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.8737115","emacs.exe","6452","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Read Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8737860","emacs.exe","6452","CreateFileMapping","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","FILE LOCKED WITH ONLY READERS","SyncType: SyncTypeCreateSection, PageProtection: PAGE_EXECUTE_READWRITE|PAGE_NOCACHE" "14:15:24.8738324","emacs.exe","6452","QueryStandardInformationFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","AllocationSize: 94,208, EndOfFile: 92,251, NumberOfLinks: 1, DeletePending: False, Directory: False" "14:15:24.8740966","emacs.exe","6452","CreateFileMapping","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","SyncType: SyncTypeOther" "14:15:24.8742065","emacs.exe","6452","Load Image","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Image Base: 0x7ffaacb50000, Image Size: 0x21000" "14:15:24.8743184","emacs.exe","6452","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.8747892","emacs.exe","6452","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8748127","emacs.exe","6452","QueryBasicInformationFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","CreationTime: 22/01/2023 14:15:21, LastAccessTime: 22/01/2023 14:15:24, LastWriteTime: 22/01/2023 14:15:24, ChangeTime: 22/01/2023 14:15:24, FileAttributes: A" "14:15:24.8748286","emacs.exe","6452","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.8751046","emacs.exe","6452","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8751292","emacs.exe","6452","QueryBasicInformationFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","CreationTime: 22/01/2023 14:15:21, LastAccessTime: 22/01/2023 14:15:24, LastWriteTime: 22/01/2023 14:15:24, ChangeTime: 22/01/2023 14:15:24, FileAttributes: A" "14:15:24.8751445","emacs.exe","6452","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.8754961","emacs.exe","6452","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8755282","emacs.exe","6452","QueryBasicInformationFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","CreationTime: 22/01/2023 14:15:21, LastAccessTime: 22/01/2023 14:15:24, LastWriteTime: 22/01/2023 14:15:24, ChangeTime: 22/01/2023 14:15:24, FileAttributes: A" "14:15:24.8755437","emacs.exe","6452","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.8757797","emacs.exe","6452","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8758013","emacs.exe","6452","QueryBasicInformationFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","CreationTime: 22/01/2023 14:15:21, LastAccessTime: 22/01/2023 14:15:24, LastWriteTime: 22/01/2023 14:15:24, ChangeTime: 22/01/2023 14:15:24, FileAttributes: A" "14:15:24.8758154","emacs.exe","6452","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.8764948","emacs.exe","6452","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8765354","emacs.exe","6452","QueryBasicInformationFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","CreationTime: 22/01/2023 14:15:21, LastAccessTime: 22/01/2023 14:15:24, LastWriteTime: 22/01/2023 14:15:24, ChangeTime: 22/01/2023 14:15:24, FileAttributes: A" "14:15:24.8765646","emacs.exe","6452","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.8768883","emacs.exe","6452","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Write Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8769622","emacs.exe","6452","SetBasicInformationFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","CreationTime: 01/01/1601 00:00:00, LastAccessTime: 01/01/1601 00:00:00, LastWriteTime: 01/01/1601 00:00:00, ChangeTime: 01/01/1601 00:00:00, FileAttributes: AN" "14:15:24.8770113","emacs.exe","6452","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.8772176","emacs.exe","6452","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8772934","emacs.exe","6452","QueryAttributeTagFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Attributes: A, ReparseTag: 0x0" "14:15:24.8773402","emacs.exe","6452","SetDispositionInformationEx","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","CANNOT DELETE","Flags: FILE_DISPOSITION_DELETE, FILE_DISPOSITION_POSIX_SEMANTICS, FILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK" "14:15:24.8774207","emacs.exe","6452","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" "14:15:24.8777610","emacs.exe","6452","CreateFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" "14:15:24.8778135","emacs.exe","6452","QueryBasicInformationFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","CreationTime: 22/01/2023 14:15:21, LastAccessTime: 22/01/2023 14:15:24, LastWriteTime: 22/01/2023 14:15:24, ChangeTime: 22/01/2023 14:15:24, FileAttributes: A" "14:15:24.8778576","emacs.exe","6452","CloseFile","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","SUCCESS","" --=-=-= Content-Type: text/plain >> 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. As noted above, I think it is the code in native-elisp-load interacting woth the way that the files are renamed (and if those operations have specified posix semantics or not). >> 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). Any idea when those changes were committed, and which changesets ? IT doesn't apper obvios from the commit history. > Andrea, any suggestions or comments? > > Thanks. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 23 09:58:28 2023 Received: (at 60996) by debbugs.gnu.org; 23 Jan 2023 14:58:28 +0000 Received: from localhost ([127.0.0.1]:55049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJyHE-0003Sp-B9 for submit@debbugs.gnu.org; Mon, 23 Jan 2023 09:58:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJyHC-0003Sc-V2 for 60996@debbugs.gnu.org; Mon, 23 Jan 2023 09:58:27 -0500 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 1pJyH7-00049M-L5; Mon, 23 Jan 2023 09:58:21 -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=D8eQaFXvXCQWntjHNLY8YKDv97OKeXrSU7JwOfvfngM=; b=HFEV2N06Gdwc 8XA2gEnKeeSmbkhg8UOtvyQTczcfi9AcpE4nTtbZP+n3b8GW6+cjH0hSELjpXrHwbfTz+OnGLlHKY D9LnCOhG7vf/kCB08qp9Z/9T6779cZw+oFU4T+Sa6c650RHn/wNvwJVu6jnG/Ha8mlULS1arBQVMB simzTD/qUNbf5chys/9ZyNM7sl0yVqbpqgimIhksrtv7tS14U6OWaUkFU0aGhMsExRwBjg7Tycfr6 tIqd4wUhPouowa7+55hIg+ObwG4MGmOZTLgdqYSnCLQIY9hS2izlX/qW+qQpWVJcM/LzE+cBE2u8/ xU+To2R+FlcdW3tEL4AG8Q==; 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 1pJyH6-0000ln-Me; Mon, 23 Jan 2023 09:58:21 -0500 Date: Mon, 23 Jan 2023 16:58:28 +0200 Message-Id: <83r0vli9gr.fsf@gnu.org> From: Eli Zaretskii To: Andy Moreton In-Reply-To: <86wn5evv70.fsf@gmail.com> (message from Andy Moreton on Mon, 23 Jan 2023 02:30:43 +0000) Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86wn5evv70.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60996 Cc: 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Andy Moreton > Date: Mon, 23 Jan 2023 02:30:43 +0000 > > >From more expermenting with a debug build in gdb, it seem to be related > to this code in native-elisp-load: > > /* If in this session there was ever a file loaded with this > name, rename it before loading, to make sure we always get a > new handle! */ > Lisp_Object tmp_filename = > Fmake_temp_file_internal (filename, Qnil, build_string (".eln.tmp"), > Qnil); > if (NILP (Ffile_writable_p (tmp_filename))) > comp_u->handle = dynlib_open_for_eln (SSDATA (encoded_filename)); > else > { > Frename_file (filename, tmp_filename, Qt); > comp_u->handle = dynlib_open_for_eln (SSDATA (ENCODE_FILE (tmp_filename))); > Frename_file (tmp_filename, filename, Qnil); > } > > The renaming results in the ".eln.tmp" suffixed name having an open > handle. That handle is still open when other code tries to delete > the renamed ".eln" file, which fails. The question is: why is that .eln.tmp file still open when we are trying to delete it? I hoped we'd be able to establish that, so that we could decide what to do about it. But I don't yet see the information which would explain why the file is still open. Do these *.eln.tmp file remain in %TEMP% after Emacs startup? If they remain there, then what happens if you exit Emacs and restart it? do these files remain there or are they deleted? IOW, if we just ignore these errors (e.g., by ignore-error), would the problem be fixed, or will there be left-overs? > The attached .csv file shows filesystem activity captured by Process > Monitor for the relevant "...\comp-lambda-*" temp files during emacs > startup. (It may be easier to read if imported into a spreadsheet). Maybe I don't understand how to read this, but I cannot find any traces for the failed deletion of a .eln.tmp file. The only failure to delete is this: > "14:15:24.8773402","emacs.exe","6452","SetDispositionInformationEx","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","CANNOT DELETE","Flags: FILE_DISPOSITION_DELETE, FILE_DISPOSITION_POSIX_SEMANTICS, FILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK" and it names a .eln file, not .eln.tmp. I also don't see any RenameFile calls, but maybe they appear under different names in this captured activity? > > 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. > > As noted above, I think it is the code in native-elisp-load interacting > woth the way that the files are renamed (and if those operations have > specified posix semantics or not). I don't think I follow. The snippet from native-elisp-load you show doesn't call Fdelete_file, it only renames files, and renaming should work on MS-Windows like it works on Posix systems in this case. The problem, as the error message evidences, is in Fdelete_file. Frename_file indeed can call Fdelete_file, but rename-file is not in the backtraces you posted, so I don't think this code is involved directly. You seem to say this code somehow "interferes" with deleting files, but how does it interfere with that? Also, AFAIK this part of comp.c didn't change since Emacs 28, so whatever caused the problem is not this code directly, but something else. IOW, I'd still like to understand in more detail what changed lately that causes these errors in your case. > >> 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). > > Any idea when those changes were committed, and which changesets ? IT > doesn't apper obvios from the commit history. See commit 1a8015b837. Maybe also commit 5fec9182db. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 23 12:04:34 2023 Received: (at 60996) by debbugs.gnu.org; 23 Jan 2023 17:04:34 +0000 Received: from localhost ([127.0.0.1]:55218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pK0FF-0006pW-WC for submit@debbugs.gnu.org; Mon, 23 Jan 2023 12:04:34 -0500 Received: from mx.sdf.org ([205.166.94.24]:52985) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pK0FD-0006pL-Mm for 60996@debbugs.gnu.org; Mon, 23 Jan 2023 12:04:32 -0500 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 30NH4U0v028151 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Mon, 23 Jan 2023 17:04:30 GMT From: Andrea Corallo To: Andy Moreton Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline In-Reply-To: <86tu0iwx49.fsf@gmail.com> (Andy Moreton's message of "Sun, 22 Jan 2023 12:51:34 +0000") References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> Date: Mon, 23 Jan 2023 17:04:30 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Andy Moreton writes: > On Sun 22 Jan 2023, Eli Zaretskii wrote: > >>> Date: Sat, 21 Jan 2023 22:12:10 +0000 >>> From: Andy Moreton >>> >>> Recently emacs 29 (and master) has started showing an e [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [205.166.94.33 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 60996 Cc: 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Andy Moreton writes: > On Sun 22 Jan 2023, Eli Zaretskii wrote: > >>> Date: Sat, 21 Jan 2023 22:12:10 +0000 >>> From: Andy Moreton >>> >>> Recently emacs 29 (and master) has started showing an e [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [205.166.94.33 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Andy Moreton writes: > On Sun 22 Jan 2023, Eli Zaretskii wrote: > >>> 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) > > It may take considerable time and effort to reduce my init file down to a > simple reproducer... > >> 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... > > The backtrace always seems to contain: > > 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 ...) > > So it looks very much like compiling trampolines is involved. Hello all, 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. Andrea From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 23 12:11:47 2023 Received: (at 60996) by debbugs.gnu.org; 23 Jan 2023 17:11:47 +0000 Received: from localhost ([127.0.0.1]:55235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pK0MF-00070Z-AJ for submit@debbugs.gnu.org; Mon, 23 Jan 2023 12:11:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pK0MD-00070N-LY for 60996@debbugs.gnu.org; Mon, 23 Jan 2023 12:11:46 -0500 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 1pK0M7-0003Sx-Ea; Mon, 23 Jan 2023 12:11:40 -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=f0QTx7OyfOLvqDD3ay/DfCu//p+Uttyku3GcL3nrlpA=; b=h4OhNjMZrU+5 JN1zW3xCEBwCfxK3Q6Y7GuobE5Pr/WJIyAZJD5L++4IAs0jpcpZKr5k5BXu5CgVT4jqqdTBLsgjjA 7OYmirTMBdmMOzx2Cl7Fus81EhSMwJ7ZRT0IT+H9rqQyUHzVEpUSJEOtYdhTayItv56XEe/bU4qTM Rw43RpDLgVikik+rb1KQxJyaXp8WN3lJZhDPxVfm4ZFHrBlz2UCBTrTplx7r+1RyKAtXBOglg5gXi zJKiwj1Pv8Uyw0T+yF9n8W3VvCtBHHxCiqOhmRLW8coGrA6TC7G3xjzV9qQMlQs+CcGSoq8xY4jJ9 c7qnzgO1SDVLV9L22PMbzw==; 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 1pK0M6-0004Sk-Tq; Mon, 23 Jan 2023 12:11:39 -0500 Date: Mon, 23 Jan 2023 19:11:48 +0200 Message-Id: <83a629i3aj.fsf@gnu.org> From: Eli Zaretskii To: Andrea Corallo In-Reply-To: (message from Andrea Corallo on Mon, 23 Jan 2023 17:04:30 +0000) Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60996 Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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? From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 23 20:18:15 2023 Received: (at submit) by debbugs.gnu.org; 24 Jan 2023 01:18:15 +0000 Received: from localhost ([127.0.0.1]:55621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pK7x1-00085L-9x for submit@debbugs.gnu.org; Mon, 23 Jan 2023 20:18:15 -0500 Received: from lists.gnu.org ([209.51.188.17]:39628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pK7wz-00085D-Qr for submit@debbugs.gnu.org; Mon, 23 Jan 2023 20:18:14 -0500 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 1pK7wz-0007bz-Kh for bug-gnu-emacs@gnu.org; Mon, 23 Jan 2023 20:18:13 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pK7wy-0004m9-0X for bug-gnu-emacs@gnu.org; Mon, 23 Jan 2023 20:18:13 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pK7wt-0000Vv-Pz for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2023 02:18:07 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline Date: Tue, 24 Jan 2023 01:18:01 +0000 Message-ID: <86edrku3w6.fsf@gmail.com> References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86wn5evv70.fsf@gmail.com> <83r0vli9gr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:JSFNhySjQisoK20BGsU7S+06VSc= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.4 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.149, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) On Mon 23 Jan 2023, Eli Zaretskii wrote: >> From: Andy Moreton >> Date: Mon, 23 Jan 2023 02:30:43 +0000 >> >> >From more expermenting with a debug build in gdb, it seem to be related >> to this code in native-elisp-load: >> >> /* If in this session there was ever a file loaded with this >> name, rename it before loading, to make sure we always get a >> new handle! */ >> Lisp_Object tmp_filename = >> Fmake_temp_file_internal (filename, Qnil, build_string (".eln.tmp"), >> Qnil); >> if (NILP (Ffile_writable_p (tmp_filename))) >> comp_u->handle = dynlib_open_for_eln (SSDATA (encoded_filename)); >> else >> { >> Frename_file (filename, tmp_filename, Qt); >> comp_u->handle = dynlib_open_for_eln (SSDATA (ENCODE_FILE (tmp_filename))); >> Frename_file (tmp_filename, filename, Qnil); >> } >> >> The renaming results in the ".eln.tmp" suffixed name having an open >> handle. That handle is still open when other code tries to delete >> the renamed ".eln" file, which fails. > > The question is: why is that .eln.tmp file still open when we are > trying to delete it? I hoped we'd be able to establish that, so that > we could decide what to do about it. But I don't yet see the > information which would explain why the file is still open. The file handle is returned from dynlib_open_for_eln (which came from a LoadLibrary call in dylib_open). More below. > Do these *.eln.tmp file remain in %TEMP% after Emacs startup? If they > remain there, then what happens if you exit Emacs and restart it? do > these files remain there or are they deleted? IOW, if we just ignore > these errors (e.g., by ignore-error), would the problem be fixed, or > will there be left-overs? The ".eln.tmp" suffixed files are only renamed temporarily, and the files only fleetingly have that name. The ".eln" suffixed file names persist after the failed delete, so will accumulate unless removed manually. >> The attached .csv file shows filesystem activity captured by Process >> Monitor for the relevant "...\comp-lambda-*" temp files during emacs >> startup. (It may be easier to read if imported into a spreadsheet). > > Maybe I don't understand how to read this, but I cannot find any > traces for the failed deletion of a .eln.tmp file. The only failure > to delete is this: > >> "14:15:24.8773402","emacs.exe","6452","SetDispositionInformationEx","C:\Users\ajm\AppData\Local\Temp\comp-lambda-SGvFx7.eln","CANNOT >> DELETE","Flags: FILE_DISPOSITION_DELETE, FILE_DISPOSITION_POSIX_SEMANTICS, >> FILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK" That line is the failed delete-file (for "comp-lambda-SGvFx7.eln") at the end of comp--native-compile. >From the Microsoft kernel docs at: https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddk/ns-ntddk-_file_disposition_information_ex "A return value of STATUS_CANNOT_DELETE indicates that either the file is read-only, or there is an existing mapped view to the file." The earlier lines in the trace with CreateFileMapping and Load Image for "comp-lambda-SGvFx7.eln" to suggest that existing mapping created from dynlib_open (by LoadLibrary) may be the problem. >> Any idea when those changes were committed, and which changesets ? IT >> doesn't apper obvios from the commit history. > > See commit 1a8015b837. Maybe also commit 5fec9182db. Thanks for the additional details. AndyM From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 24 07:55:58 2023 Received: (at 60996) by debbugs.gnu.org; 24 Jan 2023 12:55:58 +0000 Received: from localhost ([127.0.0.1]:56095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKIqE-0003tF-6J for submit@debbugs.gnu.org; Tue, 24 Jan 2023 07:55:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKIqC-0003t1-35 for 60996@debbugs.gnu.org; Tue, 24 Jan 2023 07:55:57 -0500 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 1pKIq6-0006u7-Fs; Tue, 24 Jan 2023 07:55:50 -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=Ur4LjsPvmFdhJgnEKuch/vaX8V+g8K53zNb03gfv7YU=; b=ieqHZBDGvUIs MD8oaUNtg41KtuuPZMz1gtG8C1hEqzO/KwsLN7SG7TjLMDsyfAoRDdOznMdf/Dz2BM2LbHL83GTk6 g6Vdwn/R8zkNfcokHtbQyus3/AnpuQMYeWQBQ8P7ZwwY1nFDov4H8wY4prblPEqoFtk9BVwkx9mVx 7p2wBkAlb4Rme/wRxdFFYRSvFkJf2uGLRE0EvqWE8c5qvh0j4gtQ3YmWzombaJIJ7YaAhW2TfMico E3+QvgRoBk2S0nrkZNCsrTSfz1hQYVOJZRnB/kQrqfaKFO0xIUZzeYhJv2DWAcu2DgLq5Fml6P4Hz AZ/gDE/wjbCYEkdcjb6eAw==; 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 1pKIq5-0001vl-V3; Tue, 24 Jan 2023 07:55:50 -0500 Date: Tue, 24 Jan 2023 14:56:00 +0200 Message-Id: <83wn5cgkgv.fsf@gnu.org> From: Eli Zaretskii To: Andy Moreton , Andrea Corallo In-Reply-To: <86edrku3w6.fsf@gmail.com> (message from Andy Moreton on Tue, 24 Jan 2023 01:18:01 +0000) Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86wn5evv70.fsf@gmail.com> <83r0vli9gr.fsf@gnu.org> <86edrku3w6.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60996 Cc: 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Andy Moreton > Date: Tue, 24 Jan 2023 01:18:01 +0000 > > >> /* If in this session there was ever a file loaded with this > >> name, rename it before loading, to make sure we always get a > >> new handle! */ > >> Lisp_Object tmp_filename = > >> Fmake_temp_file_internal (filename, Qnil, build_string (".eln.tmp"), > >> Qnil); > >> if (NILP (Ffile_writable_p (tmp_filename))) > >> comp_u->handle = dynlib_open_for_eln (SSDATA (encoded_filename)); > >> else > >> { > >> Frename_file (filename, tmp_filename, Qt); > >> comp_u->handle = dynlib_open_for_eln (SSDATA (ENCODE_FILE (tmp_filename))); > >> Frename_file (tmp_filename, filename, Qnil); > >> } > >> > >> The renaming results in the ".eln.tmp" suffixed name having an open > >> handle. That handle is still open when other code tries to delete > >> the renamed ".eln" file, which fails. > > > > The question is: why is that .eln.tmp file still open when we are > > trying to delete it? I hoped we'd be able to establish that, so that > > we could decide what to do about it. But I don't yet see the > > information which would explain why the file is still open. > > The file handle is returned from dynlib_open_for_eln (which came from a > LoadLibrary call in dylib_open). More below. > > > Do these *.eln.tmp file remain in %TEMP% after Emacs startup? If they > > remain there, then what happens if you exit Emacs and restart it? do > > these files remain there or are they deleted? IOW, if we just ignore > > these errors (e.g., by ignore-error), would the problem be fixed, or > > will there be left-overs? > > The ".eln.tmp" suffixed files are only renamed temporarily, and the files > only fleetingly have that name. The ".eln" suffixed file names persist > after the failed delete, so will accumulate unless removed manually. So we are trying to delete a .eln file that is still being loaded into this same Emacs session? That sounds like a bug to me. Andrea, could you see if this situation can happen? IIUC, it should also happen on Unix when we compile a trampoline on the flight (perhaps when a previous outdated version of the trampoline exists?), except that on Unix the deletion silently succeeds and the file is removed when the session ends, which doesn't happen on Windows. On Windows, we need to unload the .eln file first, but can we do that with a trampoline? 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 24 12:50:26 2023 Received: (at 60996) by debbugs.gnu.org; 24 Jan 2023 17:50:26 +0000 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 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 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==; 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 Date: Tue, 24 Jan 2023 19:50:27 +0200 Message-Id: <83k01bhlek.fsf@gnu.org> From: Eli Zaretskii To: andrewjmoreton@gmail.com, akrl@sdf.org In-Reply-To: <83wn5cgkgv.fsf@gnu.org> (message from Eli Zaretskii on Tue, 24 Jan 2023 14:56:00 +0200) Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline 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 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60996 Cc: 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 24 14:12:36 2023 Received: (at 60996) by debbugs.gnu.org; 24 Jan 2023 19:12:36 +0000 Received: from localhost ([127.0.0.1]:57669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKOii-0001dL-4S for submit@debbugs.gnu.org; Tue, 24 Jan 2023 14:12:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKOig-0001d3-Ov for 60996@debbugs.gnu.org; Tue, 24 Jan 2023 14:12:35 -0500 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 1pKOia-0003qL-Vl; Tue, 24 Jan 2023 14:12:28 -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=WED5CuSGVzOk5ojICOoiYTTltDSaayqFeGLUvzHGIlQ=; b=Cf9TOKN4wuLa CVsDJGxgmFC/OpwUXBrvvhHRBZ9vT0MnW4jgFMTi44ubkkf/V3M+eMCLnZYVbFZBHgukFzr0zeU2z bm0JtpVZ0Iy7/7y+hB0wvQOnLHtV3hB6P/ntoRxEKqx37lhxeA1n0JqtnOfH74ZnNjSLUrG2IDsWF 5D+m8+ICcxh5jWM7UHtK4AiKjRQGFM7hFUcqx4J7kSbk7XSf3e1+49dBj6iAIXvim6iBc2hZ+I7rH 2NrUvFBhwIZwQCM7961563twyUrf9yMPK1uHJmw9iG54B0ArYNXAXI6amUH2a/5W4auxRb6DxSvMg UmZWjSNO7qwOALvfuNTSyg==; 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 1pKOia-0005Ed-8Q; Tue, 24 Jan 2023 14:12:28 -0500 Date: Tue, 24 Jan 2023 21:12:38 +0200 Message-Id: <83bkmnhhll.fsf@gnu.org> From: Eli Zaretskii To: andrewjmoreton@gmail.com, akrl@sdf.org In-Reply-To: <83k01bhlek.fsf@gnu.org> (message from Eli Zaretskii on Tue, 24 Jan 2023 19:50:27 +0200) Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline 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> <83k01bhlek.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60996 Cc: 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 60996@debbugs.gnu.org > Date: Tue, 24 Jan 2023 19:50:27 +0200 > From: Eli Zaretskii > > 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? With this simple .emacs: (require 'delight nil t) I cannot reproduce these errors from delete-file, although the trampoline for advice-add in delight.el does get natively-compiled. After the compilation finishes, I see no left-over *.eln files in my system temporary directory. So there's definitely more in your case than meets the eye, and just getting Emacs to compile a trampoline is not enough to trigger the problem. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 24 17:32:47 2023 Received: (at submit) by debbugs.gnu.org; 24 Jan 2023 22:32:47 +0000 Received: from localhost ([127.0.0.1]:57798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKRqR-0000qm-HC for submit@debbugs.gnu.org; Tue, 24 Jan 2023 17:32:47 -0500 Received: from lists.gnu.org ([209.51.188.17]:46206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKRqQ-0000qb-6D for submit@debbugs.gnu.org; Tue, 24 Jan 2023 17:32:46 -0500 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 1pKRqQ-0003Uv-0M for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2023 17:32:46 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKRqO-0002rf-KN for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2023 17:32:45 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pKRqM-0000Yq-Ab for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2023 23:32:42 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline Date: Tue, 24 Jan 2023 22:32:35 +0000 Message-ID: <864jsfo96k.fsf@gmail.com> 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> <83k01bhlek.fsf@gnu.org> <83bkmnhhll.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:ahrfahcj2GboUDdQGz7H0jLsW90= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.4 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.149, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) On Tue 24 Jan 2023, Eli Zaretskii wrote: >> Cc: 60996@debbugs.gnu.org >> Date: Tue, 24 Jan 2023 19:50:27 +0200 >> From: Eli Zaretskii >> >> 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? I cannot reproduce the problem any more - trying to examine things in gdb did not produce enlightenment, as the problem seems to be timing sensitive, so adding breakpoints or tracing in my experiments often stopped the problem. >> 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? >From memory I think that involved compiling a trampoline, and comp-spill-lap calling one of the comp-spill-lap methods, which was probably (cl-defmethod comp-spill-lap-function ((form list)) I cannot reproduce this any longer as I have updated various software, so this bug can probably be closed (and reopened later if the problem becomes visible again). AndyM From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 25 06:58:13 2023 Received: (at 60996) by debbugs.gnu.org; 25 Jan 2023 11:58:13 +0000 Received: from localhost ([127.0.0.1]:58462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKePs-0000YO-T8 for submit@debbugs.gnu.org; Wed, 25 Jan 2023 06:58:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKePo-0000Y2-VP for 60996@debbugs.gnu.org; Wed, 25 Jan 2023 06:58:11 -0500 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 1pKePj-0004Bo-LG; Wed, 25 Jan 2023 06:58:03 -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=l0hdhNyrYCzFQsuiAhxZXAl+5/ezWRC+pP9TN7VzFpE=; b=Hi6p49uzYSd7 SIKVpcaq8PP2RSSTOcPvhNdAh3YVkStIxDWMEBHCBVkPEB3NlFvPIxCMepohYnbivLHc55LrgZ8Em 0xALz2EhmEocSviyyz1O7+XVe7WqA4hL6luxJFPAiHiravmUTAnSqQwGSyy59FWUSq+UvzWCX1x/T FN/eZLJpdXsGd0sns798UU3c15qLpsqBpAVxL8iMMSoADfG70JKWjrcnnvRMhIrp+uwGoEIUdigZ0 SfHjXvjbAyPw2wvd2SJf586vSL45VRC+d9f3SWIAyBUCrkRz1lR3hH0m2GTxkNxF2whTWurHl+zSj oIKVF8IhdOa4OagYxILvvg==; 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 1pKePi-0007Cm-VJ; Wed, 25 Jan 2023 06:58:03 -0500 Date: Wed, 25 Jan 2023 13:58:16 +0200 Message-Id: <838rhqhllz.fsf@gnu.org> From: Eli Zaretskii To: Andy Moreton In-Reply-To: <864jsfo96k.fsf@gmail.com> (message from Andy Moreton on Tue, 24 Jan 2023 22:32:35 +0000) Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline 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> <83k01bhlek.fsf@gnu.org> <83bkmnhhll.fsf@gnu.org> <864jsfo96k.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60996 Cc: 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Andy Moreton > Date: Tue, 24 Jan 2023 22:32:35 +0000 > > On Tue 24 Jan 2023, Eli Zaretskii wrote: > > >> 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? > > >From memory I think that involved compiling a trampoline, and > comp-spill-lap calling one of the comp-spill-lap methods, which was > probably > (cl-defmethod comp-spill-lap-function ((form list)) > > I cannot reproduce this any longer as I have updated various software, > so this bug can probably be closed (and reopened later if the problem > becomes visible again). Before we close this, I suggest that you try reproducing again, after removing the *.eln files from your eln-cache. Basically, as more and more *.eln files are produced and deposited there, the lower the probability of seeing any problems with native compilation, since Emacs stops compiling stuff because it already has what it needs. (But if you already tried that and still failed, then OK, let's close this issue.) Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 25 18:49:17 2023 Received: (at submit) by debbugs.gnu.org; 25 Jan 2023 23:49:18 +0000 Received: from localhost ([127.0.0.1]:60215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKpW1-0001YH-Ju for submit@debbugs.gnu.org; Wed, 25 Jan 2023 18:49:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:39378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKpVz-0001Y9-9T for submit@debbugs.gnu.org; Wed, 25 Jan 2023 18:49:16 -0500 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 1pKpVy-0006Do-Ql for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2023 18:49:14 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKpVx-0008IX-EU for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2023 18:49:14 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pKpVt-0004Fa-Py for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 00:49:09 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline Date: Wed, 25 Jan 2023 23:49:04 +0000 Message-ID: <86o7qmyy33.fsf@gmail.com> 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> <83k01bhlek.fsf@gnu.org> <83bkmnhhll.fsf@gnu.org> <864jsfo96k.fsf@gmail.com> <838rhqhllz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:rwTgekcUtJzITa/KuqOVvzlGtGQ= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 3 X-Spam_score: 0.3 X-Spam_bar: / X-Spam_report: (0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.091, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) On Wed 25 Jan 2023, Eli Zaretskii wrote: >> From: Andy Moreton >> Date: Tue, 24 Jan 2023 22:32:35 +0000 >> >> On Tue 24 Jan 2023, Eli Zaretskii wrote: >> >> >> 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? >> >> >From memory I think that involved compiling a trampoline, and >> comp-spill-lap calling one of the comp-spill-lap methods, which was >> probably >> (cl-defmethod comp-spill-lap-function ((form list)) >> >> I cannot reproduce this any longer as I have updated various software, >> so this bug can probably be closed (and reopened later if the problem >> becomes visible again). > > Before we close this, I suggest that you try reproducing again, after > removing the *.eln files from your eln-cache. Basically, as more and > more *.eln files are produced and deposited there, the lower the > probability of seeing any problems with native compilation, since > Emacs stops compiling stuff because it already has what it needs. I tried various combinations of cleaning the .eln cache, bootstrap from a clean tree etc, and leaving or removing trampoline .eln files from %TEMP% and did not get a reproducibe effect. > > (But if you already tried that and still failed, then OK, let's close > this issue.) I also tried running with anti-virus disabled (in case that affected filesystem activity or timing) without any change. Please close this, and we can start again if the problem reappears. AndyM From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 26 01:51:41 2023 Received: (at 60996-done) by debbugs.gnu.org; 26 Jan 2023 06:51:41 +0000 Received: from localhost ([127.0.0.1]:60460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKw6n-0004Ed-3b for submit@debbugs.gnu.org; Thu, 26 Jan 2023 01:51:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKw6l-0004EM-Pe for 60996-done@debbugs.gnu.org; Thu, 26 Jan 2023 01:51:40 -0500 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 1pKw6g-0003e3-Gb; Thu, 26 Jan 2023 01:51:34 -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=CNdfGVc04SK6WyTx9HNOxt0ckCBCzdsLqNdcoaBsRec=; b=evizMWcmcO5E jyNjbQ6abpBt2bFt7qf7z3DxJkahH/jO89C1jcz3wrlUtR5Fn/SUYHoUmx9KoeLhSgsyaj4o6lVsr VrR7rEP/FUXhViLj/crk1RQZitCADgjBlR0Y23SaGb2aUZHtUn69QJ2qjbZjOyFEu3NBTujETg0d4 WkaGfO77f4yLYFgIgyV4CVKN6qCz15XDFYW+vyj1XB63qcllxCPHwlI6+rLi136aAHnxg8r+EG+E6 GShFt5JRD33YTOGH08Dku+dN1dRZ2qYXO6ERXsRoa8DV2XDNy2wbuH4m3uWr1llD1IUinOMym8dqy E+yyaEHCnYwCah+rnZ1SZg==; 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 1pKw6f-0004vi-IX; Thu, 26 Jan 2023 01:51:33 -0500 Date: Thu, 26 Jan 2023 08:51:49 +0200 Message-Id: <837cx9g54q.fsf@gnu.org> From: Eli Zaretskii To: Andy Moreton In-Reply-To: <86o7qmyy33.fsf@gmail.com> (message from Andy Moreton on Wed, 25 Jan 2023 23:49:04 +0000) Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline 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> <83k01bhlek.fsf@gnu.org> <83bkmnhhll.fsf@gnu.org> <864jsfo96k.fsf@gmail.com> <838rhqhllz.fsf@gnu.org> <86o7qmyy33.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60996-done Cc: 60996-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Andy Moreton > Date: Wed, 25 Jan 2023 23:49:04 +0000 > > On Wed 25 Jan 2023, Eli Zaretskii wrote: > > > Before we close this, I suggest that you try reproducing again, after > > removing the *.eln files from your eln-cache. Basically, as more and > > more *.eln files are produced and deposited there, the lower the > > probability of seeing any problems with native compilation, since > > Emacs stops compiling stuff because it already has what it needs. > > I tried various combinations of cleaning the .eln cache, bootstrap from > a clean tree etc, and leaving or removing trampoline .eln files from > %TEMP% and did not get a reproducibe effect. > > > > (But if you already tried that and still failed, then OK, let's close > > this issue.) > > I also tried running with anti-virus disabled (in case that affected > filesystem activity or timing) without any change. > > Please close this, and we can start again if the problem reappears. OK, done. Thanks for your efforts in trying to decipher this. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 26 11:51:03 2023 Received: (at 60996) by debbugs.gnu.org; 26 Jan 2023 16:51:03 +0000 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 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 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 From: Andrea Corallo To: Eli Zaretskii Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline In-Reply-To: <83a629i3aj.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 23 Jan 2023 19:11:48 +0200") References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> Date: Thu, 26 Jan 2023 16:50:59 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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 th [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [205.166.94.33 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 60996 Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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 th [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [205.166.94.33 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 26 11:57:47 2023 Received: (at 60996) by debbugs.gnu.org; 26 Jan 2023 16:57:47 +0000 Received: from localhost ([127.0.0.1]:36049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL5ZK-0005Hl-Qe for submit@debbugs.gnu.org; Thu, 26 Jan 2023 11:57:47 -0500 Received: from mx.sdf.org ([205.166.94.24]:62817) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL5ZJ-0005Hc-6b for 60996@debbugs.gnu.org; Thu, 26 Jan 2023 11:57:45 -0500 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 30QGviGk025480 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Thu, 26 Jan 2023 16:57:44 GMT From: Andrea Corallo To: Eli Zaretskii Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline In-Reply-To: <83k01bhlek.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Jan 2023 19:50:27 +0200") 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> <83k01bhlek.fsf@gnu.org> Date: Thu, 26 Jan 2023 16:57:44 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> 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 deleti [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [205.166.94.33 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 60996 Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> 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 deleti [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [205.166.94.33 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Eli Zaretskii writes: >> Cc: 60996@debbugs.gnu.org >> Date: Tue, 24 Jan 2023 14:56:00 +0200 >> From: Eli Zaretskii >>=20 >> 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"=20 >> "Permission denied" "c:/Users/ajm/AppData/Local/Temp/comp-lambda-MTAMbr.= ..") >> delete-file("c:/Users/ajm/AppData/Local/Temp/comp-lambda-MTAMbr...") >> =C2=A0 #f(compiled-function () #)() >> =C2=A0 comp--native-compile((lambda (arg0 &optional arg1 arg2 arg3) (le= t ((f=20 >> #'format-mode-line)) (funcall f arg0 arg1 arg2 arg3))) nil nil) >> =C2=A0 comp-trampoline-compile(format-mode-line) >> =C2=A0 comp-subr-trampoline-install(format-mode-line) >> =C2=A0 advice--add-function(:around (#f(compiled-function () #> 0x3c5d8019df7e91>) . #f(compiled-function (gv--val) #> 0x8fdecbbba7cb3c2>)) delight--format-mode-line nil) >> =C2=A0 advice-add(format-mode-line :around delight--format-mode-line) >> =C2=A0 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? Hi Eli, comp-subr-trampoline-install just search for an existing trampoline with comp-trampoline-search, if this is not found is using comp-trampoline-compile to produce that. Once the trampoline is found or created it gets installed. In this case as the trampoline is not found and so comp-trampoline-compile is invoking comp--native-compile to produce one. Please see my other reply into this thread for more, as there might be more to investigate here. BR Andrea From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 26 13:39:05 2023 Received: (at 60996) by debbugs.gnu.org; 26 Jan 2023 18:39:05 +0000 Received: from localhost ([127.0.0.1]:36171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL79M-00081G-TX for submit@debbugs.gnu.org; Thu, 26 Jan 2023 13:39:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL79K-00080i-OU for 60996@debbugs.gnu.org; Thu, 26 Jan 2023 13:39:03 -0500 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 1pL79F-0006bR-4B; Thu, 26 Jan 2023 13:38:57 -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=9L5wmvurknzNzXZjTxBdJuxQ2s0ebU87xZln2BJFGZA=; b=QdwjMisxn1fW rnL5M1PUIwkZG8SAT6UjrZmO5FJAPk905xLF45zz6c52bMCBy5F5hvjekPOUt/LbS/y5bLmTIhqho 1OPSpj/iv4E2ZyjldNqqqIrZqw8Aq/gif+BMNoSBvhmiRjYltqFBj5w23UYn6LmsxY/uuRkyIpCpR LygQFAsHm4AK7MSDFgAMdU3e1ppkC/axBRY3L9WcB2rqfGkhtMNAXYqcALhOnVrvC7+2RD4RYFcc7 Txga7clQ2b0BN76E37ETYaFdLhAJRg9PuOlU5oCQ6gh1Bxh1uvxrGulTgUX732Iic+Ik19wXvknYN S2OfyHBNypGi1d5mFfe9nw==; 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 1pL79E-0005D5-GB; Thu, 26 Jan 2023 13:38:56 -0500 Date: Thu, 26 Jan 2023 20:38:45 +0200 Message-Id: <83r0vhcf9m.fsf@gnu.org> From: Eli Zaretskii To: Andrea Corallo In-Reply-To: (message from Andrea Corallo on Thu, 26 Jan 2023 16:50:59 +0000) Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60996 Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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. > 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 26 14:46:30 2023 Received: (at 60996) by debbugs.gnu.org; 26 Jan 2023 19:46:30 +0000 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 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 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 From: Andrea Corallo To: Eli Zaretskii Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline In-Reply-To: <83r0vhcf9m.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 26 Jan 2023 20:38:45 +0200") References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> <83r0vhcf9m.fsf@gnu.org> Date: Thu, 26 Jan 2023 19:46:25 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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-c [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [205.166.94.33 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 60996 Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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-c [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [205.166.94.33 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 26 15:04:00 2023 Received: (at 60996) by debbugs.gnu.org; 26 Jan 2023 20:04:00 +0000 Received: from localhost ([127.0.0.1]:36274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL8TY-0001zS-52 for submit@debbugs.gnu.org; Thu, 26 Jan 2023 15:04:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL8TW-0001zE-1P for 60996@debbugs.gnu.org; Thu, 26 Jan 2023 15:03:58 -0500 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 1pL8TP-0007Cz-Iy; Thu, 26 Jan 2023 15:03:52 -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=iAFc2k0uPy/UdDaYxgi0Glk9P1XwliOVGI/EGRGSflo=; b=fBRoGvt4nou2 tLeWhbdeLRBGhdMQmSvf7hzhYRS9Jd4ufChqtY0RipHoSePnlcpgm2qDqpfP+K6v9QY2g7fnZ2uX6 zCOzn9kkft1noXovH8t1cPI+656mK99tokqdQRAAQ9CGdbLSIof3NSccxxqvCKWp5rfzN5wRRNxZz W9HNbM5M/kmb3pyprnszKR7M1mNFJXg3qoD+g6HH8YrNYCgdhAvgxcbIt1gzaQVKCIDXyci8ZNSp6 SAuPcmjF4gWW4Sp52OGTrm0FllfnnylnvDz8sZlSgPdivwOFxC2iMtQkOtrE1yJS7ItoaQBgnbDBC 2rH9J1AnrV205kQZnR0Lww==; 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 1pL8TO-0005kH-Ck; Thu, 26 Jan 2023 15:03:51 -0500 Date: Thu, 26 Jan 2023 22:03:39 +0200 Message-Id: <83o7qlcbc4.fsf@gnu.org> From: Eli Zaretskii To: Andrea Corallo In-Reply-To: (message from Andrea Corallo on Thu, 26 Jan 2023 19:46:25 +0000) Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> <83r0vhcf9m.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60996 Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Andrea Corallo > Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org > Date: Thu, 26 Jan 2023 19:46:25 +0000 > > >> 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? This shouldn't happen, since the *.eln files are generated with make-temp-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. I'll have to refresh my memory about the reasons and the actual changeset. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 26 15:25:38 2023 Received: (at 60996) by debbugs.gnu.org; 26 Jan 2023 20:25:38 +0000 Received: from localhost ([127.0.0.1]:36289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL8oT-0002UX-Vl for submit@debbugs.gnu.org; Thu, 26 Jan 2023 15:25:38 -0500 Received: from mx.sdf.org ([205.166.94.24]:62443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL8oR-0002UO-CB for 60996@debbugs.gnu.org; Thu, 26 Jan 2023 15:25:36 -0500 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 30QKPXU7016509 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Thu, 26 Jan 2023 20:25:34 GMT From: Andrea Corallo To: Eli Zaretskii Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline In-Reply-To: <83o7qlcbc4.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 26 Jan 2023 22:03:39 +0200") References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> <83r0vhcf9m.fsf@gnu.org> <83o7qlcbc4.fsf@gnu.org> Date: Thu, 26 Jan 2023 20:25:33 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> From: Andrea Corallo >> Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org >> Date: Thu, 26 Jan 2023 19:46:25 +0000 >> >> >> If (as I understand) in Windows we can't delete a mapped [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [205.166.94.33 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 60996 Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> From: Andrea Corallo >> Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org >> Date: Thu, 26 Jan 2023 19:46:25 +0000 >> >> >> If (as I understand) in Windows we can't delete a mapped [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [205.166.94.33 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Eli Zaretskii writes: >> From: Andrea Corallo >> Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org >> Date: Thu, 26 Jan 2023 19:46:25 +0000 >> >> >> 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? > > This shouldn't happen, since the *.eln files are generated with > make-temp-file. Right sorry >> 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. > > I'll have to refresh my memory about the reasons and the actual > changeset. Thanks BR Andrea From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 26 15:35:22 2023 Received: (at 60996) by debbugs.gnu.org; 26 Jan 2023 20:35:22 +0000 Received: from localhost ([127.0.0.1]:36295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL8xu-0002jR-1o for submit@debbugs.gnu.org; Thu, 26 Jan 2023 15:35:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL8xr-0002jA-VV for 60996@debbugs.gnu.org; Thu, 26 Jan 2023 15:35:20 -0500 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 1pL8xl-0001mT-NM; Thu, 26 Jan 2023 15:35:14 -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=mRCE3M6W643NpmQqmWTJl7OA1SZ118p8wMgqVL4CE3w=; b=ZxBMXvINC9mk nZELaBZiAPuX8CTUhZbYF+lZ7Pa3WoplVKM/irB+Uz+JUfjqrXFcWX2VDwOX3GihJeWtOC1rZPSCs QxkbsLnqAUfyumiwKRspTuct+qGJTwBFDkfj2yGZ1w9uRhi7WraurzCEycsKsTjMqbuTY2t7XgeQl EahZdyefiDCxOEnBe/B18VyFdrQOxsPWmuheGxGH+X4JrIpDv+5bwVYzb0YRq5RaeCRO//lRi4wKS NmJQONRCPook1GGOYJvUNpoUvCdC0egY+QDz85RRaNjZJ/cBasBSOtMgJBr9lgCaEcbqT10TjVfs0 e1UUVapsLW+n9+FpyJMgqA==; 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 1pL8xl-0004Ei-6c; Thu, 26 Jan 2023 15:35:13 -0500 Date: Thu, 26 Jan 2023 22:35:00 +0200 Message-Id: <83mt65c9vv.fsf@gnu.org> From: Eli Zaretskii To: akrl@sdf.org In-Reply-To: <83r0vhcf9m.fsf@gnu.org> (message from Eli Zaretskii on Thu, 26 Jan 2023 20:38:45 +0200) Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> <83r0vhcf9m.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60996 Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org > Date: Thu, 26 Jan 2023 20:38:45 +0200 > From: Eli Zaretskii > > > 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. Actually, I don't think I see where we delete the trampoline that we generated when inhibit-automatic-native-compilation is non-nil. Can you point me to the code which does that? From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 27 04:51:11 2023 Received: (at 60996) by debbugs.gnu.org; 27 Jan 2023 09:51:11 +0000 Received: from localhost ([127.0.0.1]:36759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLLO2-0000m9-KK for submit@debbugs.gnu.org; Fri, 27 Jan 2023 04:51:10 -0500 Received: from mx.sdf.org ([205.166.94.24]:62965) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLLNy-0000lv-8G for 60996@debbugs.gnu.org; Fri, 27 Jan 2023 04:51:09 -0500 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 30R9p4oH007139 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Fri, 27 Jan 2023 09:51:04 GMT From: Andrea Corallo To: Eli Zaretskii Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline In-Reply-To: <83mt65c9vv.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 26 Jan 2023 22:35:00 +0200") References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> <83r0vhcf9m.fsf@gnu.org> <83mt65c9vv.fsf@gnu.org> Date: Fri, 27 Jan 2023 09:51:04 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org >> Date: Thu, 26 Jan 2023 20:38:45 +0200 >> From: Eli Zaretskii >> >> > The only case where we might do that AFAIR is when >> > `i [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [205.166.94.33 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 60996 Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org >> Date: Thu, 26 Jan 2023 20:38:45 +0200 >> From: Eli Zaretskii >> >> > The only case where we might do that AFAIR is when >> > `i [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [205.166.94.33 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Eli Zaretskii writes: >> Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org >> Date: Thu, 26 Jan 2023 20:38:45 +0200 >> From: Eli Zaretskii >> >> > 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. > > Actually, I don't think I see where we delete the trampoline that we > generated when inhibit-automatic-native-compilation is non-nil. Can > you point me to the code which does that? Sure, the code behind this mechanism is not straightforward and took me a bit to decipher it as well yesterday. In `comp-trampoline-compile' when `inhibit-automatic-native-compilation' is not nil we invoke `comp--native-compile' with the `output' parameter set to null. `comp--native-compile' after compiling does two things: 1- If the compilation input was a file returns the .eln filename 2- If the input was a lambda (the case for trampolines) it does return the compiled subr. To do that it preforms a load of the eln before returning. So in general what `comp--native-compile' returns is: (if (stringp function-or-file) data ;; So we return the compiled function. (native-elisp-load data))) But at the end of `comp--native-compile' this when was added (when (and (not (stringp function-or-file)) (not output) comp-ctxt (comp-ctxt-output comp-ctxt) (file-exists-p (comp-ctxt-output comp-ctxt))) (delete-file (comp-ctxt-output comp-ctxt))) Took me a while to actually realize this is the unwindform of an enormous `unwind-protect'. Anyway this is the code that when `output' is null (the case for trampolines) tries to performs the file deletetion. Best Regards Andrea From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 27 08:01:15 2023 Received: (at 60996) by debbugs.gnu.org; 27 Jan 2023 13:01:15 +0000 Received: from localhost ([127.0.0.1]:36924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLOLz-0002SL-47 for submit@debbugs.gnu.org; Fri, 27 Jan 2023 08:01:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLOLu-0002S2-Re for 60996@debbugs.gnu.org; Fri, 27 Jan 2023 08:01:13 -0500 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 1pLOLo-0007md-Ug; Fri, 27 Jan 2023 08:01:04 -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=Wik2WZDw7uFBp/3nx9Kv4k19u8crwXFm1w85dVff+Gc=; b=KAcxifd5mXmh OGy2LY7GAwMBnTaIzr5SWu/OAYbxSlQ2Y9Iz07xACPcj07eSW9AhfnAOei1oA6Wp62OIKRXXETs2y W7/d4F7rFiQZShOKF5h2g4teCs2V0Cu8WGvhP01qDtbgyZt0vgdvYVDY5xTvC7B1MyD0ZqlXtP7uH uQigFB7zmrsF1Y+ExHQAnNo6vIODts8vtlaMynJfEYdBa2Sk9e5bnPLXrwC8nJGuZMvi3lvqzqn0Y +842xE18NToqYCupRjhTPVbyq5BQMrhHNtb9N8HdTwyVO5N+GI8xt1CrKYpkmcsRQYvfPno59t0j+ ZN4jpL1HliYwZyCYnpTBDw==; 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 1pLOLo-0002nc-Eq; Fri, 27 Jan 2023 08:01:04 -0500 Date: Fri, 27 Jan 2023 15:00:49 +0200 Message-Id: <835ycsceta.fsf@gnu.org> From: Eli Zaretskii To: akrl@sdf.org In-Reply-To: <83o7qlcbc4.fsf@gnu.org> (message from Eli Zaretskii on Thu, 26 Jan 2023 22:03:39 +0200) Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> <83r0vhcf9m.fsf@gnu.org> <83o7qlcbc4.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60996 Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org > Date: Thu, 26 Jan 2023 22:03:39 +0200 > From: Eli Zaretskii > > > 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. > > I'll have to refresh my memory about the reasons and the actual > changeset. I started a discussion on emacs-devel about this, let's see where it leads us. I think for now I should simply wrap the delete-file call at the end of 'comp--native-compile' with 'ignore-errors'. WDYT? From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 27 08:56:42 2023 Received: (at 60996) by debbugs.gnu.org; 27 Jan 2023 13:56:42 +0000 Received: from localhost ([127.0.0.1]:36948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLPDe-00041i-BY for submit@debbugs.gnu.org; Fri, 27 Jan 2023 08:56:42 -0500 Received: from mx.sdf.org ([205.166.94.24]:59794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLPDZ-00041U-GU for 60996@debbugs.gnu.org; Fri, 27 Jan 2023 08:56:40 -0500 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 30RDuaMJ025574 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Fri, 27 Jan 2023 13:56:36 GMT From: Andrea Corallo To: Eli Zaretskii Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline In-Reply-To: <835ycsceta.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 27 Jan 2023 15:00:49 +0200") References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> <83r0vhcf9m.fsf@gnu.org> <83o7qlcbc4.fsf@gnu.org> <835ycsceta.fsf@gnu.org> Date: Fri, 27 Jan 2023 13:56:36 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org >> Date: Thu, 26 Jan 2023 22:03:39 +0200 >> From: Eli Zaretskii >> >> > But my question is: is this mechanism _really_ necessary? [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [205.166.94.33 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 60996 Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org >> Date: Thu, 26 Jan 2023 22:03:39 +0200 >> From: Eli Zaretskii >> >> > But my question is: is this mechanism _really_ necessary? [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [205.166.94.33 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Eli Zaretskii writes: >> Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org >> Date: Thu, 26 Jan 2023 22:03:39 +0200 >> From: Eli Zaretskii >> >> > 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. >> >> I'll have to refresh my memory about the reasons and the actual >> changeset. > > I started a discussion on emacs-devel about this, let's see where it > leads us. Thanks > I think for now I should simply wrap the delete-file call at the end > of 'comp--native-compile' with 'ignore-errors'. WDYT? Yeah agree, I'm fine with that as a temporary solution. I hope we'll not forget it there as definitive and we'll be able come up with a decision on this. Best Regards Andrea From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 28 16:15:25 2023 Received: (at submit) by debbugs.gnu.org; 28 Jan 2023 21:15:25 +0000 Received: from localhost ([127.0.0.1]:41658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLsXh-0007pF-OG for submit@debbugs.gnu.org; Sat, 28 Jan 2023 16:15:25 -0500 Received: from lists.gnu.org ([209.51.188.17]:40502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLsXd-0007p4-Ep for submit@debbugs.gnu.org; Sat, 28 Jan 2023 16:15:21 -0500 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 1pLsXc-0008Tg-Re for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2023 16:15:16 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLsXa-0000YS-P4 for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2023 16:15:15 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pLsXX-0001An-FL for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2023 22:15:11 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline Date: Sat, 28 Jan 2023 21:15:02 +0000 Message-ID: <86zga2pdih.fsf@gmail.com> References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> <83r0vhcf9m.fsf@gnu.org> <83mt65c9vv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:FdmxtisVEmf36aukxRd2YqmIM4s= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.4 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.15, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) On Fri 27 Jan 2023, Andrea Corallo wrote: > Eli Zaretskii writes: > >>> Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org >>> Date: Thu, 26 Jan 2023 20:38:45 +0200 >>> From: Eli Zaretskii >>> >>> > 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. Sorry that this bug report has consumed so much of everyone's time. After a while where I could not reproduce the problem, a new rebuild on master provoked it again. >From more experimentation, the recipe seems to be: 1) Delete the "subr-trampoline-*.eln" files from the eln-cache dir 2) Start emacs with inhibit-automatic-native-compilation non-nil >> Actually, I don't think I see where we delete the trampoline that we >> generated when inhibit-automatic-native-compilation is non-nil. Can >> you point me to the code which does that? > > Sure, the code behind this mechanism is not straightforward and took me > a bit to decipher it as well yesterday. Perhaps an opportunity to refactor it at some point, to make it easier for future maintainers to reason about this code. > In `comp-trampoline-compile' when `inhibit-automatic-native-compilation' > is not nil we invoke `comp--native-compile' with the `output' parameter > set to null. > > `comp--native-compile' after compiling does two things: > > 1- If the compilation input was a file returns the .eln filename > > 2- If the input was a lambda (the case for trampolines) it does return > the compiled subr. To do that it preforms a load of the eln before > returning. > > So in general what `comp--native-compile' returns is: > > (if (stringp function-or-file) > data > ;; So we return the compiled function. > (native-elisp-load data))) > > But at the end of `comp--native-compile' this when was added > > (when (and (not (stringp function-or-file)) > (not output) > comp-ctxt > (comp-ctxt-output comp-ctxt) > (file-exists-p (comp-ctxt-output comp-ctxt))) > (delete-file (comp-ctxt-output comp-ctxt))) > > > Took me a while to actually realize this is the unwindform of an > enormous `unwind-protect'. Anyway this is the code that when `output' > is null (the case for trampolines) tries to performs the file > deletetion. I think you have identified the cause of this issue - as the .eln has been loaded, the delete-file will never succeed on Windows. I know Eli is not a fan of inhibit-automatic-native-compilation, but I think there is a place for it. Users may want to use precompiled .eln files but not waste effort on native compiling other code. If this error can be suppressed such that the only effect is for a temp file to be left around, that is a reasonable solution to this. AndyM From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 29 02:01:34 2023 Received: (at 60996) by debbugs.gnu.org; 29 Jan 2023 07:01:35 +0000 Received: from localhost ([127.0.0.1]:42119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pM1h0-0007pG-LX for submit@debbugs.gnu.org; Sun, 29 Jan 2023 02:01:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pM1gy-0007p3-L0 for 60996@debbugs.gnu.org; Sun, 29 Jan 2023 02:01:33 -0500 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 1pM1gt-0003LN-Dz; Sun, 29 Jan 2023 02:01:27 -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=ulWqU1kBpBXIxetP7sYl+Sink87oNVxsGzAvGYvDqJY=; b=Qp/nXTynd0sO tGinBoph5u5cf57JJOWPL6po/TvGN3iXyicMBLhr661cKhVDoJYdjslyHbzPPMWiWnYoiIKaPiBFA t8QkpauoxqpgtM+qlKMvEuCxcAIbeGqbY5wjunuTPeteoN4kZCXZ16UcJhbRl2DHnbaLTPVnAqhpb /Z/iN4Em+WtwFbpf6JnBysYJ3vEk8D/hyBcF0hjc5msxx2B9vv3uXVtf70SsT8EnfJC6dGUCNgFp+ Blc9PvPzHyVMd1W4MfNp+XPBh2o7xVgCEP3KGIu+8JWIoJJg7Z/s3cd061q9zGhVO03mizlgbEnBk GBubRWNu7dsEJILswHpDnw==; 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 1pM1gs-0001Y7-HS; Sun, 29 Jan 2023 02:01:26 -0500 Date: Sun, 29 Jan 2023 09:01:16 +0200 Message-Id: <83a621964j.fsf@gnu.org> From: Eli Zaretskii To: Andy Moreton In-Reply-To: <86zga2pdih.fsf@gmail.com> (message from Andy Moreton on Sat, 28 Jan 2023 21:15:02 +0000) Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> <83r0vhcf9m.fsf@gnu.org> <83mt65c9vv.fsf@gnu.org> <86zga2pdih.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60996 Cc: 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Andy Moreton > Date: Sat, 28 Jan 2023 21:15:02 +0000 > > I know Eli is not a fan of inhibit-automatic-native-compilation, but I > think there is a place for it. Users may want to use precompiled .eln > files but not waste effort on native compiling other code. > > If this error can be suppressed such that the only effect is for a temp > file to be left around, that is a reasonable solution to this. What I dislike is that inhibit-automatic-native-compilation promises not to start compilation, but it actually does start compilation, for trampolines, and writes them to a directory we invent behind user's back. What I'd like to do is to go to the previous situation, where compilation of trampolines was disabled at startup if native-compilation is not available (something that happens on Windows only), and leave the rest to the user: if they want the trampolines to be compiled, but not written to eln-cache, let them tweak native-comp-eln-load-path to direct trampolines to another place, whether the temporary directory or any other directory. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 29 02:23:26 2023 Received: (at 60996) by debbugs.gnu.org; 29 Jan 2023 07:23:26 +0000 Received: from localhost ([127.0.0.1]:42144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pM22A-0008Np-Ao for submit@debbugs.gnu.org; Sun, 29 Jan 2023 02:23:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pM225-0008NY-S8 for 60996@debbugs.gnu.org; Sun, 29 Jan 2023 02:23:24 -0500 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 1pM220-0006R4-LT; Sun, 29 Jan 2023 02:23:16 -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=l1TkZbtmRH6bON22iRq8vQCUxvMNkiS3UobeJ8tBuW0=; b=d+0Zupz9CLTF VQXwgtDjVYQoOJxlYEa4WYXtE8a0k8saRmJyvXqG/mNNTP4P5mCvVNtudaMJxXmWZn1Htm6A7xzKU cOpkLgHm995jcN4VfwqwbUblLyXHoAXDe4+HTl3+YFJArn+aYv2cvipt5aVk5tW0cW0pI9FU22rrl k0uz7WFBjoeCbMmzKNwv/MR+WX1Vgo1Hoa0Px7EuG6EFBcjkhsXkpchjp0maHylHM8MGuFqGdPKzm hs0G96n0WY5L66dRn/7MmEc4mUSWysDbAxaLVLObpBN6fvuV46HDd6bn/R3pKEF9KkZFeZTa4qzYU j2652jGNhpLuW15UNLgjpw==; 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 1pM21z-0004MT-T1; Sun, 29 Jan 2023 02:23:16 -0500 Date: Sun, 29 Jan 2023 09:23:05 +0200 Message-Id: <838rhl9546.fsf@gnu.org> From: Eli Zaretskii To: andrewjmoreton@gmail.com In-Reply-To: <83a621964j.fsf@gnu.org> (message from Eli Zaretskii on Sun, 29 Jan 2023 09:01:16 +0200) Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> <83r0vhcf9m.fsf@gnu.org> <83mt65c9vv.fsf@gnu.org> <86zga2pdih.fsf@gmail.com> <83a621964j.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60996 Cc: 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 60996@debbugs.gnu.org > Date: Sun, 29 Jan 2023 09:01:16 +0200 > From: Eli Zaretskii > > and leave the rest to the user: if they want the trampolines to > be compiled, but not written to eln-cache, let them tweak > native-comp-eln-load-path to direct trampolines to another place, > whether the temporary directory or any other directory. Alternatively, we could modify comp-enable-subr-trampolines to be able to have a string value, which would then be a directory to which to write the trampolines. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 29 02:47:24 2023 Received: (at 60996) by debbugs.gnu.org; 29 Jan 2023 07:47:24 +0000 Received: from localhost ([127.0.0.1]:42207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pM2PM-0000cU-EA for submit@debbugs.gnu.org; Sun, 29 Jan 2023 02:47:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pM2PL-0000cH-3V for 60996@debbugs.gnu.org; Sun, 29 Jan 2023 02:47:23 -0500 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 1pM2PE-0001pd-Cu; Sun, 29 Jan 2023 02:47:16 -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=5Dot7/RVt8gZWGRo1+b9MjOo5bqtaQfLKt58LFUUqiA=; b=UmpJYJQvceKL 3bp52VVQ3trRh82UZFm69i1YT/Gkw6I7yVbyFEElintLzqD0+eLnO1EsRtlD74f5wMAEOblIvqkx1 q2lCMuNKBYQXd9235cqZAGwUoRkQOh5gj19azjGNliFyp8d64Wljp7T1RE9ZmpyLBkkNXSVCS2+Q+ NuPfzKOLwwLn+YM3eqsvGBraywKYbHkko+0JaONr+VDNiD+dCVOjQ8lLtBIH22qFUM7d34GeREi7T hYxWxLgtYqCMHlA9BNcLrbGWMgYbcbWkv+mjN9MIi5cQw1WrzFIiyAYvdeJrv8h/zIgNKkCJ9giMs fx6qBmcX73T/s4Usz2fOYQ==; 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 1pM2PC-0003HR-D5; Sun, 29 Jan 2023 02:47:15 -0500 Date: Sun, 29 Jan 2023 09:47:04 +0200 Message-Id: <835ycp9407.fsf@gnu.org> From: Eli Zaretskii To: Andy Moreton In-Reply-To: <86zga2pdih.fsf@gmail.com> (message from Andy Moreton on Sat, 28 Jan 2023 21:15:02 +0000) Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> <83r0vhcf9m.fsf@gnu.org> <83mt65c9vv.fsf@gnu.org> <86zga2pdih.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60996 Cc: 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Andy Moreton > Date: Sat, 28 Jan 2023 21:15:02 +0000 > > If this error can be suppressed such that the only effect is for a temp > file to be left around, that is a reasonable solution to this. I've now done so, please see if your scenario now silently fails, leaving the temporary compiled trampolines in %TEMP%. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 29 06:37:21 2023 Received: (at submit) by debbugs.gnu.org; 29 Jan 2023 11:37:21 +0000 Received: from localhost ([127.0.0.1]:42369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pM5zs-00070Z-VK for submit@debbugs.gnu.org; Sun, 29 Jan 2023 06:37:21 -0500 Received: from lists.gnu.org ([209.51.188.17]:32912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pM5zp-00070Q-Pk for submit@debbugs.gnu.org; Sun, 29 Jan 2023 06:37:20 -0500 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 1pM5zp-0001z1-Hw for bug-gnu-emacs@gnu.org; Sun, 29 Jan 2023 06:37:17 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pM5zo-0000bN-5M for bug-gnu-emacs@gnu.org; Sun, 29 Jan 2023 06:37:17 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pM5zm-0000Zz-IK for bug-gnu-emacs@gnu.org; Sun, 29 Jan 2023 12:37:14 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline Date: Sun, 29 Jan 2023 11:37:09 +0000 Message-ID: <867cx5r2qi.fsf@gmail.com> References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> <83r0vhcf9m.fsf@gnu.org> <83mt65c9vv.fsf@gnu.org> <86zga2pdih.fsf@gmail.com> <835ycp9407.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:C0IBQLzdufZ4PCMq94K1tacA2fc= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.4 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.15, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) On Sun 29 Jan 2023, Eli Zaretskii wrote: >> From: Andy Moreton >> Date: Sat, 28 Jan 2023 21:15:02 +0000 >> >> If this error can be suppressed such that the only effect is for a temp >> file to be left around, that is a reasonable solution to this. > > I've now done so, please see if your scenario now silently fails, > leaving the temporary compiled trampolines in %TEMP%. Yes, that fixes the problem on emacs-29. The problem still exists on master (which does not yet have your patch), so all looks good. Your commit message said: Fix spurious errors on Windows when deleting temporary *.eln files I think that is a mischaracterisation: the errors are not spurious, and are documented by Microsoft. The behaviour is different to POSIX, but that makes it different, not spurious. AndyM From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 29 08:50:50 2023 Received: (at 60996) by debbugs.gnu.org; 29 Jan 2023 13:50:50 +0000 Received: from localhost ([127.0.0.1]:42468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pM854-0004fE-28 for submit@debbugs.gnu.org; Sun, 29 Jan 2023 08:50:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pM852-0004f2-IX for 60996@debbugs.gnu.org; Sun, 29 Jan 2023 08:50:48 -0500 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 1pM84x-0006QO-C7; Sun, 29 Jan 2023 08:50:43 -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=3gTjw3t2z3EaW48i4/y+rvihfZBp8lF47YqTmtqOsLc=; b=Nwl4ZMlCY2pg uDCg8kR54t1K+1CjJ5y6F7gOXVH4rCxkfuxV6cImGbgKsTPfIC6NCml+MwmSkqtGdyOBIFd4Aqqzq PPFrC2Y9KCytmuhG0VyEigCFX0bwXmISiIkNuLCbV4KAVJzQVDkUw0RMnGK9HUsT3IgOHNbIyhyGm cFzcreJ/iHWUOM53b2wOzOCq6sIrQudyBV+59019sUaegpy4c12qT+NmSjCryPm47GbJH6bUpcYtf GMkRdi2QaOPoe2jCmEyijjYVIoLaGH+4sFqj+anSzBzo2K7VCLQRiuaAfC1vnYsBW3v2aBr3Xic3o GKf+maDICOlObmWARqzL4A==; 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 1pM84w-0007wI-RS; Sun, 29 Jan 2023 08:50:43 -0500 Date: Sun, 29 Jan 2023 15:50:34 +0200 Message-Id: <83tu0978lx.fsf@gnu.org> From: Eli Zaretskii To: Andy Moreton In-Reply-To: <867cx5r2qi.fsf@gmail.com> (message from Andy Moreton on Sun, 29 Jan 2023 11:37:09 +0000) Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> <83r0vhcf9m.fsf@gnu.org> <83mt65c9vv.fsf@gnu.org> <86zga2pdih.fsf@gmail.com> <835ycp9407.fsf@gnu.org> <867cx5r2qi.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60996 Cc: 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Andy Moreton > Date: Sun, 29 Jan 2023 11:37:09 +0000 > > Your commit message said: > > Fix spurious errors on Windows when deleting temporary *.eln files > > I think that is a mischaracterisation: the errors are not spurious, and > are documented by Microsoft. The behaviour is different to POSIX, but > that makes it different, not spurious. They are spurious from the user POV. Anyway, the commit message is now carved in stone and cannot be changed. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 29 08:51:07 2023 Received: (at 60996-done) by debbugs.gnu.org; 29 Jan 2023 13:51:07 +0000 Received: from localhost ([127.0.0.1]:42473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pM85L-0004g7-BO for submit@debbugs.gnu.org; Sun, 29 Jan 2023 08:51:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pM85K-0004fW-AU for 60996-done@debbugs.gnu.org; Sun, 29 Jan 2023 08:51:06 -0500 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 1pM85F-0006R7-3s for 60996-done@debbugs.gnu.org; Sun, 29 Jan 2023 08:51:01 -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=lHZ9a+XiV5epK7xMYM6DNSvfPlei7cSv9nKUpTAkcrw=; b=CR++FAwB3bte WiUPIk1+7QDku7ry3kLpBsKy3LgjsQet0DBx8jbItmyZ/1qEprD5yo4vQn6zqXsiFntODQa7avPEY 3nRiIVW7S/HFK/5VXxsLkQJLEInHXtsd//byzQTbH1teyp/6fRPo1JzsCw5qmGDlux2XCR06Rse9Z 7qTMMIOqGedpdfEMkFGzFKsZGsaWrtRJdr+Iyq9sKsC+8bnsOqpF1RapvWR824DFzInOnnozOEXxy FIT8WGH0JZ1+5NXPbhDe3otnnt+02yLprtno0v+TpeipEKQYaVdDuuajE0mlM22CBOBFVTukrMfC9 SZ7maXkE9fymEum5T0zPeg==; 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 1pM85E-0007wq-Jy for 60996-done@debbugs.gnu.org; Sun, 29 Jan 2023 08:51:00 -0500 Date: Sun, 29 Jan 2023 15:50:52 +0200 Message-Id: <83sfft78lf.fsf@gnu.org> From: Eli Zaretskii To: 60996-done@debbugs.gnu.org In-Reply-To: <867cx5r2qi.fsf@gmail.com> (message from Andy Moreton on Sun, 29 Jan 2023 11:37:09 +0000) Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> <83r0vhcf9m.fsf@gnu.org> <83mt65c9vv.fsf@gnu.org> <86zga2pdih.fsf@gmail.com> <835ycp9407.fsf@gnu.org> <867cx5r2qi.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60996-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Closing. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 30 05:11:13 2023 Received: (at 60996) by debbugs.gnu.org; 30 Jan 2023 10:11:13 +0000 Received: from localhost ([127.0.0.1]:46436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMR85-0000Dh-2v for submit@debbugs.gnu.org; Mon, 30 Jan 2023 05:11:13 -0500 Received: from mx.sdf.org ([205.166.94.24]:52118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMR81-0000DT-Oh for 60996@debbugs.gnu.org; Mon, 30 Jan 2023 05:11:11 -0500 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 30UAB8Te011113 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Mon, 30 Jan 2023 10:11:08 GMT From: Andrea Corallo To: Eli Zaretskii Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline In-Reply-To: <838rhl9546.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 29 Jan 2023 09:23:05 +0200") References: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> <833583ks9t.fsf@gnu.org> <86tu0iwx49.fsf@gmail.com> <83a629i3aj.fsf@gnu.org> <83r0vhcf9m.fsf@gnu.org> <83mt65c9vv.fsf@gnu.org> <86zga2pdih.fsf@gmail.com> <83a621964j.fsf@gnu.org> <838rhl9546.fsf@gnu.org> Date: Mon, 30 Jan 2023 10:11:08 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> Cc: 60996@debbugs.gnu.org >> Date: Sun, 29 Jan 2023 09:01:16 +0200 >> From: Eli Zaretskii >> >> and leave the rest to the user: if they want the trampolines to >> be compiled, but no [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [205.166.94.33 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 60996 Cc: andrewjmoreton@gmail.com, 60996@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> Cc: 60996@debbugs.gnu.org >> Date: Sun, 29 Jan 2023 09:01:16 +0200 >> From: Eli Zaretskii >> >> and leave the rest to the user: if they want the trampolines to >> be compiled, but no [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [205.166.94.33 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Eli Zaretskii writes: >> Cc: 60996@debbugs.gnu.org >> Date: Sun, 29 Jan 2023 09:01:16 +0200 >> From: Eli Zaretskii >> >> and leave the rest to the user: if they want the trampolines to >> be compiled, but not written to eln-cache, let them tweak >> native-comp-eln-load-path to direct trampolines to another place, >> whether the temporary directory or any other directory. > > Alternatively, we could modify comp-enable-subr-trampolines to be able > to have a string value, which would then be a directory to which to > write the trampolines. Yes please, I'm on the same line. Andrea From unknown Fri Jun 20 07:22:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 27 Feb 2023 12:24:13 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator