From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69263: 29.1; emacs freeze with memory swap Date: Tue, 20 Feb 2024 16:40:51 +0200 Message-ID: <86msrvnqq4.fsf@gnu.org> References: <86wmr0pqw9.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32333"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69263@debbugs.gnu.org To: awrhygty@outlook.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 20 15:42:22 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 1rcRK8-0008IK-Qr for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Feb 2024 15:42:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcRJV-00051K-Gg; Tue, 20 Feb 2024 09:41:41 -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 1rcRJU-000515-Eu for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 09:41:40 -0500 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 1rcRJU-0007tz-63 for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 09:41:40 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rcRJp-0002gW-QX for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 09:42:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2024 14:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69263 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 69263-submit@debbugs.gnu.org id=B69263.170844008710279 (code B ref 69263); Tue, 20 Feb 2024 14:42:01 +0000 Original-Received: (at 69263) by debbugs.gnu.org; 20 Feb 2024 14:41:27 +0000 Original-Received: from localhost ([127.0.0.1]:44663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcRJG-0002fi-JN for submit@debbugs.gnu.org; Tue, 20 Feb 2024 09:41:27 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcRJC-0002fR-L3 for 69263@debbugs.gnu.org; Tue, 20 Feb 2024 09:41:25 -0500 Original-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 1rcRIl-0007kM-2h; Tue, 20 Feb 2024 09:40:55 -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=4+f0sUyh9U+SDvR+teTzEqGlmu6tYufN73waiGbP8jI=; b=oluPREoNjxit v6J4Mnm4Labkx3Sm1gpbPGMIk4FJSeYbOC0BogQV2IWHv6TX5Dw9Gs6ITpEXlp+tR5zQr4cCZ1snG 7uAv/IHASskt2q6WJuY6GpzROtVH5Hh/kRnV8PIzePMGtg8M6IBneMMFBPp+jVvGwrFhItJlV1zNO RKK6OVQ2UAKR3zTvS7sGh5LKeLbdPGpoDfDJyO8qtV7a+2AIS3fEB3lSL8helc3OBX/tBmzPdi9Gc neNw0eIpOoADdHc3m49ZubNg5PwkVF8uCPLN1HmQj3xEJ1LvjLseTrnbqTvbDDMGg7D0+9UsmmhSy PlI402Eg0r4jkWGBjqseUQ==; In-Reply-To: (awrhygty@outlook.com) 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:280330 Archived-At: > From: awrhygty@outlook.com > Cc: 69263@debbugs.gnu.org > Date: Tue, 20 Feb 2024 22:33:35 +0900 > > > So if you want to help us understand what happens in the strange case > > where a Lisp program creates a 8GB Lisp string, and clear it all, on a > > 8GB MS-Windows system, please attach GDB to Emacs after running the > > above recipe, and produce a backtrace that can be used to try to > > figure out what happens. (I hope that your Emacs binary is not > > stripped of debugging symbols, because if it's stripped, GDB will not > > tell anything useful.) > > > > Thanks. > > I installed MSYS2 and GDB for this. > At first, I tried to attach with emacs PID. > GDB says "Can't attach to process 1099". > So I tried with WINPID. > I am not sure it is a correct parameter. > > Here is a log within MSYS2 shell: > $ ps > PID PPID PGID WINPID TTY UID STIME COMMAND > 1051 1 1051 3940 ? 197609 20:56:49 /usr/bin/mintty > 1205 1052 1205 9776 pty0 197609 22:26:16 /usr/bin/ps > 1052 1051 1052 11328 pty0 197609 20:56:49 /usr/bin/bash > 1099 1052 1099 1384 pty0 197609 21:10:57 /c/Emacs/emacs-29.1/bin/emacs > $ /mingw64/bin/gdb > GNU gdb (GDB) 13.2 > Copyright (C) 2023 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > Type "show copying" and "show warranty" for details. > This GDB was configured as "x86_64-w64-mingw32". > Type "show configuration" for configuration details. > For bug reporting instructions, please see: > . > Find the GDB manual and other documentation resources online at: > . > > For help, type "help". > Type "apropos word" to search for commands related to "word". > (gdb) attach 1384 > Attaching to process 1384 > [New Thread 1384.0xbbc] > [New Thread 1384.0xbe0] > [New Thread 1384.0x2bc0] > [New Thread 1384.0x2cc4] > [New Thread 1384.0x14a4] > Reading symbols from C:\Emacs\emacs-29.1\bin\emacs.exe... > (gdb) bt full > #0 0x00007ffa73710b11 in ntdll!DbgBreakPoint () from C:\WINDOWS\SYSTEM32\ntdll.dll > No symbol table info available. > #1 0x00007ffa7373ca0e in ntdll!DbgUiRemoteBreakin () from C:\WINDOWS\SYSTEM32\ntdll.dll > No symbol table info available. > #2 0x00007ffa72237344 in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\System32\kernel32.dll > No symbol table info available. > #3 0x00007ffa736c26b1 in ntdll!RtlUserThreadStart () from C:\WINDOWS\SYSTEM32\ntdll.dll > No symbol table info available. > #4 0x0000000000000000 in ?? () > No symbol table info available. > (gdb) detach > Detaching from program: C:\Emacs\emacs-29.1\bin\emacs.exe, process 1384 > [Inferior 1 (process 1384) detached] > (gdb) exit 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. Thanks.