GNU bug report logs - #70352
29.3.50; emacs-pgtk: possible leak of virtual memory

Previous Next

Package: emacs;

Reported by: Yang Yingchao <yang.yingchao <at> qq.com>

Date: Fri, 12 Apr 2024 11:13:04 UTC

Severity: normal

Found in version 29.3.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Yang Yingchao <yang.yingchao <at> qq.com>
Subject: bug#70352: closed (Re: bug#70352: Fwd: Re: bug#70352: 29.3.50;
 emacs-pgtk: possible leak of virtual memory)
Date: Fri, 10 May 2024 06:35:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#70352: 29.3.50; emacs-pgtk: possible leak of virtual memory

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 70352 <at> debbugs.gnu.org.

-- 
70352: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70352
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Yang Yingchao <yang.yingchao <at> qq.com>
Cc: luangruo <at> yahoo.com, 70352-done <at> debbugs.gnu.org
Subject: Re: bug#70352: Fwd: Re: bug#70352: 29.3.50; emacs-pgtk: possible
 leak of virtual memory
Date: Fri, 10 May 2024 09:34:24 +0300
> From: Yang Yingchao <yang.yingchao <at> qq.com>
> Cc: luangruo <at> yahoo.com,  70352 <at> debbugs.gnu.org
> Date: Fri, 10 May 2024 08:00:31 +0800
> 
> On Thu, May 09 2024, Eli Zaretskii wrote:
> 
> >> As a Gentoo user, I can patch the source code on my machine locally,
> >> therefore, it would not be a real issue for me even if they don't fix it.
> >> 
> >> 
> >> Thanks for your time.
> >
> > Should we now close this bug report, or is there anything else left to
> > do here?
> 
> 
> Yes, please.

Done.

[Message part 3 (message/rfc822, inline)]
From: Yang Yingchao <yang.yingchao <at> qq.com>
To: bug-gnu-emacs <at> gnu.org,Yang Yingchao <yang.yingchao <at> qq.com>
Subject: 29.3.50; emacs-pgtk: possible leak of virtual memory
Date: Fri, 12 Apr 2024 18:56:17 +0800

I'm testing Emacs built with Pgtk (with GTK-4.12.5), and I suspect there
may be a memory leak in virtual memory.


Steps to reproduce:

1. Start Emacs with "-Q --bg-daemon=mytest".
2. Connect to the server with 'emacsclient -c -s mytest'. This will create a new frame.
3. Kill the newly created frame with `\C-x\C-c`.
4. Repeat steps 2 & 3, and observe `/proc/pid_of_emacs/maps`.

It seems like there could be a memory leak issue causing the increasing
number of "/memfd:gdk-wayland" entries and ultimately leading to the
crash without a core dump.


Some of my statistics are as follows:


# yyc <at> tbook in /proc/400602  [18:40:36]
$ cat maps | grep memfd | awk '{print $1}' | awk -F "-" '{sum=strtonum("0x"$2)-strtonum("0x"$1); print sum}' | awk '{sum+=$1} END {print sum}'
42688512
# yyc <at> tbook in /proc/400602  [18:40:57]
$ cat maps | grep memfd | awk '{print $1}' | awk -F "-" '{sum=strtonum("0x"$2)-strtonum("0x"$1); print sum}' | awk '{sum+=$1} END {print sum}'
51888128
# yyc <at> tbook in /proc/400602  [18:41:26]
$ cat /proc/400602/maps| grep /memfd: | wc -l
7
# yyc <at> tbook in /proc/400602  [18:41:41]
$ cat /proc/400602/maps| grep /memfd: | wc -l
9
# yyc <at> tbook in /proc/400602  [18:41:46]
$ cat /proc/400602/maps| grep /memfd: | wc -l
10
# yyc <at> tbook in /proc/400602  [18:41:51]
$ cat /proc/400602/maps| grep /memfd: | wc -l
10
# yyc <at> tbook in /proc/400602  [18:41:56]
$ cat /proc/400602/maps| grep /memfd: | wc -l
12
# yyc <at> tbook in /proc/400602  [18:42:01]
$ cat /proc/400602/maps| grep /memfd: | wc -l
12
# yyc <at> tbook in /proc/400602  [18:42:03]
$ cat /proc/400602/maps| grep /memfd:
7f0ca170a000-7f0ca1fd0000 rw-s 00000000 00:01 169719                     /memfd:gdk-wayland (deleted)
7f0ca1fd0000-7f0ca2896000 rw-s 00000000 00:01 169718                     /memfd:gdk-wayland (deleted)
7f0ca2896000-7f0ca315c000 rw-s 00000000 00:01 175557                     /memfd:gdk-wayland (deleted)
7f0ca315c000-7f0ca3a22000 rw-s 00000000 00:01 169709                     /memfd:gdk-wayland (deleted)
7f0ca3a22000-7f0ca42e8000 rw-s 00000000 00:01 169708                     /memfd:gdk-wayland (deleted)
7f0ca42e8000-7f0ca4bae000 rw-s 00000000 00:01 177320                     /memfd:gdk-wayland (deleted)
7f0ca4bae000-7f0ca5474000 rw-s 00000000 00:01 176334                     /memfd:gdk-wayland (deleted)
7f0ca5474000-7f0ca5d3a000 rw-s 00000000 00:01 175525                     /memfd:gdk-wayland (deleted)
7f0ca5d3a000-7f0ca6600000 rw-s 00000000 00:01 175517                     /memfd:gdk-wayland (deleted)
7f0ca773a000-7f0ca8000000 rw-s 00000000 00:01 175524                     /memfd:gdk-wayland (deleted)
7f0cc4381000-7f0cc47ff000 rw-s 00000000 00:01 175518                     /memfd:wayland-cursor (deleted)
7f0cc66da000-7f0cc67fa000 rw-s 00000000 00:01 175514                     /memfd:wayland-cursor (deleted)


Regards
yang




This bug report was last modified 1 year and 10 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.