GNU bug report logs - #77240
30.1; Native-comp causing large memory leak

Previous Next

Package: emacs;

Reported by: N Winkel <nw1905 <at> outlook.com>

Date: Mon, 24 Mar 2025 16:46:02 UTC

Severity: normal

Found in version 30.1

Full log


Message #47 received at 77240 <at> debbugs.gnu.org (full text, mbox):

From: N Winkel <nw1905 <at> outlook.com>
To: Andrea Corallo <acorallo <at> gnu.org>
Cc: martin rudalics <rudalics <at> gmx.at>, Eli Zaretskii <eliz <at> gnu.org>,
 77240 <at> debbugs.gnu.org
Subject: Re: bug#77240: 30.1; Native-comp causing large memory leak
Date: Tue, 1 Apr 2025 00:25:03 +0200
[Message part 1 (text/plain, inline)]
On 31/03/2025 15:23, Andrea Corallo wrote:
> I think the expected observation would be like:
>
> 1- you have your Emacs process X running, there the mem consumption is
> normal.
>
> 2- you observe a process Y (child of X) which is another Emacs, this one
> is the one doing the actual compilation and is supposed to be the one
> going overboard with memory allocation.
I do see that, however once compilation is done that process is stopped,
releasing that memory, but the main process keeps steadily increasing its
usage (along with cpu usage remaining).
> Profiling memory allocation in process Y should reveal who it's actually
> allocating.
I wasn't sure what "profiling memory allocation" meant, so after a quick
search I found 'heaptrack', which appears to do that? I've attached the
produced file from it after causing the leak and waiting for it to reach
1G of used memory.
From what I can read from the summary, the leak comes from a "location"
it describes as "<unresolved function> in emacs-30.1", which produces
most of the memory leak which appears to be in hundreds of thousands of
allocations of 1.0K and around that.
It also shows a contribution by "libglib-2.0.so.0", which is also
hundreds of thousands of allocations, but only around 5M total, so
entirely irrelevant… There is also a leak of 75.4M from "xrealloc",
which I assume is the compilation.
Is that helpful? I could also try another utility if that'd be better.

  N
[heaptrack.emacs.93341.zst (application/zstd, attachment)]

This bug report was last modified 138 days ago.

Previous Next


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