From: Joseph Mingrone <jrm@ftfl.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: mattiase@acm.org, eggert@cs.ucla.edu, 37006@debbugs.gnu.org
Subject: bug#37006: 27.0.50; garbage collection not happening after 26de2d42
Date: Mon, 12 Aug 2019 11:34:18 -0300 [thread overview]
Message-ID: <868srysb9x.fsf@phe.ftfl.ca> (raw)
In-Reply-To: <83a7cft8qx.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 12 Aug 2019 05:31:18 +0300")
[-- Attachment #1: Type: text/plain, Size: 2670 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Joseph Mingrone <jrm@ftfl.ca>
>> Cc: Mattias Engdegård <mattiase@acm.org>,
>> eggert@cs.ucla.edu
>> Date: Sun, 11 Aug 2019 17:28:11 -0300
>> > Thanks, I fixed this slightly differently, in a way that makes it more
>> > explicit why we need a non-trivial code there. Joseph, please see if
>> > the latest master fixes the problem.
>> > (IMNSHO, this issue makes INT_ADD_WRAPV and friends unsafe; at the
>> > very least this caveat should be prominently documented in Gnulib's
>> > intprops.h.)
>> I have been running 94644d8 for the past hour or so and resident
>> memory for the Emacs process is up over 1300 MB. Also with
>> `garbage-collection-messages' set to t, I do not see any messages
>> about garbage collection.
> Are you saying that the fix didn't solve the problem for you? I
> definitely saw a lot of GC messages after the fix where I didn't
> before. For example, if you visit xdisp.c from the Emacs sources and
> page through it with C-v, don't you see a lot of GC messages?
>> I should also add that after my initial report, running 26de2d42, I
>> did eventually start seeing garbage collection messages and the
>> memory usage stopped increasing. Something must have triggered
>> garbage collection to start again.
> After a lot of consing, the GC would come back for a while, until it
> would be effectively disabled again by some opportune code path.
> If you see no GC messages for a long time, attach a debugger and look
> at the value of consing_until_gc. If its value is huge, around
> LONG_MAX, the problem is still not completely solved.
The fix did not initially work for me. I tested a bit more. With
1. emacs -Q
2. (setq garbage-collection-messages t)
3. page through xdisp.c
I saw lots of garbage collection messages. But, with my init.el there
were no such messages. My init.el looked like this.
----------------------------------------------------
(setq gc-cons-threshold most-positive-fixnum)
;; contents of init.el here
(setq gc-cons-threshold 800000) ;; default value
----------------------------------------------------
When I removed the surrounding setqs, garbage collection message were
shown again when paging through xdisp.c.
I assume that temporarily setting `gc-cons-threshold' to a large number
to temporarily prevent garbage collection, then setting it back to a
reasonable value should be acceptable. Help for `gc-cons-threshold'
says
By binding this temporarily to a large number, you can effectively
prevent garbage collection during a part of the program.
--
Joseph
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 979 bytes --]
next prev parent reply other threads:[~2019-08-12 14:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5075406D-6DB8-4560-BB64-7198526FCF9F@acm.org>
2019-08-11 16:23 ` bug#37006: 27.0.50; garbage collection not happening after 26de2d42 Mattias Engdegård
2019-08-11 17:07 ` Eli Zaretskii
[not found] ` <83h86nu0pq.fsf@gnu.org>
[not found] ` <86pnlbphus.fsf@phe.ftfl.ca>
2019-08-12 2:31 ` Eli Zaretskii
2019-08-12 14:34 ` Joseph Mingrone [this message]
2019-08-12 16:49 ` Eli Zaretskii
2019-08-12 17:00 ` Mattias Engdegård
2019-08-13 15:37 ` Eli Zaretskii
2019-08-13 16:48 ` Mattias Engdegård
2019-08-13 17:04 ` Eli Zaretskii
2019-08-13 17:29 ` Mattias Engdegård
2019-08-13 17:21 ` Paul Eggert
2019-08-13 17:53 ` Eli Zaretskii
2019-08-13 19:32 ` Paul Eggert
2019-08-14 16:06 ` Eli Zaretskii
2019-08-15 1:37 ` Paul Eggert
2019-08-15 14:17 ` Eli Zaretskii
2019-08-15 18:51 ` Paul Eggert
2019-08-15 19:34 ` Eli Zaretskii
2019-09-14 7:51 ` Paul Eggert
2019-09-14 8:30 ` Eli Zaretskii
2019-08-11 12:39 Joseph Mingrone
2019-08-11 15:13 ` Eli Zaretskii
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=868srysb9x.fsf@phe.ftfl.ca \
--to=jrm@ftfl.ca \
--cc=37006@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=eliz@gnu.org \
--cc=mattiase@acm.org \
/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.