From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Wilhelm Kirschbaum Newsgroups: gmane.emacs.bugs Subject: bug#72863: 30.0.50; tree-sitter elixir-ts-mode hangs and memory leak on some elixir and heex code Date: Wed, 4 Sep 2024 08:39:45 +0200 Message-ID: References: <94F9A716-7D86-42F9-A010-54501ACF9AF8@ssbb.me> <861q27hq4a.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000003eaf0f0621457125" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26111"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 72863@debbugs.gnu.org, mail@ssbb.me To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 04 08:42:20 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 1sljic-0006cM-Tc for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Sep 2024 08:42:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sljiN-0002kt-MZ; Wed, 04 Sep 2024 02:42:03 -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 1sljiK-0002kh-SU for bug-gnu-emacs@gnu.org; Wed, 04 Sep 2024 02:42:00 -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 1sljiJ-0008UE-06 for bug-gnu-emacs@gnu.org; Wed, 04 Sep 2024 02:41:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=TK7VdQxlHQbYeFLdNpgXxxkdzw43kadI8KJHnVzWv/U=; b=Z+e4YCwrZqUVNChDVlC7gq+U2UffV88W/4G2T/Vaci1CIid4QfSI0NnpFF/txd8ZRn5i6cMgO+Yz0W6T/ztRJm2sD8cBK+uZvrwh6ufyDF82EAWgRKfXlvPVfzIsIqpC5dbXmZsGbXa2D9C3W67ZgstDka49IbGTpWKuszpVucwhRepqbAAqDo4i8kRk3skza0hfuuc2yorj7q4ADEN9tSnTsFv6086qEXz2izDRDrrNo1M1iAIdhcGmpSn1q4awkr93mG64sv9PYmF2phnDHzyE5s4euF1BV9itFNbjOx6W/8J9smvteFpoNIe8S74pUupSHPuMr4UjU1S+oaDLDA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sljjK-0006ua-5m for bug-gnu-emacs@gnu.org; Wed, 04 Sep 2024 02:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Wilhelm Kirschbaum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Sep 2024 06:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72863 X-GNU-PR-Package: emacs Original-Received: via spool by 72863-submit@debbugs.gnu.org id=B72863.172543212926495 (code B ref 72863); Wed, 04 Sep 2024 06:43:02 +0000 Original-Received: (at 72863) by debbugs.gnu.org; 4 Sep 2024 06:42:09 +0000 Original-Received: from localhost ([127.0.0.1]:33180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sljiT-0006tG-3I for submit@debbugs.gnu.org; Wed, 04 Sep 2024 02:42:09 -0400 Original-Received: from mail-qt1-f170.google.com ([209.85.160.170]:57644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sljiP-0006sd-Lp for 72863@debbugs.gnu.org; Wed, 04 Sep 2024 02:42:06 -0400 Original-Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-4568571de47so30400391cf.3 for <72863@debbugs.gnu.org>; Tue, 03 Sep 2024 23:41:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725431997; x=1726036797; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=TK7VdQxlHQbYeFLdNpgXxxkdzw43kadI8KJHnVzWv/U=; b=cc8v0nUZwumoHQ+/rWrmh2VKA92uys0nN9u7JKguaiQv4ce1WrqMBjLBYHMZsxRJ8x Do19BZ4Jc6nMbSujbqXcJvtoFkEmOYsafABBf8WY0b6+fjGC2n4Qm5Zdx7zdRRVVo8tE taKUU+8sNIdFYH+JDJBTz5K82iR201mMu8VN99aaKDpRh7mGwOGKdteOuL+8HIsRi6zz sfFcHGLHIdQoaf0XUcq/wpU76j0KxVOE2icIPjCw4Pb0Bt5UNir1aM9rLbzgl0k8dr2X cFUS5DxYC5oZhhYzU/VPFVjbS9rE2RyhFtyfDFQslYCDb9kqR5UDmoKUee51pe8AGRDx DfrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725431997; x=1726036797; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TK7VdQxlHQbYeFLdNpgXxxkdzw43kadI8KJHnVzWv/U=; b=Cn4r9Wo3Zh8FEGVYOR+E+IWYBOysQ76tdIGmt6M+7xEMFhHQGR0weIB3hqFiE6wJvi 2WT9kOkwHFSErwMg7UrgT94NtGzgWbmEppzcLPf++lDXw312sxNAfh0jqam6dY+plnmg KFGKkgDLMJp6F+vc4pyJCcWqT+5WjiZ9bXIQwEfCYC/TfFuwXiCqkqFnubIi73ZyqaMs jCDRTEqcuSLNF6ys9wL/rXr5GBMiIVQqAQlPVkhyrj7o/yPf+WLCAhsYZd7jCqhTXj9z Kg6B8ZSqT8c0Ed62iFQeDv7vj44PR1OI0ld3l/2T3U4LV0mr0hDBxmxYiCD15eo0Q5FT AFgw== X-Forwarded-Encrypted: i=1; AJvYcCUrwoZYcpi5NZ4jTt9rgwNPZkEqQ4RTo5pmayp/bkEQTxcIXV6BF6u2fHGvn1qYkuj/ZBKM9w==@debbugs.gnu.org X-Gm-Message-State: AOJu0Ywgm1MiDYn+KNOEtTtCTJetL8FlU4zRs9qBhNYAFMqZ9s2krIZn jFediM2jg3ChuOJ9b2eM2vPKyPnAONkYT5R40dmxcK44WyPxq5tINuFQEd6YaQVjqkj+oA01ssy 6jU1mNjmLlWT3on92/4p4iX65O/Y= X-Google-Smtp-Source: AGHT+IGRCJVzCbcd7aZJov8OSoOTtlJFstjle+TfXm+q6dhyOwhBvf3LDTVJVY3hlMztfRR89+nxUO4SdpzXhcokzZo= X-Received: by 2002:a05:622a:410c:b0:456:80fa:617e with SMTP id d75a77b69052e-456f169da0bmr188259091cf.2.1725431996655; Tue, 03 Sep 2024 23:39:56 -0700 (PDT) In-Reply-To: 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:291179 Archived-At: --0000000000003eaf0f0621457125 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Aug 29, 2024 at 8:14=E2=80=AFAM Yuan Fu wrote: > > > > On Aug 28, 2024, at 10:09=E2=80=AFPM, Eli Zaretskii wrot= e: > > > >> From: mail@ssbb.me > >> Date: Thu, 29 Aug 2024 06:57:38 +0400 > >> > >> Code in attached file cause Emacs to hang and memory leak infinitely > >> while editing. Try to open this code in elixir-ts-mode and move cursor > >> on line 6 (between <:loading> ) and type char by char: > >> > >> <.some_component a=3D{ > >> > >> (for some reason it does not happen with electric-pair-mode when {} > >> inserted automatically). > >> > >> I am able to reproduce this with -Q on few different machines (Linux a= nd > >> MacOS) and Emacs 29, 30.0.5 and current HEAD. > >> > >> C-g does nothing (including with debug-on-quit and sending SIGUSR2) > >> > >> At the same time I can't reproduce this in other tree-sitter based > editors. > >> > >> I got this sample code sample from elixir-ts-mode repo but now it's > moved > >> to the Emacs core so seems to be out of scope of Github repo issues. > >> > >> Attaching samle code and LLDB backtrace. > >> Also attaching report from built-in MacOS crash reporting tool just in > case. > > > > Thanks. > > > > Wilhelm and Yuan, could you please look into this soon? > > That=E2=80=99s bizarre, might have some bug around ranges. I=E2=80=99m lo= oking into this. > Hopefully I can figure it out in a few days :-( > > Yuan I can reproduce the issue by following the above instructions, but need to do some digging. It only seems to be the case with embedded heex and not with heex-ts-mode by itself. WIlhelm --0000000000003eaf0f0621457125 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Aug 29, 2024 at 8:14=E2=80=AF= AM Yuan Fu <casouri@gmail.com&g= t; wrote:


> On Aug 28, 2024, at 10:09=E2=80=AFPM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: mail@ssbb.= me
>> Date: Thu, 29 Aug 2024 06:57:38 +0400
>>
>> Code in attached file cause Emacs to hang and memory leak infinite= ly
>> while editing. Try to open this code in elixir-ts-mode and move cu= rsor
>> on line 6 (between <:loading>=C2=A0 </:loading>) and t= ype char by char:
>>
>> <.some_component a=3D{
>>
>> (for some reason it does not happen with electric-pair-mode when {= }
>> inserted automatically).
>>
>> I am able to reproduce this with -Q on few different machines (Lin= ux and
>> MacOS) and Emacs 29, 30.0.5 and current HEAD.
>>
>> C-g does nothing (including with debug-on-quit and sending SIGUSR2= )
>>
>> At the same time I can't reproduce this in other tree-sitter b= ased editors.
>>
>> I got this sample code sample from elixir-ts-mode repo but now it&= #39;s moved
>> to the Emacs core so seems to be out of scope of Github repo issue= s.
>>
>> Attaching samle code and LLDB backtrace.
>> Also attaching report from built-in MacOS crash reporting tool jus= t in case.
>
> Thanks.
>
> Wilhelm and Yuan, could you please look into this soon?

That=E2=80=99s bizarre, might have some bug around ranges. I=E2=80=99m look= ing into this. Hopefully I can figure it out in a few days :-(

Yuan

I can reproduce the issue by following= the above instructions, but need to do some digging. It only seems to be t= he case with embedded heex and not with heex-ts-mode by itself.
<= div>
WIlhelm



=
--0000000000003eaf0f0621457125--