From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#60237: 30.0.50; tree sitter core dumps when I edebug view a node Date: Fri, 10 Mar 2023 21:41:57 -0500 Message-ID: References: <9FCDA5B7-D216-45B1-8051-35B05633BEFB@gmail.com> <83sfeukwsb.fsf@gnu.org> <574817C4-3FD8-43EA-B53C-B2BCB60A6D0A@gmail.com> <83mt51j6mv.fsf@gnu.org> <83a60xhou5.fsf@gnu.org> <83mt4wfvpd.fsf@gnu.org> <83fsaofp0x.fsf@gnu.org> <83v8jgaeqy.fsf@gnu.org> <87h6usf9kn.fsf@yahoo.com> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7492"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , mickey@masteringemacs.org, casouri@gmail.com, 60237@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 11 03:43:13 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 1papCT-0001la-DO for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Mar 2023 03:43:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1papCK-0000vg-4V; Fri, 10 Mar 2023 21:43: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 1papCJ-0000vX-03 for bug-gnu-emacs@gnu.org; Fri, 10 Mar 2023 21:43: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 1papCI-0004np-OD for bug-gnu-emacs@gnu.org; Fri, 10 Mar 2023 21:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1papCI-0005E7-G3 for bug-gnu-emacs@gnu.org; Fri, 10 Mar 2023 21:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Mar 2023 02:43: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.167850252720008 (code B ref 60237); Sat, 11 Mar 2023 02:43:02 +0000 Original-Received: (at 60237) by debbugs.gnu.org; 11 Mar 2023 02:42:07 +0000 Original-Received: from localhost ([127.0.0.1]:56336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1papBP-0005Cd-2Z for submit@debbugs.gnu.org; Fri, 10 Mar 2023 21:42:07 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:18271) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1papBN-0005CA-Eu for 60237@debbugs.gnu.org; Fri, 10 Mar 2023 21:42:06 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C614880898; Fri, 10 Mar 2023 21:41:59 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 5ABBC80091; Fri, 10 Mar 2023 21:41:58 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1678502518; bh=39T8y/xuv6mbF0f4DSRpKFpzUrLpev1V52EGtAY+6VI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=nXtaP9X/MJG8EGHjzH/Z5Wuvp2hL8ryWrh5RUTB+hDGG7Wr3sZf37Ck5CepTiACDf 3s3cpz34EY8MPBnEpCIdDOGZ5Kod5EU0fnYfApeWCSBzY2bwVt7aethpm3Cz45SjJb rWZuKSpkDpBwGrq9NF2ASvMUnFstMF+QTAHh7Giil/BYmv/yIbeVseoQ1TL0Q+sM33 il71qNZQPe31SEAkH6wk4K6Rm2sZcHNHjET7SpAYrySv19zMfOmNYLS4Ezg7bv8wQ3 jv8b14j7h1u29rBLLqbS2z9XbB1PDazJ5HsgtAcZ0cSvE4j0m6HnMWYkz34u4BaQOG +MkZIEW7vWLvA== Original-Received: from pastel (unknown [216.154.34.24]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 27888122550; Fri, 10 Mar 2023 21:41:58 -0500 (EST) In-Reply-To: <87h6usf9kn.fsf@yahoo.com> (Po Lu's message of "Sat, 11 Mar 2023 07:52:40 +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:257745 Archived-At: >> I can imagine corner cases where this could trigger, but they all >> involve funny business where we change `profiler-max-stack-depth` during >> a single profiling run (I think you'd need to write ad-hoc ELisp code >> for that). The only other explanation I can see is that we >> somehow end up with a backtrace that includes `Automatic_GC` somewhere >> not at the top (maybe this can happen with a `post-gc-hook`?). > > What about gc_in_progress? Why can't we use that? In the text you quote I simply try and describe the kinds of situations where I think the problem can appear. I don't know which of those are actually possible, nor do I suggest what should be done about it. And yes, maybe we can use `gc_in_progress`. So far I haven't taken a look at that, but feel free to do so. > This should avoid everything related to post-gc-hook. Probably. At the same time, if we're sampling while running `post-gc-hook`, then it's safe to do the "normal" job of the sampling code (the GC proper is completed already), so maybe the better thing to do in that case is to treat it as a backtrace which has `Automatic GC` as its root (i.e. ignore the part of the backtrace that's above `Automatic GC`). Stefan