From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Joseph Mingrone Newsgroups: gmane.emacs.bugs Subject: bug#37006: 27.0.50; garbage collection not happening after 26de2d42 Date: Mon, 12 Aug 2019 11:34:18 -0300 Message-ID: <868srysb9x.fsf@phe.ftfl.ca> References: <5075406D-6DB8-4560-BB64-7198526FCF9F@acm.org> <83h86nu0pq.fsf@gnu.org> <86pnlbphus.fsf@phe.ftfl.ca> <83a7cft8qx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="92443"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (berkeley-unix) Cc: mattiase@acm.org, eggert@cs.ucla.edu, 37006@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 12 16:35:21 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hxBPs-000Nsh-Rg for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Aug 2019 16:35:21 +0200 Original-Received: from localhost ([::1]:46070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hxBPr-0003tR-UW for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Aug 2019 10:35:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35401) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hxBPc-0003tG-Nw for bug-gnu-emacs@gnu.org; Mon, 12 Aug 2019 10:35:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hxBPa-0000I7-O1 for bug-gnu-emacs@gnu.org; Mon, 12 Aug 2019 10:35:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38467) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hxBPa-0000Hz-BS for bug-gnu-emacs@gnu.org; Mon, 12 Aug 2019 10:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hxBPa-0000xI-6k for bug-gnu-emacs@gnu.org; Mon, 12 Aug 2019 10:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Joseph Mingrone Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Aug 2019 14:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37006 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 37006-submit@debbugs.gnu.org id=B37006.15656204703630 (code B ref 37006); Mon, 12 Aug 2019 14:35:02 +0000 Original-Received: (at 37006) by debbugs.gnu.org; 12 Aug 2019 14:34:30 +0000 Original-Received: from localhost ([127.0.0.1]:47288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hxBP3-0000wU-UN for submit@debbugs.gnu.org; Mon, 12 Aug 2019 10:34:30 -0400 Original-Received: from mail-qt1-f169.google.com ([209.85.160.169]:35106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hxBP1-0000wG-AG for 37006@debbugs.gnu.org; Mon, 12 Aug 2019 10:34:27 -0400 Original-Received: by mail-qt1-f169.google.com with SMTP id u34so3688518qte.2 for <37006@debbugs.gnu.org>; Mon, 12 Aug 2019 07:34:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ftfl.ca; s=google; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Y6r/owwUTf9wjADm6W92GeOotxDw+6CboKF7B1mFarA=; b=NbFGwRzMTvd6V6gysPSt3zLv14dzNKW6QqRR0B5sC1nvFo0vIwDVx3CqqWKRVB3fN4 RLC+N92abDMegyH05QKc9vrIB8g0hnaPzkp/kIFJCbD3Ujf8/6nsZXpqhe8xDTblvZh+ vBryT4NpjMUF0+KfvPEv2l4+cvfzUqzU2QOjM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Y6r/owwUTf9wjADm6W92GeOotxDw+6CboKF7B1mFarA=; b=ZzWJ36U3JkiDqgYmQyH422R8BPJHlSpHCU13KnSZQmv/Dix6azbkEtqI2YD15h6z9w 9aZlABgsX2FVHq9yJdRCmh6V8w9lrMG7mqGrYbZrOci+HyyXGJOUIv4LTujnYXGSKs5+ D/zgRMPwmAWE2ST7U1E1nZhiEsrWAewvZdfrj2BbYN6yzSj9udGWfV03DeN2spD7F4zv uurHBPygO1BuPR390Fc420XB6rp4AQDUP7hUuuoFhEPBmh+li4LQCM2YXvBYoPoa1IQg az1DpPTx5RMMPy7YduXiwkNg5BvWyGgMmj/mjWRpOsbMxRssS6o/96ErvXSC4Xs/B3RA xbfQ== X-Gm-Message-State: APjAAAU0BX0x21ooJ8B0c437xgC5W96sevTq+sCdmZiqgHeYDEDFulhP dWhjVRx12T4Nr1jKYTbftnjqbOJ4ygU= X-Google-Smtp-Source: APXvYqziAG+2GufOhHlGOY5IeFaEYTWQbCzw1snapU3GpyjDZSh6KWMezU07Kx1FMHM1nTneYxbJHQ== X-Received: by 2002:ac8:67c7:: with SMTP id r7mr6008039qtp.78.1565620461280; Mon, 12 Aug 2019 07:34:21 -0700 (PDT) Original-Received: from phe.ftfl.ca.ftfl.ca (drmons0544w-142-167-140-18.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.167.140.18]) by smtp.gmail.com with ESMTPSA id t76sm48169295qke.79.2019.08.12.07.34.19 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 12 Aug 2019 07:34:19 -0700 (PDT) In-Reply-To: <83a7cft8qx.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 12 Aug 2019 05:31:18 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:164914 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> From: Joseph Mingrone >> Cc: Mattias Engdeg=C3=A5rd , >> 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. =2D--------------------------------------------------- (setq gc-cons-threshold most-positive-fixnum) ;; contents of init.el here (setq gc-cons-threshold 800000) ;; default value =2D--------------------------------------------------- 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. =2D- Joseph --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKgBAEBCgCKFiEEVbCTpybDiFVxIrrVNqQMg7DW754FAl1ReOpfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDU1 QjA5M0E3MjZDMzg4NTU3MTIyQkFENTM2QTQwQzgzQjBENkVGOUUMHGpybUBmdGZs LmNhAAoJEDakDIOw1u+eZIoP/jUm0zVwfFetu294y55U04IEmr/pZlu6+vDmIW75 rK+bm2SCVspM/ioh2VB0pvQK8WY0UKuNMkj2p028Y9RGzUQ82AQxRK7b+UiF5d41 2Zj7fDuIKc+FQeXzgdfUNn11Iy4Y4TlWHbZVn9A9qZuafaZ4SlWmjoZ/Vp/r8n2A Dkqk0jUlZQw414FW/fk1zf7Bu1vz2UL+Un+EaaoLaDPofAGjXdZJKPh+Des5452M blLBufoAX2+upg0T89RjTPhcms2st4Lf30QVuOsW+bvB5/3+8vRN5fH1l4usYSgL 1UQaqrp1H8LBMhpqI12abIs4tSBfuk4fj7YBsvogM0X6hhOfwGFKFNYCTBaZorUy mCkvaYdI+xAMS2AYnHUrKEzeCSchuUS5yxp4BpQZn4+q/G6OXHyBtL52e9GDI4Vk zPzw9JzRYPFG3R6k6QVG1JVExRzw9fOKr4N+GHPA5bTpA1/wFtbiAOfIe9E1XH+v nH9TUXr0AtCgR1NyZan45Cn6o0vIrriHVGSBgcvItGayDM6NXSZNji0Rf0aaEwDA zFoBjr6PBoaZec0bO8q1Q4q0pPxPqEegARROesjRM3MjxvmzTmHlCNE12lW3BrHo FkCLh5U3RVAX+2QXB+rqJcZDkkieziwJqfg/AhgQ9jCew30qCym7E9jWqpIkbSZC LUL4 =xDb9 -----END PGP SIGNATURE----- --=-=-=--