From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#60237: 30.0.50; tree sitter core dumps when I edebug view a node Date: Sat, 25 Feb 2023 09:55:33 +0200 Message-ID: <83r0uekwlm.fsf@gnu.org> References: <9310F6C6-8B17-41D5-BF5D-E116910D646E@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25817"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mickey@masteringemacs.org, 60237@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 25 08:56:28 2023 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 1pVpPw-0006WB-M2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Feb 2023 08:56:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVpPk-0004rq-RA; Sat, 25 Feb 2023 02:56:16 -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 1pVpPW-0004rB-Po for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2023 02:56:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVpPW-0004pE-H1 for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2023 02:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVpPW-0003qM-CD for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2023 02:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Feb 2023 07:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60237 X-GNU-PR-Package: emacs Original-Received: via spool by 60237-submit@debbugs.gnu.org id=B60237.167731173914736 (code B ref 60237); Sat, 25 Feb 2023 07:56:02 +0000 Original-Received: (at 60237) by debbugs.gnu.org; 25 Feb 2023 07:55:39 +0000 Original-Received: from localhost ([127.0.0.1]:38904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVpP8-0003pa-St for submit@debbugs.gnu.org; Sat, 25 Feb 2023 02:55:39 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVpP7-0003pL-5h for 60237@debbugs.gnu.org; Sat, 25 Feb 2023 02:55:37 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVpP1-0004nn-Uq; Sat, 25 Feb 2023 02:55:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=JbCT8l7/gB0JLC4unQyUGpGrXLS69zo1NrgCyetnXk0=; b=oIDB7Bs/SB/w/wIVTmnH 5KYla30ZuQbuzadwbrlvUpG+CeyGC8fC3dZt9dRweYzpqzky9NNdh8gRM1tQTE+d6ITjUJCLSLHjR sWSB2yIZgtVNZaWuld0IGxW+aAivtVBbmluvfpco6th4ggkvWqjj/cIHtxfhSzFf7VgWQC6iYzoSV AssQwA6RlkqunyCew/euYY4l2FpwsBFHx/D7W4ysJCOKm7R8rxK6MeorQouASrEhiG/oOOy8vxphL S1+Pf/OOshn+TcaxdHtfmyFrOz1+dOFbxqsbnj+Mx5W7PxlgbJKXq3BLPpH+jHrKjJ8KJz1AR/jhU bjEYAMmoLX/IbQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVpP0-0002js-WF; Sat, 25 Feb 2023 02:55:31 -0500 In-Reply-To: <9310F6C6-8B17-41D5-BF5D-E116910D646E@gmail.com> (message from Yuan Fu on Fri, 24 Feb 2023 15:29:15 -0800) 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:256694 Archived-At: > From: Yuan Fu > Date: Fri, 24 Feb 2023 15:29:15 -0800 > Cc: eliz@gnu.org, > 60237@debbugs.gnu.org > > Maybe it will help us understand the problem better, so here is the > backtrace for the infinite loop. I’m not sure why treesit_delete_parser > would trigger gc, as it just calls two tree_sitter functions: > > void > treesit_delete_parser (struct Lisp_TS_Parser *lisp_parser) > { > ts_tree_delete (lisp_parser->tree); > ts_parser_delete (lisp_parser->parser); > } According to the backtrace, it's the other way around: Emacs called some function via funcall, and funcall decided it was a good time to do a GC. Then GC called treesit_delete_parser, presumably because that parser object was no longer in use?