From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#69263: 29.1; emacs freeze with memory swap Date: Sun, 9 Jun 2024 16:56:04 -0400 Message-ID: References: <86wmr0pqw9.fsf@gnu.org> <86msrvnqq4.fsf@gnu.org> <86h6i3njwd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24287"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69263-done@debbugs.gnu.org, awrhygty@outlook.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 10 00:05:15 2024 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 1sGQf5-00062V-30 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Jun 2024 00:05:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sGQed-00047x-Bn; Sun, 09 Jun 2024 18:04:47 -0400 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 1sGQeb-00047X-SM for bug-gnu-emacs@gnu.org; Sun, 09 Jun 2024 18:04:45 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sGQeb-0007DR-KR for bug-gnu-emacs@gnu.org; Sun, 09 Jun 2024 18:04:45 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sGQer-0001NA-R2 for bug-gnu-emacs@gnu.org; Sun, 09 Jun 2024 18:05:01 -0400 Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Jun 2024 22:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 69263 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Mail-Followup-To: 69263@debbugs.gnu.org, stefankangas@gmail.com, awrhygty@outlook.com Original-Received: via spool by 69263-done@debbugs.gnu.org id=D69263.17179706775202 (code D ref 69263); Sun, 09 Jun 2024 22:05:01 +0000 Original-Received: (at 69263-done) by debbugs.gnu.org; 9 Jun 2024 22:04:37 +0000 Original-Received: from localhost ([127.0.0.1]:35309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGQeS-0001Lq-Fg for submit@debbugs.gnu.org; Sun, 09 Jun 2024 18:04:36 -0400 Original-Received: from mail-wr1-f48.google.com ([209.85.221.48]:46487) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGQeQ-0001LS-5q for 69263-done@debbugs.gnu.org; Sun, 09 Jun 2024 18:04:35 -0400 Original-Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-35f1c567ae4so753114f8f.1 for <69263-done@debbugs.gnu.org>; Sun, 09 Jun 2024 15:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717970592; x=1718575392; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=yXcDbXirH6SsyoTrrDpqKAMOiCW8N0ceAg17nAUt0rM=; b=ftQ4dHaQ2uuc25beyxcRnHpcgeGKzLFboqy70Ab0AYier1Ui+usMbDhgo1gHzZRRLH w8sevo8Qvu6IfQ13x8eRgYrcXp36MMjrgrtH0m3+XhupdubLtG2cO0blXJACJwQi3qj0 ZlveFMwyB6+zUkjL7lk7J2B0yboJigcJ2pRST3X6jcU4lJNkkd73PAT13Tvyj9nlxMhM dc/bkMJvsFoPN4RiRG7T/iZnl/WIi4JsnnFI2Ec3SA3RNqOYXXn+7MkdVJYCJs/p3aoy BLtvphkEehNcxrfXAUzuh9xij2LoUQ2dHrJl0vsO9qyh//i6LaGE/GAQSXM+3uU7rD+X 6Zmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717970592; x=1718575392; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yXcDbXirH6SsyoTrrDpqKAMOiCW8N0ceAg17nAUt0rM=; b=L6Nv9DAtAZp4Fj9STvkasCNysqfachnc9O+/grmjG/mtIpgs5ZeP3YYe1CSW7bdwFp 2xDTqBC0iIpy56GZ3kjmjmo45bCVgxDH27Q4ImTC7wsVCfzesH5jjvlO3XToMVJ5a6Ju jQ91tigH1XdIo05nioSEpttXfkjvP0l5NUL4IaLYD667wtTKQ3Vb9fIJuHeKRtaq1sbz 11iEGSox4t/n/Cc+Bo69PMbzpGf1DtfXFnWWkRAIKQrbw18dd82mtvOFHj4yfFaLte8f iLbXcur684poQ84KYIXmpVcLo4YSgy6/nF7Iz7AbkNaknmcRditMkNVx9vLSCKgTUFoz Sf7g== X-Forwarded-Encrypted: i=1; AJvYcCV1bJHQ7UGIWmYra81/zswtYtiGKp/xh81R7q0vCRCClBU0h+91MIwhZTfwi+NwF2/3pPR0i0ERqDSGD4yvtq7PIUPGaK5XUW85/A== X-Gm-Message-State: AOJu0YxSDzTXiKL4Em3lljdYnjPyyA2zC42lxfmqjaAO3Gc2aWjRTcvy DOMO0oHEFF5MHett0FDlsty6lrs+x7Ssi0/UcTvLbxcmFaEY6Vhx/2EiPefrDNl9WIiDnl96U0V TqRyUT5A/nyY/B75DKTkerKFkYTo/ytga X-Google-Smtp-Source: AGHT+IH4F0JjFSGlnd/Be/TG0+geCKd5p1dtSlhlMfbu28Vk1y+sq8Ns774zvNWq8MEXBnQag/G5bf/NS1HuPqByH88= X-Received: by 2002:a05:6512:3f08:b0:52b:81de:1127 with SMTP id 2adb3069b0e04-52bb9fc4584mr5299037e87.50.1717966565186; Sun, 09 Jun 2024 13:56:05 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 9 Jun 2024 16:56:04 -0400 In-Reply-To: <86h6i3njwd.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 20 Feb 2024 19:08:18 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286989 Archived-At: Eli Zaretskii writes: >> From: awrhygty@outlook.com >> Cc: 69263@debbugs.gnu.org >> Date: Wed, 21 Feb 2024 00:33:58 +0900 >> >> Eli Zaretskii writes: >> > This backtrace is not from an interesting thread. You need to say >> > "thread 1" before "bt full", to switch to the Emacs's main >> > (a.k.a. "Lisp") thread. >> > >> > Alternatively, say "thread apply all bt full", which will produce the >> > backtrace of all the threads in the program. >> >> I tried "thread apply all bt full". >> Here is a new log. > > Thanks. > >> Thread 1 (Thread 1384.0x1fdc): >> #0 0x00007ffa7370d064 in ntdll!ZwWaitForSingleObject () from C:\WINDOWS\SYSTEM32\ntdll.dll >> No symbol table info available. >> #1 0x00007ffa736ceb32 in ntdll!RtlUnlockHeap () from C:\WINDOWS\SYSTEM32\ntdll.dll >> No symbol table info available. >> #2 0x00007ffa736cda08 in ntdll!RtlExitUserProcess () from C:\WINDOWS\SYSTEM32\ntdll.dll >> No symbol table info available. >> #3 0x00007ffa7223e3bb in KERNEL32!FatalExit () from C:\WINDOWS\System32\kernel32.dll >> No symbol table info available. >> #4 0x00007ffa71daa155 in msvcrt!_exit () from C:\WINDOWS\System32\msvcrt.dll >> No symbol table info available. >> #5 0x00007ffa71daa7c5 in msvcrt!_initterm_e () from C:\WINDOWS\System32\msvcrt.dll >> No symbol table info available. >> #6 0x00007ff68b906996 in Fkill_emacs () > > This seems to indicate that Emacs already called 'exit' inside > kill-emacs, and the process is now stuck inside the Microsoft exit > code, waiting (in WaitForSingleObject, it seems) for something to > happen. The fact that RtlUnlockHeap is in the call-stack seems to > indicate that releasing memory might be somehow related to this. > > OTOH, this page: > > https://stackoverflow.com/questions/52649476/why-would-a-process-hang-within-rtlexituserprocess-ldrpdrainworkqueue > > discusses a similar issue, and points to this page: > > https://blogs.blackberry.com/en/2017/10/windows-10-parallel-loading-breakdown > > which seems to indicate that this is somehow related to the "parallel > DLL loading" feature of Windows, and indeed, one of the threads within > the Emacs process shows calls to LdrInitializeThunk and > LdrShutdownThread in its call-stack. It might be interesting to look > at the Emacs process with Process Explorer and try to figure out which > thread is running (as opposed to threads that are idle waiting for > something); if it's the thread which calls those Ldr* functions, it > will be one more evidence that this parallel loading feature is > related somehow. > > That's all I can say based on this information, sorry. More information was requested, but none was given within 15 weeks, so I'm closing this bug. If this is still an issue, please reply to this email (use "Reply to all" in your email client) and we can reopen the bug report.