From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: vinurs Newsgroups: gmane.emacs.bugs Subject: bug#73204: Tree-sitter in clojure-ts-mode causes memory leak during parsing Date: Fri, 13 Sep 2024 00:21:21 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="66e31506_4a411b16_3c1" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21874"; mail-complaints-to="usenet@ciao.gmane.io" To: 73204@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 12 20:04:23 2024 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 1sooB3-0005Sc-Ei for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 Sep 2024 20:04:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sooAe-0005TH-4H; Thu, 12 Sep 2024 14:03:56 -0400 Original-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 ) id 1sooAc-0005MU-Be for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2024 14:03:54 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sooAc-0007Ui-2R for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2024 14:03:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:From:Date:To:Subject; bh=56sQPLvDmU/mZte+WrjahwXvGtChmB15C4MiVpOTGYU=; b=E3ucbDhw9WLp89X7xgT1/4CF0xsvX2jLXKoxaN9eTUsPMzkd1euMQJpGB+H0UKd6JENGEbG2Pndqxes009Sr2mmcLdhtINi7zChBm49RVIcs1ZYFFVTs6PSdI6qf540Mgnot//I58InaIAFTquLWmQnkHBAM7UtpXMarERRwRYyyYSOH9FXPyT9QMY6ndxrNj7AHMPB7kYXf8NTrbHly+W4XUCTyg2a2fSm57qgY5DnCWseD2wPhkRPgK9AGrwIl692yWm5REkm4kK47pR+k7YP0gnr/q5zOhUvD8rElIHm4+kvSYQxXfgdUVBXs48fNG0jfUyNFs2dK6wJEbLUhxQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sooAk-0000F6-1k for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2024 14:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: vinurs Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Sep 2024 18:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73204 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.1726164198824 (code B ref -1); Thu, 12 Sep 2024 18:04:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Sep 2024 18:03:18 +0000 Original-Received: from localhost ([127.0.0.1]:41883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sooA1-0000D8-MF for submit@debbugs.gnu.org; Thu, 12 Sep 2024 14:03:18 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:43654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1somZv-0002z3-ET for submit@debbugs.gnu.org; Thu, 12 Sep 2024 12:21:56 -0400 Original-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 ) id 1somZn-0005bo-7Y for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2024 12:21:47 -0400 Original-Received: from sender4-op-o15.zoho.com ([136.143.188.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1somZk-0001QX-At for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2024 12:21:46 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1726158092; cv=none; d=zohomail.com; s=zohoarc; b=MHmbaejSbK1BadY/zNpBx9IpMclbKpIBYYeGCLn+Cof7P5ZgvnKgEp8kTcQJ0O6sQk5Gs7k+yYiO5xdyPyvWXwZZomopmpLKsXVUayALj02sW8o3KieBumGmQAi8fzZnUkZAjLd93lq7kxXs/J5Ez5Slcy7BnEEOwC/U1e28YZ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726158092; h=Content-Type:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=56sQPLvDmU/mZte+WrjahwXvGtChmB15C4MiVpOTGYU=; b=i8l9+niUX8mUAf4hUljZfQpJff0Ztx8Vx2S+otJ4x/WEt7Xla9snLQcsBSSYVU+plQUGmI7ZznUrdAXqn2zieic2HFMPXg4w8NwfMyVgGy8UCUANVq1aZwrWoP9rtyWmisb25lS8EsSa9SkY7iRAXVJcSCRbOncYDf3hea+bYbU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=vinurs.me; spf=pass smtp.mailfrom=hi@vinurs.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1726158092; s=zmail; d=vinurs.me; i=hi@vinurs.me; h=Date:Date:From:From:To:To:Message-ID:Subject:Subject:MIME-Version:Content-Type:Message-Id:Reply-To:Cc; bh=56sQPLvDmU/mZte+WrjahwXvGtChmB15C4MiVpOTGYU=; b=OD/M13rSO6qgsjs4+1fUwW3pbSB0arREs1JYUbKeKEfsiwjTPtfNNVlkNg0pQ8cd cAfMITtLuK4xi3Taj6zJ0KTpEhW6zk2tJLUB3snGfecOslkJoRhm1S9Up/zWMTOmLqN hMxZfalW+InfwetrZjK7Qyf+QE4eEdUq9CHxMjSM= Original-Received: by mx.zohomail.com with SMTPS id 1726158091272624.022451906038; Thu, 12 Sep 2024 09:21:31 -0700 (PDT) X-Zoho-Virus-Status: 1 X-Zoho-AV-Stamp: zmail-av-1.3.1/223.982.64 Received-SPF: pass client-ip=136.143.188.15; envelope-from=hi@vinurs.me; helo=sender4-op-o15.zoho.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 12 Sep 2024 14:03:17 -0400 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291637 Archived-At: --66e31506_4a411b16_3c1 Content-Type: multipart/alternative; boundary="66e31506_5bff4eb5_3c1" --66e31506_5bff4eb5_3c1 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I am using the precompiled version from https://emacsformacosx.com/builds= =C2=A0 https://emacsformacosx.com/emacs-builds/Emacs-2024-09-11=5F00-09-10-69e1a= ca041c57ba425425d31471e1c8f86d3bf04-universal.dmg I have chosen the latest Emacs 30 version. The min configuration is as fo= llows: (add-to-list 'treesit-extra-load-path (expand-file-name =22tree-sitter/=22= user-emacs-directory)) (add-to-list 'load-path =22=7E/.emacs.d/site-lisp/clojure-ts-mode=E2=80=9D= )=C2=A0 (require 'clojure-ts-mode)=C2=A0 =C2=A0;; debug=C2=A0 (setq debug-on-quit t) and I only use clojure-ts-mode package cd =7E/.emacs.d/site-lisp git clone https://github.com/clojure-emacs/clojure-ts-mode.git Then, after opening Emacs,=C2=A0 I opened the attached file b.clj, moved to line 57,=C2=A0 and entered the following characters:=C2=A0 (comment At this point, Emacs freezes and becomes unresponsive. I noticed that Ema= cs' memory usage keeps increasing: 2024-09-12 21:12:23: 806624 KB 2024-09-12 21:12:28: 810720 KB 2024-09-12 21:12:33: 829840 KB 2024-09-12 21:12:38: 1582256 KB 2024-09-12 21:12:43: 4678816 KB 2024-09-12 21:12:48: 7831776 KB 2024-09-12 21:12:53: 10982384 KB 2024-09-12 21:12:58: 14140048 KB 2024-09-12 21:13:03: 17296176 KB 2024-09-12 21:13:08: 20440960 KB 2024-09-12 21:13:13: 23583008 KB 2024-09-12 21:13:18: 26726272 KB 2024-09-12 21:13:24: 29857312 KB 2024-09-12 21:13:29: 33011456 KB 2024-09-12 21:13:34: 36156624 KB 2024-09-12 21:13:39: 38685440 KB 2024-09-12 21:13:44: 34858560 KB 2024-09-12 21:13:49: 30892768 KB Then, Emacs eventually gets killed by the system. The bt.log is the information I was able to retrieve ------------ Sincerely, --66e31506_5bff4eb5_3c1 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline