Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

memory leaks

11 views
Skip to first unread message

Madhu

unread,
Sep 20, 2019, 3:43:02 AM9/20/19
to help-gn...@gnu.org

There is obviously some memory leak in emacs and I don't know how to
trace the culprit. Emacs lops up 2GB RSS: ps axuw |grep emacs

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
madhu 5434 6.9 54.2 2235612 2115564 ? SNsl Sep19 66:42 emacs --daemon --debug-init

(garbage-collect) shows

((conses 16 981544 136697)
(symbols 48 56864 5)
(strings 32 312273 12669)
(string-bytes 1 18002558)
(vectors 16 68285)
(vector-slots 8 1780950 150102)
(floats 8 1089 2405)
(intervals 56 6605 2469)
(buffers 992 79))

So does this look like a X fonts issue? How can I figure out which
package is the culprit.

1. Emacs has a bug where I can't look at /proc/5434/emacs from within
emacs it will only read 16384 bytes from the proc filesystem

2. Trying to Unload a feature hits all sorts of design and
implementation bugs with the cl-generics scourge which is unfortunately
used to implement emacs. Is unloading features likely to help at all in
reducing the memory and getting a clue about the errant package?





Jean-Christophe Helary

unread,
Sep 20, 2019, 4:01:01 AM9/20/19
to Help Gnu Emacs mailing list
I had something similar happening the other day and Eli told me it was probably fixed with some code recently committed to master. Have you tried a recent build ?

Jean-Christophe Helary

> On Sep 20, 2019, at 16:23, Madhu <eno...@meer.net> wrote:
>
>
> There is obviously some memory leak in emacs and I don't know how to
> trace the culprit. Emacs lops up 2GB RSS: ps axuw |grep emacs
>
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> madhu 5434 6.9 54.2 2235612 2115564 ? SNsl Sep19 66:42 emacs --daemon --debug-init

Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune



Eli Zaretskii

unread,
Sep 20, 2019, 4:11:12 AM9/20/19
to help-gn...@gnu.org
> From: Madhu <eno...@meer.net>
> Date: Fri, 20 Sep 2019 12:53:46 +0530
>
>
> There is obviously some memory leak in emacs and I don't know how to
> trace the culprit. Emacs lops up 2GB RSS: ps axuw |grep emacs
>
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> madhu 5434 6.9 54.2 2235612 2115564 ? SNsl Sep19 66:42 emacs --daemon --debug-init

Which version of Emacs? If this is a development snapshot, when was
it built?

> 1. Emacs has a bug where I can't look at /proc/5434/emacs from within
> emacs it will only read 16384 bytes from the proc filesystem

Please report as a bug using "M-x report-emacs-bug".

> 2. Trying to Unload a feature hits all sorts of design and
> implementation bugs with the cl-generics scourge which is unfortunately
> used to implement emacs. Is unloading features likely to help at all in
> reducing the memory and getting a clue about the errant package?

Likewise.

Madhu

unread,
Sep 20, 2019, 4:54:02 AM9/20/19
to help-gn...@gnu.org
* Eli Zaretskii <mailman.572.156896706...@gnu.org> :
Wrote on Fri, 20 Sep 2019 11:11:11 +0300:

>> From: Madhu <eno...@meer.net>
>> Date: Fri, 20 Sep 2019 12:53:46 +0530
>> There is obviously some memory leak in emacs and I don't know how to
>> trace the culprit. Emacs lops up 2GB RSS: ps axuw |grep emacs
>>
>> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
>> madhu 5434 6.9 54.2 2235612 2115564 ? SNsl Sep19 66:42 emacs
>> --daemon --debug-init
>
> Which version of Emacs? If this is a development snapshot, when was
> it built?

Sorry I neglected to include that info: it is master from around
20-Aug-2019: (commit 08d7cab)

GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw scroll
bars) of 2019-08-20

If there isn't a known problem I'd still appreciate a clue or two in
trying to figure out what the problem is.


Eli Zaretskii

unread,
Sep 20, 2019, 5:23:22 AM9/20/19
to help-gn...@gnu.org
> From: Madhu <eno...@meer.net>
> Date: Fri, 20 Sep 2019 14:01:05 +0530
>
> >> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> >> madhu 5434 6.9 54.2 2235612 2115564 ? SNsl Sep19 66:42 emacs
> >> --daemon --debug-init
> >
> > Which version of Emacs? If this is a development snapshot, when was
> > it built?
>
> Sorry I neglected to include that info: it is master from around
> 20-Aug-2019: (commit 08d7cab)

Then what you see is almost certainly a problem with GC that has been
solved recently. Update from Git and rebuild.

Madhu

unread,
Sep 12, 2020, 8:58:52 AM9/12/20
to

* Eli Zaretskii <mailman.578.156897139...@gnu.org> :
Wrote on Fri, 20 Sep 2019 12:21:23 +0300:
One year on I'm having the same problems on master (and I've been
noticing it for a few months now)

virtual memory reports 2.9G resident 2.5G shared 10.9M.

$ ps o pid,rss,drs,sz,share,start_time,vsize,cmd 26285

PID RSS DRS SIZE - START VSZ CMD
26285 2643236 2996379 2664940 - Sep09 2998948 /7/gtk/emacs/build-xt-xft/src/emacs --debug-init --daemon

GC reports
Memory information:
((conses 16 3591911 2541685)
(symbols 48 87049 452)
(strings 32 528119 452566)
(string-bytes 1 30189681)
(vectors 16 217149)
(vector-slots 8 3232842 6057920)
(floats 8 1637 5252)
(intervals 56 501483 50429)
(buffers 992 581))

which is a small fraction of what emacs is using.

This is on a recent emacs from master
In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d
scroll bars) of 2020-09-06 built on maher
Base Repository revision: 6fc502c1ef327ab357c971b9bffbbd7cb6a436f1
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000


Perhaps there is already a bug report for this on debbugs?
0 new messages