all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yang Yingchao via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 70352@debbugs.gnu.org, yang.yingchao@qq.com
Subject: bug#70352: 29.3.50; emacs-pgtk: possible leak of virtual memory
Date: Fri, 12 Apr 2024 18:56:17 +0800	[thread overview]
Message-ID: <tencent_AC348FBAF8F1C87A04D8B78F0A853E75A409@qq.com> (raw)



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@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@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@tbook in /proc/400602  [18:41:26]
$ cat /proc/400602/maps| grep /memfd: | wc -l
7
# yyc@tbook in /proc/400602  [18:41:41]
$ cat /proc/400602/maps| grep /memfd: | wc -l
9
# yyc@tbook in /proc/400602  [18:41:46]
$ cat /proc/400602/maps| grep /memfd: | wc -l
10
# yyc@tbook in /proc/400602  [18:41:51]
$ cat /proc/400602/maps| grep /memfd: | wc -l
10
# yyc@tbook in /proc/400602  [18:41:56]
$ cat /proc/400602/maps| grep /memfd: | wc -l
12
# yyc@tbook in /proc/400602  [18:42:01]
$ cat /proc/400602/maps| grep /memfd: | wc -l
12
# yyc@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






             reply	other threads:[~2024-04-12 10:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12 10:56 Yang Yingchao via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-04-13  1:55 ` bug#70352: 29.3.50; emacs-pgtk: possible leak of virtual memory Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-13  7:15   ` Eli Zaretskii
2024-04-13 10:59     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-13 12:02       ` Eli Zaretskii
2024-04-14  0:11         ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]         ` <87sezozttr.fsf@>
2024-04-14  0:59           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-14  5:48             ` Eli Zaretskii
2024-04-14  6:28               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-14  7:31                 ` Eli Zaretskii
     [not found]                   ` <699acc927ca7decaaac0d06a59c80426bb9ae3059c3eebd7cced56cb021310bf@mu.id>
     [not found]                     ` <871q7argry.fsf@qq.com>
2024-04-15  1:36                       ` bug#70352: Fwd: " Yang Yingchao via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]                     ` <db6105b7ec2a3d0db0d1741e43bea07e1ca0a8e2e7f360933771f524e9266d13@mu.id>
2024-04-15  1:58                       ` Yang Yingchao via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]                       ` <87wmoz75g4.fsf@qq.com>
2024-04-17  7:30                         ` Yang Yingchao via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-27  8:32                           ` Eli Zaretskii
2024-04-29  8:45                             ` Yang Yingchao via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-29 11:46                               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-29 12:27                                 ` Yang Yingchao via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-09  7:35                                   ` Eli Zaretskii
2024-05-10  0:00                                     ` Yang Yingchao via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10  6:34                                       ` Eli Zaretskii
2024-05-10 20:34                                 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10 20:34                                 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]                                 ` <87h6f5h0cw.fsf@>
2024-05-11  0:23                                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-14  3:05         ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_AC348FBAF8F1C87A04D8B78F0A853E75A409@qq.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=70352@debbugs.gnu.org \
    --cc=yang.yingchao@qq.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.