Subject: Re: bug#73310: tree-sitter makes cpu 100%

From: Yuan Fu <[email-masked]>
Date: Fri, 20 Dec 2024 01:14:04 -0800

> On Dec 20, 2024, at 12:37 AM, Eli Zaretskii <[email-masked]> wrote:
> 
>> From: Yuan Fu <[email-masked]>
>> Date: Fri, 20 Dec 2024 00:25:23 -0800
>> Cc: Eli Zaretskii <[email-masked]>,
>> [email-masked]
>> 
>> 
>> 
>>> On Dec 19, 2024, at 1:34 PM, vinurs <[email-masked]> wrote:
>>> 
>>> Hi,
>>> I tried version 0.25.0, and using the same method it doesn't always reproduce the issue, but it still hangs. On the same line, if I repeatedly delete and press space, it also hangs. I just haven't found a consistent way to reproduce it yet.
>> 
>> Thanks. That’s bad news. I’ll also see if I can modify my C program to reproduce this.
> 
> Can we have a GDB backtrace when Emacs freezes like that?  If the
> freeze is inside tree-sitter, maybe build that with debug symbols, so
> that GDB shows information inside the library, and we could then try
> to figure out what causes this.

It’s almost certainly tree-sitter. And it’s unlikely for us to find the cause of the hang without considerable knowledge of tree-sitter internals.

Anyway, I’ll start with reproducing it reliably.

Yuan