GNU bug report logs - #60653
30.0.50; tree-sitter: `treesit-[explore/inspect]-mode' can leak memory

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Mickey Petersen <mickey@HIDDEN>; dated Sun, 8 Jan 2023 10:46:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 60653 <at> debbugs.gnu.org:


Received: (at 60653) by debbugs.gnu.org; 17 Jan 2023 09:39:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 17 04:39:09 2023
Received: from localhost ([127.0.0.1]:35790 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pHiQv-0000nT-EV
	for submit <at> debbugs.gnu.org; Tue, 17 Jan 2023 04:39:09 -0500
Received: from mail-pj1-f44.google.com ([209.85.216.44]:53184)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1pHiQt-0000n9-Jy
 for 60653 <at> debbugs.gnu.org; Tue, 17 Jan 2023 04:39:08 -0500
Received: by mail-pj1-f44.google.com with SMTP id o13so28281885pjg.2
 for <60653 <at> debbugs.gnu.org>; Tue, 17 Jan 2023 01:39:07 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:cc:date:message-id:subject:mime-version
 :content-transfer-encoding:from:from:to:cc:subject:date:message-id
 :reply-to; bh=hw/S2GwK4yzSCt9jrMyBTrBL6DocwAl+SFBLwBFauso=;
 b=hdl66AaGgYHfWCw6Fcd4EsxIGFMIy6OkSsOzieqPOwVQ+ZHM6FE2+mHs/hbUYorVcm
 vg2arjKdWSYDBt3g/nQAlhzjJF3O0fXGLKi011+VofomtYlIuGtw6dAtbR/Lw6DWdDxt
 HI8Fimol/HnF3r+XIT0gLaNceXNboVNLBKtSA4MmgbF0AuRabqSfqmvUxgzNZXdcdIWZ
 2h80JiAs21Jco04GWB4sYLkm8q/z4kR6N/MDVQMgOcLjxCncYx8WHK8su9XAURmE24+o
 NQoAWW81cqRuEOXmHrunQXgJ/G6/UlaqX5iJqaCUvTETALREggxr5eueLfBXiMntAYbH
 D5gA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:cc:date:message-id:subject:mime-version
 :content-transfer-encoding:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=hw/S2GwK4yzSCt9jrMyBTrBL6DocwAl+SFBLwBFauso=;
 b=mRfR8J38gbf3xcW9vLMGsRr1BUXSvlOkbAG0cG/p1mraAfIn9N1tB1A0KsSrfRK6wf
 cHMJWJe7PA7FrNH6hpKJN7roMpSkzMSQKuMLm/gMlXMrINSQjSctqeSFS+xhiiXtCR9f
 kxtwAJfU6CcbEr97BcfzCrkrlRxfN60LdzGPgIHgQ15SKGnqDFG0MX/miWGnu66psugc
 lL2dUH1q/LgQqpgcc36TD8pvBo769fSD58K9TOJq8ZJQ3UstKpnNvj2y8LURQFp/2gSB
 5ixiL59Q5Dc+KnsBXjkKh7ArMbVfeOYADxCWkommnbhWHHHw6ohNSgmJ4cbO32ZFk8w1
 b38g==
X-Gm-Message-State: AFqh2kol8SHID8gJ+Jya10oF+IASxLfhd14VKUl+U0HvKGNtKM5dpBgb
 mUoMisxYvUcIr+dspLVb5T0tj+Ywr2w=
X-Google-Smtp-Source: AMrXdXsyGUygTlgQNcQJUhMj5uX5XHiOixE6DnazLFvHjNVFOEGh8ssnvPJSuenyvcRaEe1O3whJfg==
X-Received: by 2002:a17:902:6b4b:b0:194:a1f6:65b6 with SMTP id
 g11-20020a1709026b4b00b00194a1f665b6mr3452231plt.41.1673948341885; 
 Tue, 17 Jan 2023 01:39:01 -0800 (PST)
Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com.
 [172.117.161.177]) by smtp.gmail.com with ESMTPSA id
 a14-20020a170902710e00b00194516b2d88sm11466446pll.260.2023.01.17.01.39.01
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 17 Jan 2023 01:39:01 -0800 (PST)
From: Yuan Fu <casouri@HIDDEN>
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
Subject: Re: bug#60653: 30.0.50; tree-sitter: 
 `treesit-[explore/inspect]-mode' can leak memory
Message-Id: <343B471A-78B0-4DEC-90B4-2B6283941F1A@HIDDEN>
Date: Tue, 17 Jan 2023 01:39:00 -0800
To: Mickey Petersen <mickey@HIDDEN>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 60653
Cc: 60653 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Yuan Fu <casouri@HIDDEN> writes:

