From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: 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="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18977"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 60996@debbugs.gnu.org Cancel-Lock: sha1:z2d8vDFQMFqshQZpobpAUM8UJ5k= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 23 03:31:15 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pJmc7-0004nW-5p for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Jan 2023 03:31:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJmbw-0004W7-Vq; Sun, 22 Jan 2023 21:31:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJmbu-0004Vh-QW for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 21:31:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJmbu-00059M-J3 for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 21:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pJmbu-0003Tp-7k for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 21:31:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <74d13c46-5b26-9dd8-45dc-32b7fda25421@gmail.com> Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Jan 2023 02:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60996 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.167444105913369 (code B ref -1); Mon, 23 Jan 2023 02:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Jan 2023 02:30:59 +0000 Original-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 Original-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 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJmbm-0004VK-IG for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 21:30:54 -0500 Original-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 Original-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/ 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253971 Archived-At: --=-=-= 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. --=-=-=--