From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#73310: tree-sitter makes cpu 100% Date: Fri, 20 Dec 2024 01:14:04 -0800 Message-ID: <71C7B1A0-AFD4-4162-A670-9749B1C0CD41@gmail.com> References: <86ldzqbh02.fsf@gnu.org> <86bjynl43x.fsf@gnu.org> <0653B68D-3F98-4D06-8C37-8976DC8C2BA4@gmail.com> <861pyjk7ip.fsf@gnu.org> <7C7183A4-758E-491E-B403-A57723598F53@gmail.com> <3EACFBFF-2E78-4746-8143-1DCB20A5AEAD@gmail.com> <99E79D3D-10C5-45B8-A4CE-4AA3F770BC2E@gmail.com> <42BD4BD5-E930-427F-99EF-3787EC0F31B2@gmail.com> <86msgqagxq.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18144"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73310@debbugs.gnu.org, vinurs To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 20 10:16:41 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 1tOZ7g-0004bY-Mb for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Dec 2024 10:16:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOZ78-0005aS-Dr; Fri, 20 Dec 2024 04:16:06 -0500 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 1tOZ75-0005V8-3T for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2024 04:16:04 -0500 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 1tOZ74-0001WD-RP for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2024 04:16:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:Date:In-Reply-To:From:Mime-Version:To:Subject; bh=lyjOrznhpRsRLuNUBZb+OKxXlyiThouSoD8vu2RVjaI=; b=jZTWFqIfYTypasXDe+32jYQ8fwjufXMJDBYfj+NX2z43RnUy1pKDOiFMND6tEuSSn6+/l4ZVcbYeUweY37glkEvAY1uJzv/m1ziKrI8a1IZ80nxUiwLTBQFvoFpECT+hjzJJ/QcI1TEo6umFv5sD2l1qh51lDJRyWXKBPbmPQmCqy5YUjY8lRVMsRllrPSoEBI1F8xmfaG/Ob13tGKcWhdbz3ULYvIy+7H/KAP4QNQCA+A80gNwiuDMS8WgKkpQphgsIg777YYEVK95hM5STB3d9C8AS63+SSp9gWr5c3CbagVJXEMSkOz+w3j1+0IRhvchUdp125ioqlwZCEBMXTg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tOZ74-0005Qa-2l for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2024 04:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Dec 2024 09:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73310 X-GNU-PR-Package: emacs Original-Received: via spool by 73310-submit@debbugs.gnu.org id=B73310.173468612120811 (code B ref 73310); Fri, 20 Dec 2024 09:16:02 +0000 Original-Received: (at 73310) by debbugs.gnu.org; 20 Dec 2024 09:15:21 +0000 Original-Received: from localhost ([127.0.0.1]:41665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOZ6O-0005Pa-S0 for submit@debbugs.gnu.org; Fri, 20 Dec 2024 04:15:21 -0500 Original-Received: from mail-pl1-f181.google.com ([209.85.214.181]:47134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOZ6L-0005PR-Kc for 73310@debbugs.gnu.org; Fri, 20 Dec 2024 04:15:19 -0500 Original-Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-21680814d42so15365985ad.2 for <73310@debbugs.gnu.org>; Fri, 20 Dec 2024 01:15:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734686057; x=1735290857; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=lyjOrznhpRsRLuNUBZb+OKxXlyiThouSoD8vu2RVjaI=; b=SNflJ9qUZsv8S00R/8d3+URtnLLCGkJpKzrfkddcKG7NZ3yal2IK3QPN7RsM409ZfM fgzhV9+1GtalKs3PBsrXOsH9XIslP5/LK5ijC6WsY19LgrIdvvY9r3oU1eWW+FAuGh0U viFlnF4goxqpUARWl7KQEzDo8AEOMpRVOwPP8wGKwhhBRI4gnXhnxuNT34de3L2fDzbB 3oVNEDo0hFgR19ksY6tpjZ/glitobkpMTs/nT4mBS5NTBFIssGU2SbiRL6Ds4IvQEpyc aYIoEnyCjZHy4AXlIj2zG6D6XMbP66vg2/CunXvEbPBmHzkrFZHUjaSdE3pMsaL8K54P FRAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734686057; x=1735290857; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lyjOrznhpRsRLuNUBZb+OKxXlyiThouSoD8vu2RVjaI=; b=u3orwOchJ0G2t+aMkg3ucxCtots2mn0CjI8GX219+5O5sLJq8POQElOtWh1O7046cV LxmNw0FQ6NRwKv5k9VprVENhmGk1jNniVAAsz2biuok7tOygcqLqBeVydZh/MtCasvy5 V/PEMwS91d8BVK6EfeKmDQDxDmgtWSy2EjIG5WX735twESP2J16Zp6+rfSaFoT/i8lCj JbOlQ/WAeNCFknYU9CMSZwPtjasHSHEfm4VDAeF8BRFj2eabgLdU3OIHx3xnu9f5q8AD QmoDpPRp4a3/OKtQuT+fZ9uxHmyWY18iihgonbtPFn6PBlyW9crBCjs3jWuaYGfppBPz H3nw== X-Forwarded-Encrypted: i=1; AJvYcCVHsRGDKa9i4jEAQdL61VPWhQFIC2Jpujz34NzumVetyTenr829ufqCChuULrMoggXXQvxJDw==@debbugs.gnu.org X-Gm-Message-State: AOJu0Ywio5fQDfmZInxJTJoxKLgz1ENf9MB4Ot45pNpx1Kgl3QOeXuoI gxhiwDJxBWQCtTMaxH5e0GYFbXztCbcyfzJ9+4AexTb1uXbP55Je X-Gm-Gg: ASbGncu5bs+COr328qNaiJ6uZODR0bOmD9pJmz2NRLDzVc7MR36axO7pdv5cz1GUWf8 THGPxUyDQviX/rXJZq705zc5zokA8rBu25mKO0hc31Ll4atnm++9AnuEcTb7y80x0/YepUlQQ0+ EJsIq7ZX5wfkIxImg1+T2du0pBUBE7nPplQQOQaG+eSMy0pRXVnmsdZQzZgHxtkDPCAGAkWjEzC kmYkItpU1E1YVlm91X3x7d4iQ7eWu6V4ZvuZvs4GrCGwjgDSDsgODNy2WYQ0MGBaqTJE7QU9rJF 1lRs X-Google-Smtp-Source: AGHT+IFgd0xWmdyRbrACUD5qjabDmEti4H7peh8XmLYP0/rZ9Lgv6fQ9b/NyaCuZB42Au7wsfpYWVw== X-Received: by 2002:a17:902:c40b:b0:206:9a3f:15e5 with SMTP id d9443c01a7336-219e6ebb6e2mr28166385ad.32.1734686056734; Fri, 20 Dec 2024 01:14:16 -0800 (PST) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:256b:fd6a:4865:b807]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dca028aesm24706255ad.264.2024.12.20.01.14.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Dec 2024 01:14:16 -0800 (PST) In-Reply-To: <86msgqagxq.fsf@gnu.org> X-Mailer: Apple Mail (2.3776.700.51) 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:297445 Archived-At: > On Dec 20, 2024, at 12:37=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> From: Yuan Fu >> Date: Fri, 20 Dec 2024 00:25:23 -0800 >> Cc: Eli Zaretskii , >> 73310@debbugs.gnu.org >>=20 >>=20 >>=20 >>> On Dec 19, 2024, at 1:34=E2=80=AFPM, vinurs wrote: >>>=20 >>> 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. >>=20 >> Thanks. That=E2=80=99s bad news. I=E2=80=99ll also see if I can = modify my C program to reproduce this. >=20 > 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=E2=80=99s almost certainly tree-sitter. And it=E2=80=99s unlikely for = us to find the cause of the hang without considerable knowledge of = tree-sitter internals. Anyway, I=E2=80=99ll start with reproducing it reliably. Yuan =20=