> Mickey Petersen <mickey@HIDDEN> writes:
>
>> Yuan Fu <casouri@HIDDEN> writes:
>>
>>> Mickey Petersen <mickey@HIDDEN> writes:
>>>
>>>> If you enable either the `treesit-inspect-mode' or
>>>> `treesit-explore-mode' and leave them to their devices, you may =
find
>>>> that through excessive editing, particularly programmatically, that =
it
>>>> can cause memory leaks over time.
>>>>
>>>> I am 90% certain those modes are responsible: if I do not use them,
>>>> then I do not experience these issues. I have had the oomkiller =
reap
>>>> the Emacs process as it simply balloons out of control over time.
>>>
>>> Hmmm, maybe it=E2=80=99s just using a lot of memory. Emacs never =
returns memory
>>> once it allocates them. Are you opening a lot of buffers? A =
tree-sitter
>>> parse tree uses about 10x memory as the source text.
>>>
>>
>> Nah. This VM's got 64 GiB RAM. So that's not it. And my list of open
>> buffers does go up or down a bit, but as I'm working on TS stuff, =
it's
>> mostly the same handful of smallish files.
>>
>> Note that I used the third-party tree-sitter implementation for a =
long
>> time and never encountered this. And it never seems to happen if I
>> leave the explorer/inspect mode off. Note that I do do a lot of =
repeat
>> editing in the ones that have those modes active.
>>
>> There's definitely something going on here, and I wish I had more
>> information to give you, Yuan!
>
> Thank you. I=E2=80=99ll try to figure it out! At this point my guess =
is that
> there=E2=80=99s some leak in the C code which is triggered a lot by
> treesit-explore-mode.

When you observe the memory leak, do you see warnings mentioning pure
storage, etc? I=E2=80=99m asking because we just fixed a bug that =
overflows the
pure space which may or may not be the same bug as this one.

Yuan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60653; Package emacs. Full text available.

Message received at 60653 <at> debbugs.gnu.org:


