From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Carlos O'Donell Newsgroups: gmane.emacs.bugs Subject: bug#43389: 28.0.50; Emacs memory leaks using hard disk all time Date: Fri, 27 Nov 2020 00:04:56 -0500 Organization: Red Hat Message-ID: <60253612-49f0-a1aa-b9e6-39cfef8d62b5@redhat.com> References: <83y2j0qb2v.fsf@gnu.org> <831rgppg3w.fsf@gnu.org> <83zh3czbvz.fsf@gnu.org> <83blfovzxz.fsf@gnu.org> <87o8jnu5f2.fsf@mail.trevorbentley.com> <83o8jmu49z.fsf@gnu.org> <522e3cc0-c563-3308-7264-1b09cd5e264b@redhat.com> <87o8jltglg.fsf@mail.trevorbentley.com> <43b8f55b-d201-76e0-2d19-d97dec8798aa@redhat.com> <87im9ttfeg.fsf@mail.trevorbentley.com> <399d4681-940a-c782-b91e-750e62840cb6@redhat.com> <83pn40qkyb.fsf@gnu.org> <418751f6-41be-a5e2-908a-ea4196d5fb9b@redhat.com> <83y2inq2sp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21870"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 Cc: fweimer@redhat.com, 43389@debbugs.gnu.org, bugs@gnu.support, dj@redhat.com, michael_heerdegen@web.de, trevor@trevorbentley.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 27 06:06:09 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 1kiVxR-0005Ys-Co for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 Nov 2020 06:06:09 +0100 Original-Received: from localhost ([::1]:39784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiVxQ-00058i-1R for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 Nov 2020 00:06:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiVxK-00058b-3C for bug-gnu-emacs@gnu.org; Fri, 27 Nov 2020 00:06:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60155) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kiVxJ-0001Qg-SC for bug-gnu-emacs@gnu.org; Fri, 27 Nov 2020 00:06:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kiVxJ-000396-ML for bug-gnu-emacs@gnu.org; Fri, 27 Nov 2020 00:06:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Carlos O'Donell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Nov 2020 05:06: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.160645350312019 (code B ref 43389); Fri, 27 Nov 2020 05:06:01 +0000 Original-Received: (at 43389) by debbugs.gnu.org; 27 Nov 2020 05:05:03 +0000 Original-Received: from localhost ([127.0.0.1]:43468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kiVwN-00037m-Em for submit@debbugs.gnu.org; Fri, 27 Nov 2020 00:05:03 -0500 Original-Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:42978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kiVwL-00037U-K2 for 43389@debbugs.gnu.org; Fri, 27 Nov 2020 00:05:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606453501; 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=gBJjMMu9yJ0IC2VGHxopM/G1pYKJp9Nvy+4VoWort5o=; b=ELneldNMuGh6WO8vXeJob1UssX2NjdhdyvVR3sm4Qhpj2ez6K8pH8CiDpcF5U66EceNyuJ TIW77NQWDQL5RD/mYD/1InZJ1X6nKTqYAH+Oa61AWz9/aqezOOlHMtlQFO7ZLBe4csuBSW pt2XVyXO7ibp3C7p8Y7Nvki39hsTh9I= Original-Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-424-CZEnYcX4NZa9SgykXRWL7w-1; Fri, 27 Nov 2020 00:04:59 -0500 X-MC-Unique: CZEnYcX4NZa9SgykXRWL7w-1 Original-Received: by mail-qk1-f197.google.com with SMTP id 141so2829058qkh.18 for <43389@debbugs.gnu.org>; Thu, 26 Nov 2020 21:04:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=gBJjMMu9yJ0IC2VGHxopM/G1pYKJp9Nvy+4VoWort5o=; b=c/eEdhTaUx6PZ4cRjdaof47w2Ynu79w3C8CGgSeZ0gqxywap48d/xTHkPptmWcFPru 03Uf6slJNjpvyxNpgYHZI57FB/gMDl4k6EDDkvSUw05O5QLlcEFb7wtJdzgd0/bheh/h dhF8w7oOoSI6diS3MxJZMfEUyhKbpEIImgLbC6SY1EPX9iz3yOs1C9Bzvn7OHZ+SEtXX UEjGPRF9tA5TXI6dv/LLYWqWebLwJnJIAPMnkSIVzxGb4yJcBz8beNrjnVRQwmKvuS2g QyIps+5FZPZTgXpHAwS/onv4d+H1pv/iDb89VLhdoV2rkEDFxnkSpPoUB++D/MP1czYm Pj+g== X-Gm-Message-State: AOAM533Jh3PVFyelFc/WnbmISfPME/iY24tvYVGQe/RMAnu+1OLBHarP Qqe8+iUYOMa8GHN6jlX5qN+KtYZedUuSeMZ6WigbpFfYnMB/qA4SMVQmGQBcT5ZimLU5ZtwCuvm sNJmGkhCWhxpGDgI= X-Received: by 2002:a37:9b01:: with SMTP id d1mr6349181qke.89.1606453498819; Thu, 26 Nov 2020 21:04:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNjJO7Uy3jJ96sooITKh+e+es9hAw2wIWBWleCPXr8Sk2Zw6WgcBUvaZV3cEActIxyQ7j5EQ== X-Received: by 2002:a37:9b01:: with SMTP id d1mr6349160qke.89.1606453498569; Thu, 26 Nov 2020 21:04:58 -0800 (PST) Original-Received: from [192.168.1.16] (198-84-214-74.cpe.teksavvy.com. [198.84.214.74]) by smtp.gmail.com with ESMTPSA id f189sm4794537qkb.84.2020.11.26.21.04.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Nov 2020 21:04:57 -0800 (PST) In-Reply-To: <83y2inq2sp.fsf@gnu.org> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=carlos@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US 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:194390 Archived-At: On 11/26/20 3:30 PM, Eli Zaretskii wrote: >> Cc: trevor@trevorbentley.com, bugs@gnu.support, fweimer@redhat.com, >> 43389@debbugs.gnu.org, dj@redhat.com, michael_heerdegen@web.de >> From: Carlos O'Donell >> Date: Thu, 26 Nov 2020 15:21:04 -0500 >> >> On 11/26/20 8:58 AM, Eli Zaretskii wrote: >>> Apart of that, I think we really need to see the most significant >>> customers of these functions when the memory footprint starts growing >>> fast. >> >> It's in the mastiff captured data. >> >> Of the 1.7GiB it's all in Fcons: >> >> 448.2 MiB: Fmake_list >> 270.3 MiB: in 262 places all over the place (below massif's threshold) >> 704.0 MiB: list4 -> exec_byte_code >> 109.7 MiB: F*_json_read_string_0 -> funcall_subr ... >> 102.2 MiB: Flist -> exec_byte_code ... >> 68.5 MiB: Fcopy_alist -> Fframe_parameters ... > > Thanks. Those are the low-level primitives, they tell nothing about > the Lisp code which caused this much memory allocation. We need > higher levels of callstack, and preferably in Lisp terms. GDB > backtraces would show them, due to tailoring in src/.gdbinit. Sure, let me pick one for you: lisp_align_malloc (alloc.c:1195) Fcons (alloc.c:2694) concat (fns.c:730) Fcopy_sequence (fns.c:598) timer_check (keyboard.c:4395) wait_reading_process_output (process.c:5334) sit_for (dispnew.c:6056) read_char (keyboard.c:2742) read_key_sequence (keyboard.c:9551) command_loop_1 (keyboard.c:1354) internal_condition_case (eval.c:1365) command_loop_2 (keyboard.c:1095) internal_catch (eval.c:1126) command_loop (keyboard.c:1074) recursive_edit_1 (keyboard.c:718) Frecursive_edit (keyboard.c:790) main (emacs.c:2080) There is a 171MiB's worth of allocations in that path. There are a lot of traces ending in wait_reading_process_output that are consuming 50MiB. -- Cheers, Carlos.