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: Tue, 10 Dec 2024 23:04:26 -0800 Message-ID: <7C7183A4-758E-491E-B403-A57723598F53@gmail.com> References: <86ldzqbh02.fsf@gnu.org> <86bjynl43x.fsf@gnu.org> <0653B68D-3F98-4D06-8C37-8976DC8C2BA4@gmail.com> <861pyjk7ip.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="38013"; 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 Wed Dec 11 08:06:13 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 1tLGnU-0009jZ-B3 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Dec 2024 08:06:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLGnM-0002E1-DV; Wed, 11 Dec 2024 02:06:04 -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 1tLGnK-0002Dd-Lf for bug-gnu-emacs@gnu.org; Wed, 11 Dec 2024 02:06:02 -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 1tLGnK-0004QJ-D0 for bug-gnu-emacs@gnu.org; Wed, 11 Dec 2024 02:06: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=yZYabq075Urk4P38jVWhlpuFSnhint9xWhtaU5riuPQ=; b=lSsvAZILSG7nzbfVb79ppxkM3OIwWOICUxxFqhxlGgmBcfvkxhq3soXCL9+MzyQU/RYYCfkNtKan9Qf5iA2BZcc9dZuzPeKa7gwQ5SiCO8CTQYnDKtjDFVMFYN98HBEDzWyCWFFPIyNySCpEuuTcGLPJaTFOx5YrCJ+uw6YlgMyX5hfykWRJ3bWC0ZdZ4k6n/Gj+gh+Dfdzd5G0I5oJVVNASmPNLuyY3zxt2PMPKmM8pWhXIG7iM0q78iUkXgRTR6Udx/lagacMyIFe1XSHrjTfuzNCdK12tnLShaqFOaHwwlb5AmjNcRqCYc3FZwid+q7Qbrc2sK8sLBnU0jWHmQg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tLGnK-0000iZ-3v for bug-gnu-emacs@gnu.org; Wed, 11 Dec 2024 02:06: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: Wed, 11 Dec 2024 07:06: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.17339007502741 (code B ref 73310); Wed, 11 Dec 2024 07:06:02 +0000 Original-Received: (at 73310) by debbugs.gnu.org; 11 Dec 2024 07:05:50 +0000 Original-Received: from localhost ([127.0.0.1]:60921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLGn4-0000i4-Sb for submit@debbugs.gnu.org; Wed, 11 Dec 2024 02:05:50 -0500 Original-Received: from mail-pg1-f169.google.com ([209.85.215.169]:50322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLGn2-0000hp-Aj for 73310@debbugs.gnu.org; Wed, 11 Dec 2024 02:05:45 -0500 Original-Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-7fd17f231a7so4290703a12.0 for <73310@debbugs.gnu.org>; Tue, 10 Dec 2024 23:05:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733900678; x=1734505478; 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=yZYabq075Urk4P38jVWhlpuFSnhint9xWhtaU5riuPQ=; b=bap0P43Y+0aMxb2HGk0RO2jB28jIr29QI56xnLfJGPHD1ndO/Jktafhtb9/3yZAn/E UhwVgEp+fOkkAaIeRJcviXmf8cofPgGzvP4hk8cVrYifF4P5qFuXbrXTO6+P3OqAqwGB kKd2qVBNjIWDuGYEq2krWZYqGVcWXb5G4+YbrFHexIAH8h+n9mHI4MEZJbBLzo5LIua4 izoQkQSw26cEh5VFV+e4VWgMgzaB9vBaVFXWI767meuZXupA+jDCizW6r8tkJhlRt6ot 9bpaoBWiIgXvfip6DvVpFvhOvdY96wFmcqI3KRfJCGfGLwjxZ1EYkHt1A78SMAvoeZlN WBHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733900678; x=1734505478; 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=yZYabq075Urk4P38jVWhlpuFSnhint9xWhtaU5riuPQ=; b=g301gicjwC9PmMHqR93eAwUZUwV82co6WERQ7Ad+JTx175K3m6Ar12lD7xDMZHwyKc k93ZwRfiIobf3u0XQjc6RDf9wm398fNSkT/Y9OA1PESDbnpRw6bnzHfXVOBNXjw9YWQu tShmRqp55x/rlHAHfcZx+F/YZdy5Wknp9Wo+/QgTNmkI2niRhomr5J58mZaih6SmT42o 0W8btRQoGNR9rOcOGqcOCH9ar0DZF3ZcBePvoPucAyR7idxaHEqbp9/HEa/kOFzXIEqY +V0JwPMqxadLNN8KK1v0YODvDNdQSXjOqN4YLIJjR/ZubPzvaYxCx99QArX1X1vNXJ12 bxlg== X-Forwarded-Encrypted: i=1; AJvYcCXlG9et2baPgAXykrGFbUE97KBCl2LXyAitwqTYR14ZeKi0mGmpjXcTFsi/8vc0S1ZnNXHUgQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yyryo4AQRV6/9buCjXZS8M9gQxz+7aCXFdRCJUN/KnpNR4nvZYP q9D417EgugwplYn8605AWUeGBnDJ6zM1YaNC6o8VJjXApfmmgG2+ X-Gm-Gg: ASbGnct6/tnxIhv6hduyPS6cdtSe/KSEhCM3w7G9eEWpSsiFAb3f4ha4v67q7TzMmgL WM9RA6F40LNlev/c+ABLfg281BQPteIpo8XhctbC+kdk0ctWZM75I45wFYaXOv/tSg0p0eHjPKW AyeI3WSGIwlLoTQnAsXPqIyIs09hE3A8mzzox/RIMz0F8o13J6GhQbQ5UZmvQ6YN2VfVHi4KHEb RNT9MU9NXDNvRDvMNHwm90im3Fmk29dLBBG0Esw1yc5/iwZBQvPP1yODGK1c9lhcfyu13c640cj fw== X-Google-Smtp-Source: AGHT+IHlmnTlGuc0q4tCHsSmw5RXR4hhv/DQeqHiHKDd7oxeKPKAgSyq9CzbOt+sT1+cb24NbI610A== X-Received: by 2002:a17:90b:4d04:b0:2ee:5bc9:75c7 with SMTP id 98e67ed59e1d1-2f127f79728mr2971836a91.5.1733900678280; Tue, 10 Dec 2024 23:04:38 -0800 (PST) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:f90e:3b71:6ee2:6197]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2efb2f10437sm4726237a91.15.2024.12.10.23.04.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Dec 2024 23:04:37 -0800 (PST) In-Reply-To: <861pyjk7ip.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:296804 Archived-At: > On Dec 7, 2024, at 4:22=E2=80=AFAM, Eli Zaretskii = wrote: >=20 > Ping! Can anybody reproduce this and debug the problem? >=20 >> Date: Mon, 25 Nov 2024 19:21:49 +0800 >> From: vinurs >> Cc: 73310@debbugs.gnu.org, Eli Zaretskii >>=20 >>=20 >> Hi Yuan, >> I installed tree-sitter version 0.24.4 using brew install = tree-sitter.=20 >> I then tried the following Emacs versions:=20 >> 1. emacs-plus@30=20 >> 2. emacs-plus@31=20 >> 3. Emacs-pretest-30.0.92-universal.dmg >> = (https://emacsformacosx.com/emacs-builds/Emacs-pretest-30.0.92-universal.d= mg)=20 >> 4. Compiled Emacs myself with the following configuration:=20 >> ./configure --with-tree-sitter=3D/opt/homebrew/opt/tree-sitter = --with-native-comp >> I attempted to reproduce the issue using the following steps:=20 >> Move to line 52. Delete all characters following :error-code. Quickly = press the spacebar twice. At this point, >> Emacs freezes. >> The issue persists across all versions and builds. >>=20 >> ------------ >>=20 >> Sincerely, >>=20 >> Haiyuan Zhang, Vinurs >>=20 >> BinaryBrain LLC >>=20 >> =E5=BC=80 2024=E5=B9=B411=E6=9C=8825=E6=97=A5 =E5=9C=A8 09:48:30, = Yuan Fu (casouri@gmail.com) =E5=86=99=E5=88=B0: >>=20 >>> On Nov 10, 2024, at 3:35=E2=80=AFAM, vinurs wrote:=20 >>>=20 >>> Because I saw Yuan=E2=80=99s response in the tree-sitter issue = thread stating that this bug had already been >> fixed, so I'm not sure if it=E2=80=99s the same issue anymore. >>>=20 >>> https://github.com/tree-sitter/tree-sitter/issues/3620=20 >>>=20 >>> ------------=20 >>> Sincerely,=20 >>>=20 >>> Haiyuan Zhang, Vinurs=20 >>> BinaryBrain LLC >>=20 >> Sorry for the late response. I went over the reproduce recipe again, = and at least for me, Emacs >> doesn=E2=80=99t hang anymore. Maybe your Emacs isn=E2=80=99t picking = up the right tree-sitter library?=20 >>=20 >> Yuan I tried again with v0.24.4 and emacs 30, and still can=E2=80=99t = reproduce this. Haiyuan, if you run=20 otool -L What=E2=80=99s the location of libtree-sitter? I=E2=80=99m asking to see = if there=E2=80=99s an old tree-sitter library on your system that Emacs = is picking up over the new library you installed. Yuan=