Received: (at 60653) by debbugs.gnu.org; 10 Jan 2023 03:45:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 09 22:45:23 2023
Received: from localhost ([127.0.0.1]:38463 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pF5Zj-0005fG-2y
	for submit <at> debbugs.gnu.org; Mon, 09 Jan 2023 22:45:23 -0500
Received: from mail-pl1-f182.google.com ([209.85.214.182]:36426)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1pF5Zi-0005ez-56
 for 60653 <at> debbugs.gnu.org; Mon, 09 Jan 2023 22:45:22 -0500
Received: by mail-pl1-f182.google.com with SMTP id w3so11853227ply.3
 for <60653 <at> debbugs.gnu.org>; Mon, 09 Jan 2023 19:45:22 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:cc:date:message-id:subject:mime-version
 :content-transfer-encoding:from:from:to:cc:subject:date:message-id
 :reply-to; bh=gaDyqLJIpWEZjZ38VC59PWEDZGpSQDmNlZjzG5eI3Sg=;
 b=eMbtfr38e3rjHuiWq8FJ/bRHoi9OS/YzelUv/oub30rc2yBwpWYCEAPIY0u/pcfgNb
 RKXvo1sF0dQ8uFgu8BCxyeYhAujykoW3etgUQ61tFsg/Dzq5rU5L8m+s4vr2iAytronE
 lnIF7XApRVDObOsqmYFcZcBDW/NPAP1taKiSYmBawpnxX8GmWfFTlbOalvCQSNp6qyAb
 w8EecHeVGt+cAsa2X/5JkeFekHx9y3XehsNirXyTwqxvRgw+w1PnFnEF+Bo9a6uKJfCs
 /zjZU+1sfUDymXUmYzf6sEkJ6uyW6gNQP6YxkbErq3ZwU/u5H0caE6w8iTdMf57gg7m7
 QZMA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:cc:date:message-id:subject:mime-version
 :content-transfer-encoding:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=gaDyqLJIpWEZjZ38VC59PWEDZGpSQDmNlZjzG5eI3Sg=;
 b=FRjCni+SwYB7oKvHb0evaDQqQNhGUCFcucElEHEApD2e1J3MjFMchcoSFej9yKyR48
 dW1csutr6TDr5xIwBicVVTf1LZRFVnvNkxmDyFc/zRQAEMEn6jkDFIjwiA9RJ3Mw2z0L
 FwwxRo+TZcTW6o75KP8KBt2r8fWY8XrXnES+elq8gmzAzlatDlgOtjx9cNS7jgffRnUC
 PRG580Scw5FZxSzyjIFm43ROW1ERonEXATrn41M66/52HQg3CwBnvJtrzZRNI7RLjUZT
 +HbebG7mLLXG6aiazkko2unE9Mi/Jd2rGSoDRkELqol/9uHEWL4bQcq90Q/NVjowZyN7
 z1jg==
X-Gm-Message-State: AFqh2krloiRdKYV8smY+4JO83rWrSyKLoGNditY3i3bqHIDX7FfURIdT
 yENN8faY82xrwj0cxP8AWz0=
X-Google-Smtp-Source: AMrXdXvSUhyZQbDs+NB3PdAP8cbRxldcXP2FLLzvrS1HUkiu3RPdi+IUJ8W+kSlIVt4iZh/OiO+Y2Q==
X-Received: by 2002:a05:6a20:2a07:b0:af:6d54:239a with SMTP id
 e7-20020a056a202a0700b000af6d54239amr96383155pzh.38.1673322316012; 
 Mon, 09 Jan 2023 19:45:16 -0800 (PST)
Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com.
 [172.117.161.177]) by smtp.gmail.com with ESMTPSA id
 t23-20020aa79477000000b00574e84ed847sm6858966pfq.24.2023.01.09.19.45.15
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 09 Jan 2023 19:45:15 -0800 (PST)
From: Yuan Fu <casouri@HIDDEN>
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
Subject: Re: bug#60653: 30.0.50; tree-sitter: 
 `treesit-[explore/inspect]-mode' can leak memory
Message-Id: <6478F5E8-495A-4ADD-BCB4-7062260938D8@HIDDEN>
Date: Mon, 9 Jan 2023 19:45:14 -0800
To: Mickey Petersen <mickey@HIDDEN>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 60653
Cc: 60653 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Mickey Petersen <mickey@HIDDEN> writes:

> Yuan Fu <casouri@HIDDEN> writes:
>
>> Mickey Petersen <mickey@HIDDEN> writes:
>>
>>> If you enable either the `treesit-inspect-mode' or
>>> `treesit-explore-mode' and leave them to their devices, you may find
>>> that through excessive editing, particularly programmatically, that =
it
>>> can cause memory leaks over time.
>>>
>>> I am 90% certain those modes are responsible: if I do not use them,
>>> then I do not experience these issues. I have had the oomkiller reap
>>> the Emacs process as it simply balloons out of control over time.
>>
>> Hmmm, maybe it=E2=80=99s just using a lot of memory. Emacs never =
returns memory
>> once it allocates them. Are you opening a lot of buffers? A =
tree-sitter
>> parse tree uses about 10x memory as the source text.
>>
>
> Nah. This VM's got 64 GiB RAM. So that's not it. And my list of open
> buffers does go up or down a bit, but as I'm working on TS stuff, it's
> mostly the same handful of smallish files.
>
> Note that I used the third-party tree-sitter implementation for a long
> time and never encountered this. And it never seems to happen if I
> leave the explorer/inspect mode off. Note that I do do a lot of repeat
> editing in the ones that have those modes active.
>
> There's definitely something going on here, and I wish I had more
> information to give you, Yuan!

Thank you. I=E2=80=99ll try to figure it out! At this point my guess is =
that
there=E2=80=99s some leak in the C code which is triggered a lot by
treesit-explore-mode.

Yuan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60653; Package emacs. Full text available.

Message received at 60653 <at> debbugs.gnu.org:


Received: (at 60653) by debbugs.gnu.org; 9 Jan 2023 09:01:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 09 04:01:18 2023
Received: from localhost ([127.0.0.1]:35746 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pEo1u-00068G-0u
	for submit <at> debbugs.gnu.org; Mon, 09 Jan 2023 04:01:18 -0500
Received: from mail-lo2gbr01on2117.outbound.protection.outlook.com
 ([40.107.10.117]:31024 helo=GBR01-LO2-obe.outbound.protection.outlook.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mickey@HIDDEN>) id 1pEo1r-000682-6r
 for 60653 <at> debbugs.gnu.org; Mon, 09 Jan 2023 04:01:17 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=IOGmMp7PzeuBf7Yys/QLZD8+3IBniA/gDXU5AQobZDFcdtz0+P9GXVnUrbXsOYdXT8xlMi/cuL5wANxYJvswBAjL+Gb9gOm98cwSVI0p7hus4rAiFGACh0HX7j/s47+8rmO/+HN1+dxsEwdGzlHxCd8MLwBepYu2zWc4lzdYpMMljclcyD47KS8fiuVrrxCEd/w2rRHL1LwW4u3XbG+FBuf1EwZI0+FSXQ5X05LtSvl2nk6lZReFI8EGwJ62tkEnrHUoB9x+FQprb+Quvq3V9F8j6G6V/ofxT+j70a5uWKaNKJNGN6kdkQZz8qt8J8twBW9oHi/0YSkLqUpdN86uAw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=z7akHWy9/krRAv8NQpGwLBywC0JbZs4CmbTT/RMl0jo=;
 b=WsNOJRliCjiBGN+DGUGRuQWys51fUmUO/R9TtxXtT3w4DVBPsh1B+CLOC89Np4PakpduTN06B0UI8RPZv9pn2aPxIyRyhY7aFf8PSANWD/mmS3dmyY5uuXj6DuLSTs6k0fH9M9uUrTCm2KHCOvCZmgAy/7p9ByzT1BhPDd3FKf1cNX1pmhvxFxVZidqT/zsx36bbWOVkmAiHzMspdiSXWb9dOECtG3H1qc/fdQQtWfuqc3h63F78iNuLR2TzGtPx4YmJcdzCFcQQJE3Dt/5SCNRM1Uo97S97vkutfmdZ4PefnPbkNth3DsMbnztvZNeFnuSL467lM9uwPNN+HNur/A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
 178.79.136.144) smtp.rcpttodomain=debbugs.gnu.org
 smtp.mailfrom=masteringemacs.org; dmarc=pass (p=none sp=none pct=100)
 action=none header.from=masteringemacs.org; dkim=pass (signature was
 verified) header.d=masteringemacs.org; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=semantical.onmicrosoft.com; s=selector1-semantical-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=z7akHWy9/krRAv8NQpGwLBywC0JbZs4CmbTT/RMl0jo=;
 b=0+omRQMJJlYIj3gwPyfW61Szm4WDqnd8gjtDEUg1pUls2euALrxl1joKcucHTdlI1Lb3gmbpciAHqxXJ8G8gYCE9gwSKaGBgtkn+6dQ2ob/nxH9xKyTJVqNgHVrQZ7rjK25canc2tY0WFl2MNHPLHVfcOFUVOUEKiBi3urj8eNA=
Received: from LO4P123CA0313.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:197::12)
 by LO0P265MB6947.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ec::10)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Mon, 9 Jan
 2023 09:01:08 +0000
Received: from CWLGBR01FT042.eop-gbr01.prod.protection.outlook.com
 (2603:10a6:600:197:cafe::ec) by LO4P123CA0313.outlook.office365.com
 (2603:10a6:600:197::12) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18 via Frontend
 Transport; Mon, 9 Jan 2023 09:01:08 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 178.79.136.144)
 smtp.mailfrom=masteringemacs.org; dkim=pass (signature was verified)
 header.d=masteringemacs.org;dmarc=pass action=none
 header.from=masteringemacs.org;
Received-SPF: Pass (protection.outlook.com: domain of masteringemacs.org
 designates 178.79.136.144 as permitted sender)
 receiver=protection.outlook.com; client-ip=178.79.136.144;
 helo=semantical.co.uk; pr=C
Received: from semantical.co.uk (178.79.136.144) by
 CWLGBR01FT042.mail.protection.outlook.com (10.152.40.170) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.5966.17 via Frontend Transport; Mon, 9 Jan 2023 09:01:08 +0000
Received: by semantical.co.uk (Postfix, from userid 5001)
 id 24F3B114002; Mon,  9 Jan 2023 09:01:07 +0000 (GMT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=masteringemacs.org;
 s=masteringemacs.org; t=1673254867;
 bh=z7akHWy9/krRAv8NQpGwLBywC0JbZs4CmbTT/RMl0jo=;
 h=References:From:To:Cc:Subject:Date:In-reply-to:From;
 b=ifoN7t/Fo9OOlk8K1PgNKHnB4Iv38+M1mu0UqUydYwAoyIuIE3ueQA6F75SdyA+jM
 E8sRLQGRE6iHfh63NYrHoZKWQKCv0fMLaBorcp6yPtlHPfFqjgBbKxSdx0ZfR+fqXM
 OFaA/lTt0g1c8yxGDtHrxYU7MZ47GncjjDVqFiDo=
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on semantical.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_RECEIVED,
 NO_RELAYS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no
 version=3.4.2
References: <4B554554-60E0-416A-9F3E-CC704B79CDEC@HIDDEN>
User-agent: mu4e @VERSION@; emacs 30.0.50
From: Mickey Petersen <mickey@HIDDEN>
To: Yuan Fu <casouri@HIDDEN>
Subject: Re: bug#60653: 30.0.50; tree-sitter:
 `treesit-[explore/inspect]-mode' can leak memory
