Subject: bug#73204: closed (Re: bug#73204: Tree-sitter in clojure-ts-mode causes memory leak during parsing)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 28 Sep 2024 08:53:02 +0000

Your bug report

#73204: Tree-sitter in clojure-ts-mode causes memory leak during parsing

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
73204: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73204
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#73204: Tree-sitter in clojure-ts-mode causes memory leak during parsing
From: Eli Zaretskii <[email-masked]>
To: vinurs <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Sat, 28 Sep 2024 11:51:59 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Cc: [email-masked]
> Date: Sat, 14 Sep 2024 17:14:59 +0800
> From: vinurs <[email-masked]>
> 
> Hi,
> Thank you for your fix! I just compiled the latest Emacs-30 code and tested several files that had problems
> before. It’s working very well so far.
> 
> ------------
> 
> Sincerely,
> 
> Haiyuan Zhang, Vinurs
> 
> BinaryBrain LLC

Thanks, so I'm now closing this bug.

Subject: Tree-sitter in clojure-ts-mode causes memory leak during parsing
From: vinurs <[email-masked]>
To: [email-masked]
Date: Fri, 13 Sep 2024 00:21:21 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

I am using the precompiled version from https://emacsformacosx.com/builds 

https://emacsformacosx.com/emacs-builds/Emacs-2024-09-11_00-09-10-69e1aca041c57ba425425d31471e1c8f86d3bf04-universal.dmg

I have chosen the latest Emacs 30 version. The min configuration is as follows:

(add-to-list 'treesit-extra-load-path (expand-file-name "tree-sitter/" user-emacs-directory))
(add-to-list 'load-path "~/.emacs.d/site-lisp/clojure-ts-mode”) 
(require 'clojure-ts-mode) 
 ;; debug 
(setq debug-on-quit t)

and I only use clojure-ts-mode package

cd ~/.emacs.d/site-lisp
git clone https://github.com/clojure-emacs/clojure-ts-mode.git

Then, after opening Emacs, 
I opened the attached file b.clj, moved to line 57, 
and entered the following characters: 
(comment

At this point, Emacs freezes and becomes unresponsive. I noticed that Emacs' 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,