From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Florian Weimer Newsgroups: gmane.emacs.bugs Subject: bug#43389: 28.0.50; Emacs memory leaks Date: Tue, 17 Nov 2020 18:24:50 +0100 Message-ID: <87h7pnkial.fsf@oldenburg2.str.redhat.com> References: <87r1r5428d.fsf@web.de> <874kmcvlbj.fsf@mail.trevorbentley.com> <83imasb0te.fsf@gnu.org> <871rgzvbme.fsf@mail.trevorbentley.com> <83lff6zm8f.fsf@gnu.org> <838sb1rrar.fsf@gnu.org> <87wnylm3sw.fsf@oldenburg2.str.redhat.com> <83r1osq96c.fsf@gnu.org> <87o8jwj646.fsf@oldenburg2.str.redhat.com> <83o8jvrjw7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35526"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: 43389@debbugs.gnu.org, Jean Louis , dj@redhat.com, michael_heerdegen@web.de, Trevor Bentley , carlos@redhat.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 17 18:26:18 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kf4kD-00097c-Ts for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Nov 2020 18:26:17 +0100 Original-Received: from localhost ([::1]:38726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kf4kC-0005La-WB for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Nov 2020 12:26:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kf4j0-0004R6-CF for bug-gnu-emacs@gnu.org; Tue, 17 Nov 2020 12:25:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49521) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kf4j0-0001Xa-0A for bug-gnu-emacs@gnu.org; Tue, 17 Nov 2020 12:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kf4iz-0000sW-Rh for bug-gnu-emacs@gnu.org; Tue, 17 Nov 2020 12:25:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Florian Weimer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Nov 2020 17:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43389 X-GNU-PR-Package: emacs Original-Received: via spool by 43389-submit@debbugs.gnu.org id=B43389.16056339003366 (code B ref 43389); Tue, 17 Nov 2020 17:25:01 +0000 Original-Received: (at 43389) by debbugs.gnu.org; 17 Nov 2020 17:25:00 +0000 Original-Received: from localhost ([127.0.0.1]:32834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kf4iy-0000sE-GH for submit@debbugs.gnu.org; Tue, 17 Nov 2020 12:25:00 -0500 Original-Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kf4ix-0000s7-Ep for 43389@debbugs.gnu.org; Tue, 17 Nov 2020 12:24:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605633899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8DFOG8KLOw3jRNd3d8Hy9U0tVVqR7IYYkW4bbxxvvFI=; b=AW4wu6NZFykxFrMSJ5JlFETvcKZ6WM5+H012aGYFJcPSkQ/D6knJs8+bAiYYBgVJPqsri7 AIGjct/7TLb35S/5lKxLZbxJpJ8po4bjNbr6c5URu+7CbGg+f1bbVBNI4cpJobs+0kg3IL c7rnpHjK/Sap61hG+SZ52afMYoOPvzg= Original-Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-443-fxqLi623Mi2h8R34rCnC5A-1; Tue, 17 Nov 2020 12:24:55 -0500 X-MC-Unique: fxqLi623Mi2h8R34rCnC5A-1 Original-Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 959848030AD; Tue, 17 Nov 2020 17:24:53 +0000 (UTC) Original-Received: from oldenburg2.str.redhat.com (ovpn-113-222.ams2.redhat.com [10.36.113.222]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1424C60C04; Tue, 17 Nov 2020 17:24:51 +0000 (UTC) In-Reply-To: <83o8jvrjw7.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 17 Nov 2020 19:08:24 +0200") X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=fweimer@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193562 Archived-At: * Eli Zaretskii: >> From: Florian Weimer >> Cc: carlos@redhat.com, dj@redhat.com, 43389@debbugs.gnu.org >> Date: Tue, 17 Nov 2020 17:33:13 +0100 >>=20 >> >>=20 >> >> >>=20 >> Total RSS is 1 GiB, but even 1 GiB minus 200 MiB would be excessive. > > Yes, I wouldn't expect to see such a large footprint. How long is > this session running? (You can use "M-x emacs-uptime" to answer > that.) 15 days. >> It's possible to generate such statistics using GDB, by calling the >> malloc_info function. > > Emacs 28 (from the master branch) has recently acquired the > malloc-info command which will emit this to stderr. You can see one > example of its output here: > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D44666#5 > > which doesn't seem to show any significant amounts of free memory at > all? No, these values look suspiciously good. But I seem to have this issue as well=E2=80=94with the 800 MiB that are act= ually in use. The glibc malloc pathological behavior comes on top of that. Is there something comparable to malloc-info to dump the Emacs allocator freelists? > So both known problems seem to be not an issue in your case. What > other reasons could cause that? Large allocations not getting forwarded to mmap, almost all of them freed, but a late allocation remained. This prevents returning memory from the main arena to the operating system. Thanks, Florian --=20 Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243, Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'N= eill