Date: Mon, 09 Jan 2023 08:58:50 +0000
Organization: Mastering Emacs
In-reply-to: <4B554554-60E0-416A-9F3E-CC704B79CDEC@HIDDEN>
Message-ID: <87v8lghyjz.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CWLGBR01FT042:EE_|LO0P265MB6947:EE_
MIME-Version: 1.0
X-MS-Office365-Filtering-Correlation-Id: 3316bcb9-5b05-4b5f-b646-08daf2200c08
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: oI0/NiRV6vwPkj4BpzoZC0mnxji0ofwxG1fsfSYLZVaBKJb0hZxQwGuI1MOYR2TRlzI4pIIXDV0vPVYKpmTRaLIwn7iYKAJFXmNF5aPLEVWy6fA4w1eqkIYIzDWmBaqbNUmAhRzpWk+j7upxjOjc7Lr8OWYnAGtLI3ceYNCeqviLWkAg4AirkoVNHgRtXmONFJPKSWOMEzbmg7VncMBlbMw8h5ponf9kIPkEKk3xebuQSR+Nw/IDRJT5fyEP8UnZgjWT2McwYu3yd4Rjc2uIAVCPMlOGY/taT3Eez78Iidmw76LFQLrGwnh0ZkKjBqp0j/pmjMkvJctahZJKANNRBmXJUd4NtZPoK4+Rp1yMuXldNJ78db9xUOc+vq/rKZZ32sKoOxxEmWOhrn3fnt2x+Nc0vOvdX0VC4NKj90K9SDl8eba4WYP1PZbCqHsjof6uYuNTWy/CJrsy0dxwceTkAE2NVXLXttK4ITf+9tR6Serm6BM4/l7e8YMqvxdyYEUzOOl2y8qynX3CQ8fabQxcmi5yQ8TsvifcAjJG88/F51faD64Q0z/wryzJfVvWIciCZKJ69/QpkXdm/JubPN+oPuw7u6MJai+ghIgu48C9lgH1UJvaowKiAcC6i0xKElAV+iwvd45RoB59MXyIJ+HvvMTTyhEANBDSdIex2URVVZ7tyXzQ/Toof6BcIqq8Ws0x0wiUbaOhIo7aHehA1Or+oB0sWrD5lpcNBFgzqrsP6Zz6Z4W/eYkxKX5Tp/7Ovv4dtHuNHs3k7YDGHDtJc/KXGw==
X-Forefront-Antispam-Report: CIP:178.79.136.144; CTRY:GB; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:semantical.co.uk; PTR:semantical.co.uk; CAT:NONE;
 SFS:(13230022)(346002)(376002)(136003)(39830400003)(396003)(451199015)(36840700001)(46966006)(36860700001)(6666004)(7596003)(7636003)(356005)(2906002)(478600001)(2616005)(26005)(6266002)(186003)(36916002)(5660300002)(40480700001)(316002)(82310400005)(6862004)(8936002)(36756003)(86362001)(42186006)(47076005)(41300700001)(70206006)(8676002)(70586007)(336012)(4326008)(38230200001)(81973001)(14776008)(79816003);
 DIR:OUT; SFP:1102; 
X-OriginatorOrg: masteringemacs.org
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2023 09:01:08.0650 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 3316bcb9-5b05-4b5f-b646-08daf2200c08
X-MS-Exchange-CrossTenant-Id: a4e27e3d-bab0-45e8-8942-e64cf9fbd34f
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a4e27e3d-bab0-45e8-8942-e64cf9fbd34f; Ip=[178.79.136.144];
 Helo=[semantical.co.uk]
X-MS-Exchange-CrossTenant-AuthSource: CWLGBR01FT042.eop-gbr01.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: LO0P265MB6947
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 60653
Cc: 60653 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Yuan Fu <casouri@HIDDEN> writes:

> Mickey Petersen <mickey@HIDDEN> writes:
>
>> If you enable either the `treesit-inspect-mode' or
>> `treesit-explore-mode' and leave them to their devices, you may find
>> that through excessive editing, particularly programmatically, that it
>> can cause memory leaks over time.
>>
>> I am 90% certain those modes are responsible: if I do not use them,
>> then I do not experience these issues. I have had the oomkiller reap
>> the Emacs process as it simply balloons out of control over time.
>
> Hmmm, maybe it=E2=80=99s just using a lot of memory. Emacs never returns =
memory
> once it allocates them. Are you opening a lot of buffers? A tree-sitter
> parse tree uses about 10x memory as the source text.
>

Nah. This VM's got 64 GiB RAM. So that's not it. And my list of open
buffers does go up or down a bit, but as I'm working on TS stuff, it's
mostly the same handful of smallish files.

Note that I used the third-party tree-sitter implementation for a long
time and never encountered this. And it never seems to happen if I
leave the explorer/inspect mode off. Note that I do do a lot of repeat
editing in the ones that have those modes active.

There's definitely something going on here, and I wish I had more
information to give you, Yuan!

> Yuan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60653; Package emacs. Full text available.

Message received at 60653 <at> debbugs.gnu.org:


Received: (at 60653) by debbugs.gnu.org; 9 Jan 2023 03:38:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 08 22:38:58 2023
Received: from localhost ([127.0.0.1]:35370 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pEizx-0001Ai-Ra
	for submit <at> debbugs.gnu.org; Sun, 08 Jan 2023 22:38:58 -0500
Received: from mail-pj1-f54.google.com ([209.85.216.54]:43787)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1pEizw-0001AO-O7
 for 60653 <at> debbugs.gnu.org; Sun, 08 Jan 2023 22:38:57 -0500
Received: by mail-pj1-f54.google.com with SMTP id
 b9-20020a17090a7ac900b00226ef160dcaso6297494pjl.2
 for <60653 <at> debbugs.gnu.org>; Sun, 08 Jan 2023 19:38:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:cc:date:message-id:subject:mime-version
 :content-transfer-encoding:from:from:to:cc:subject:date:message-id
 :reply-to; bh=6pNe1fl4uCP5YLeGVo1U/DFlx5uaR30CkQXmGFxQ7VI=;
 b=MU1QtOW5YrpOejZgGGntEgXr3G11sUgU2due83RtO2X5Ruw5JXZQQdNewpNuAYDjtL
 hyJc5ZLePT5TeMaAWqOcHaUUriN4Q8VpYYWjf94GiPZqYCNRGFY7bPYlDp9tIqQ74ptd
 tsZ1p1HzbWHviWVbLXOX656tMO4uGQ1pnb1I5a3PW6W3DOW3vnaP6WMvwVYQXzHqQ4+E
 M9BaYQgmasA3VfV8UGzhWpQlo86rM4UUzgstdLm1t3C0W5NGT5J4Q++DnkYsfQgiLGW0
 3KraBkZ4pRuUZ2Cj/eseyhJC5qY+uquTfWE9ij2wM3l5XBAFo0H8HbuRsuSnhiXZtn8E
 zwrw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:cc:date:message-id:subject:mime-version
 :content-transfer-encoding:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=6pNe1fl4uCP5YLeGVo1U/DFlx5uaR30CkQXmGFxQ7VI=;
 b=xOXkFSzLD2uegYUkqYGiMgvstAqZfwswebzSVxKv/1mqkTzhyjuPFxX6TmBZ7e3rMN
 l0WvAJYIc+7mO4wrsxuJ0vL91yUm/a/yrMiuvwV9raQZ7s94/5/02VsU/G6IJVtaKxry
 +3FFNRK629BDYEOXYui8eBdb9ME9duQYy/9aTVrSka6iqmhtQN49dgMLmgu2hlKfeE07
 s7wvFc7hkHxrQl2bOyDXAFdfmRvuSFLvMW/KI00fB7zThmbma+hANWBfO3LKRxK9CrXF
 XugwjSaAZa41jtDpS6uFlUwh34hHeuWOG8s4XF7cuqk2pgGTvhuea1TBLBz1KaOqeZWA
 UQJQ==
X-Gm-Message-State: AFqh2kqP06/PBmHCnglcv8TfQnuHeu3N7pdVLFiYqwzIJrNTOIlPcp8l
 E0wnnK/Py/2w5IW1KZTPlSU=
X-Google-Smtp-Source: AMrXdXtpr/GblfU8WkL9SOsry3gTksQUO063W9uzfjlpAeibbFjVXJXfbwfO9kj6ZRt3Co0ztOwQBA==
X-Received: by 2002:a17:902:a40a:b0:192:7363:f6c7 with SMTP id
 p10-20020a170902a40a00b001927363f6c7mr52997118plq.37.1673235530982; 
 Sun, 08 Jan 2023 19:38:50 -0800 (PST)
Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com.
 [172.117.161.177]) by smtp.gmail.com with ESMTPSA id
 h2-20020a170902f7c200b0019327f40bfasm1988633plw.119.2023.01.08.19.38.50
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 08 Jan 2023 19:38:50 -0800 (PST)
From: Yuan Fu <casouri@HIDDEN>
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
Subject: Re: bug#60653: 30.0.50; tree-sitter: 
 `treesit-[explore/inspect]-mode' can leak memory
Message-Id: <4B554554-60E0-416A-9F3E-CC704B79CDEC@HIDDEN>
Date: Sun, 8 Jan 2023 19:38:49 -0800
To: Mickey Petersen <mickey@HIDDEN>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 60653
Cc: 60653 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Mickey Petersen <mickey@HIDDEN> writes:

> If you enable either the `treesit-inspect-mode' or
> `treesit-explore-mode' and leave them to their devices, you may find
> that through excessive editing, particularly programmatically, that it
> can cause memory leaks over time.
>
> I am 90% certain those modes are responsible: if I do not use them,
> then I do not experience these issues. I have had the oomkiller reap
> the Emacs process as it simply balloons out of control over time.

Hmmm, maybe it=E2=80=99s just using a lot of memory. Emacs never returns =
memory
once it allocates them. Are you opening a lot of buffers? A tree-sitter
parse tree uses about 10x memory as the source text.

Yuan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60653; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Jan 2023 10:45:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 08 05:45:03 2023
Received: from localhost ([127.0.0.1]:59983 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pETAk-0003pD-IA
	for submit <at> debbugs.gnu.org; Sun, 08 Jan 2023 05:45:03 -0500
Received: from lists.gnu.org ([209.51.188.17]:60184)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mickey@HIDDEN>) id 1pETAi-0003oW-Sj
 for submit <at> debbugs.gnu.org; Sun, 08 Jan 2023 05:45:01 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mickey@HIDDEN>)
 id 1pETAd-0003EZ-7n
 for bug-gnu-emacs@HIDDEN; Sun, 08 Jan 2023 05:44:56 -0500
Received: from mail-cwlgbr01on2122.outbound.protection.outlook.com
 ([40.107.11.122] helo=GBR01-CWL-obe.outbound.protection.outlook.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mickey@HIDDEN>)
 id 1pETAY-0000JT-Fk
 for bug-gnu-emacs@HIDDEN; Sun, 08 Jan 2023 05:44:51 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=QvZws7SIYJA7/CVWstLd7Ab08vtvIpFZ+jOEnerrqlcHZ1agkEHRlAXsRy0aJCK6CzyLXsx14fkhFtM9aO1ojtEvuYXS63v1TUDf/umYJctjP3X/mSqTGFYHbi+ldQX2eJKEdeV0Fwc3xN0J+6KDEtED+EXm8xTr6HJxMGw8MsZyPx61v2o+FAQAfd7Lds16k0pi1kZAAeThLq7FK3PwnlYyFKMqryz1RJiizEbEbOHymZDPnu1qPLieGCaBH9s2Z/zu0CW+fjOBxBTog6IeXpUw5B7Zdi8BlW/daDQuBzzvFl3MjupQn8D7kBuAOjb9OFnAEIGEqrPIN995AKZHoQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=DKZKRbxsGe7djbKwwZuBAD9AAYkDNZBVLe0AUKRnhNM=;
 b=Qdi4sF9LGr7/CTBRScUm4fQzJuaNyh6N6uZwuL/ocwOhuhPB0X/b+rs21FFU7l2Jq8jmwuidr3zGxJJ/OW8dAFQEXrb2x0HESbJS9UafRH4FgjIfCbca7hcyUAfG7kH3otAJxNhJieDXi/QTchEG8XjG+SQSUstIyR7xmGK7NN1pOiNsrUqklcs5AUy7MzQuRjo/xOSpEkCmE6OkO/Fkz3+My3tvYrpcuqlrCAuTrafWvA7gpM3aaEGhqHJSCCMYKMdyGmVWdZq4qFNQZCxaYQGE10LBJuqOp20gvQeqlpu2Ha1GT1k12Xu2WaJ0PjmEt149kzxODoHo00ccn8Dd2w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
 178.79.136.144) smtp.rcpttodomain=gnu.org smtp.mailfrom=masteringemacs.org;
 dmarc=pass (p=none sp=none pct=100) action=none
 header.from=masteringemacs.org; dkim=pass (signature was verified)
 header.d=masteringemacs.org; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=semantical.onmicrosoft.com; s=selector1-semantical-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=DKZKRbxsGe7djbKwwZuBAD9AAYkDNZBVLe0AUKRnhNM=;
 b=Gi4g9FZxtAAkOdPMXK266xYltOfd7o/8baHfY9C4pE+v3k5JLjHW1J3lz628uG9uBou8asi+aO3tAmdIbOy5+wl5jh96cQGcBFye6E+hah/VCW+GP16od070S62MxYKhg8lEgiJTRNc0s+miLhXLpDc2ibWn4jvdD0ErtEFWbKc=
Received: from LO4P123CA0178.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18a::21)
 by LO0P265MB5191.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:241::6) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Sun, 8 Jan
 2023 10:44:46 +0000
Received: from LO2GBR01FT032.eop-gbr01.prod.protection.outlook.com
 (2603:10a6:600:18a:cafe::d6) by LO4P123CA0178.outlook.office365.com
 (2603:10a6:600:18a::21) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18 via Frontend
 Transport; Sun, 8 Jan 2023 10:44:46 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 178.79.136.144)
 smtp.mailfrom=masteringemacs.org; dkim=pass (signature was verified)
 header.d=masteringemacs.org;dmarc=pass action=none
 header.from=masteringemacs.org;
Received-SPF: Pass (protection.outlook.com: domain of masteringemacs.org
 designates 178.79.136.144 as permitted sender)
 receiver=protection.outlook.com; client-ip=178.79.136.144;
 helo=semantical.co.uk; pr=C
Received: from semantical.co.uk (178.79.136.144) by
 LO2GBR01FT032.mail.protection.outlook.com (10.152.42.159) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.5986.18 via Frontend Transport; Sun, 8 Jan 2023 10:44:46 +0000
Received: by semantical.co.uk (Postfix, from userid 5001)
 id 12E5C114002; Sun,  8 Jan 2023 10:44:46 +0000 (GMT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=masteringemacs.org;
 s=masteringemacs.org; t=1673174686;
 bh=DKZKRbxsGe7djbKwwZuBAD9AAYkDNZBVLe0AUKRnhNM=;
 h=From:To:Subject:Date:From;
 b=Ondhk5RC2ird+3xjfQfadi2EIH+o9s0+IxxjtQUP0dT4xfVBGSccNwKPzt8aEc/2P
 QQjZtM4eZqxUaM7w878WR6e5pa83azYsJjhUPn/5L9BSltE2YuTla8yl/JYR1oJJcP
 gorcZdjbyxQRWQEgyRJJNfY5Ji3jaAowgeTFH1/s=
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on semantical.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00, NO_RECEIVED,
 NO_RELAYS, 
 TO_NO_BRKTS_PCNT,URIBL_BLOCKED autolearn=no autolearn_force=no
 version=3.4.2
From: Mickey Petersen <mickey@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.0.50; tree-sitter: `treesit-[explore/inspect]-mode' can leak memory
Date: Sun, 08 Jan 2023 10:44:44 +0000
Message-ID: <87wn5xjof7.fsf@HIDDEN>
Content-Type: text/plain
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: LO2GBR01FT032:EE_|LO0P265MB5191:EE_
MIME-Version: 1.0
X-MS-Office365-Filtering-Correlation-Id: 54f531a0-1581-467f-00de-08daf1655c22
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: +xFntiTJknGLyIT8dzo7sJXca55Ueuw8288jnRij5TTmNGrt99Ju1PSYE89T2xPiCm7TJJfzTHtUALrNyFLoEhk6AftS9vCFLeuQsAVztL7L/QJEcc04WEvFd+DL7xAj2NV0jfn/NYD8AJ8QeEyQyQtNgv4oy7wlhdD9oSjnKjF8oOKr0kQByGQyImfR3Vw8v55lDQVu1gbcANDM6fVeALtCwQY5YWQ5xXTb9AE0hjjLzWBcfPhVKGzjSfC467/GcD57N4RcgoW2TWWh3QJEU/XxVgHP/fwYuoSK+ZM8ljZQ2R8wMJBKCHu3N8bLN0ldT/9Yf0zPptozsA6K0y3b3aW5v0WO+qXZFz7GsIZUNhp+SiaLTgBttUGaxNlWUJ9OnZvCDIMa/2rO5X+rp+WGCkFGDKn28tvvKkD/40zjR58KBKEoSzgfP0wmGfYzcM9LIWSdFF8MDFZNpF/EOXbYOBr3DDitGKHn1evRfMnHVpEP+YOA4mVKRjZAlK0L+rFVlU7hN3eZ6WuEftmUZxYQlPLEq05p+F0u7QmFC6EhyJL3WJmjro4UsAflz6EzR5I2qJnMDdhXAMfyz41IT8ngp0dnJHey5DDjFkn0FMgNb9meOPY/jeenwWBa6/maCV8vO2VRl4BLixgG/IWEzb88roonC93ucZXuU8ydEaeg2ArBi7OcNsfLCmIDkRxUhY1pq+8ebtpyQtJAGlJVkCC831+2ByVG3la49tyxxzby6FoN3Pc3cGzlbh5fylqc8s9PmlzeQXKwIonQArTSf/E37Q==
X-Forefront-Antispam-Report: CIP:178.79.136.144; CTRY:GB; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:semantical.co.uk; PTR:semantical.co.uk; CAT:NONE;
 SFS:(13230022)(396003)(39830400003)(136003)(376002)(346002)(451199015)(36840700001)(46966006)(36756003)(186003)(8936002)(26005)(6266002)(4744005)(40480700001)(2616005)(5660300002)(8676002)(6916009)(356005)(316002)(86362001)(42186006)(70586007)(478600001)(7596003)(7636003)(41300700001)(70206006)(82310400005)(47076005)(2906002)(336012)(36860700001)(38230200001)(81973001)(14776008)(79816003);
 DIR:OUT; SFP:1102; 
X-OriginatorOrg: masteringemacs.org
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jan 2023 10:44:46.5601 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 54f531a0-1581-467f-00de-08daf1655c22
X-MS-Exchange-CrossTenant-Id: a4e27e3d-bab0-45e8-8942-e64cf9fbd34f
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a4e27e3d-bab0-45e8-8942-e64cf9fbd34f; Ip=[178.79.136.144];
 Helo=[semantical.co.uk]
X-MS-Exchange-CrossTenant-AuthSource: LO2GBR01FT032.eop-gbr01.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: LO0P265MB5191
Received-SPF: pass client-ip=40.107.11.122;
 envelope-from=mickey@HIDDEN;
 helo=GBR01-CWL-obe.outbound.protection.outlook.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)


If you enable either the `treesit-inspect-mode' or `treesit-explore-mode' and leave them to their devices, you may find that through excessive editing, particularly programmatically, that it can cause memory leaks over time.

I am 90% certain those modes are responsible: if I do not use them, then I do not experience these issues. I have had the oomkiller reap the Emacs process as it simply balloons out of control over time.





In GNU Emacs 30.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version
 3.24.20, cairo version 1.16.0) of 2023-01-02 built on mickey-work
Repository revision: c209802f7b3721a1b95113290934a23fee88f678
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: Ubuntu 20.04.3 LTS

Configured using:
 'configure --with-native-compilation --with-json --with-mailutils
 --without-compress-install --with-imagemagick CC=gcc-10'





Acknowledgement sent to Mickey Petersen <mickey@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#60653; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 17 Jan 2023 09:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.