From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Eric S. Raymond" <esr@thyrsus.com> Newsgroups: gmane.emacs.devel Subject: Re: Strange hangs when visiting .el and .html files Date: Fri, 9 Feb 2024 16:06:01 -0500 Organization: Eric Conspiracy Secret Labs Message-ID: <ZcaTuSqZLHvrE7Hn@thyrsus.com> References: <ZcZqUUNP7p2VMOaD@thyrsus.com> <1e5dc76b-5e82-4d9c-a1ac-a6104b6b1d03@alphapapa.net> Reply-To: esr@thyrsus.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17768"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, schwab@suse.de To: Adam Porter <adam@alphapapa.net> Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 09 22:07:08 2024 Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org> Envelope-to: ged-emacs-devel@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 <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>) id 1rYY5T-0004Ns-Li for ged-emacs-devel@m.gmane-mx.org; Fri, 09 Feb 2024 22:07:07 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <emacs-devel-bounces@gnu.org>) id 1rYY4X-0001nr-IQ; Fri, 09 Feb 2024 16:06:09 -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 <esr@thyrsus.com>) id 1rYY4V-0001cm-Nz for emacs-devel@gnu.org; Fri, 09 Feb 2024 16:06:07 -0500 Original-Received: from thyrsus.com ([71.162.243.5] helo=snark.thyrsus.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <esr@thyrsus.com>) id 1rYY4R-0005XP-DR for emacs-devel@gnu.org; Fri, 09 Feb 2024 16:06:07 -0500 Original-Received: by snark.thyrsus.com (Postfix, from userid 1000) id C6A5718A1647; Fri, 9 Feb 2024 16:06:01 -0500 (EST) Content-Disposition: inline In-Reply-To: <1e5dc76b-5e82-4d9c-a1ac-a6104b6b1d03@alphapapa.net> X-Eric-Conspiracy: There is no conspiracy Received-SPF: pass client-ip=71.162.243.5; envelope-from=esr@thyrsus.com; helo=snark.thyrsus.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." <emacs-devel.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>, <mailto:emacs-devel-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/emacs-devel> List-Post: <mailto:emacs-devel@gnu.org> List-Help: <mailto:emacs-devel-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>, <mailto:emacs-devel-request@gnu.org?subject=subscribe> Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316076 Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/316076> Adam Porter <adam@alphapapa.net>: > This sounds like a weird behavior that I've observed ever since Emacs 28, > but I've never been able to pin it down well enough to file a report about > it. > > Basically, what I observe is that: > > 1. Certain actions (like calling certain commands, perhaps including ones > that activate a major mode) cause Emacs to spin with 100% CPU usage for some > time, tens of seconds or even a couple of minutes sometimes. > > 2. It only happens when such an action happens for the first time in a > session. > > 3. If I interrupt with C-g, everything appears normal; no errors, no > partially initialized state, no weird behavior. It's as if whatever I > interrupted was "optional." > > 4. Over time (3 or 4 versions now), the actions that trigger this behavior > have not been consistent. I might even venture to say that, between > different builds of the same version, the actions might not be consistent. > > 5. It seems to happen less now, on Emacs 29.1 (I still need to upgrade) than > it did on builds of 28.0 and 28.1. > > 6. Without being able to verify it, I have the impression or intuition that > it happens when Emacs loads a library for the first time in a session (I > don't mean when it loads any library, just a certain one or ones, but I > haven't been able to pin it down). > > Over the past couple of years, I've heard a few other users mention > observing similar behavior at times, but again, always being difficult to > nail down. > > If this seems like the same behavior you're seeing, maybe it's time we give > this problem a name and an real bug report. OK, I tested your theory by visiting my HTML home page, interrupting the resulting hang, and then visiting the page again. It didn't hang, and now seems to be operating normally. So I think we are in fact looking at the same bug. Nice to know I wasn't hallucinating, and I'm guessing you're feeling the same relief on reading this. Proposed title: "Repeatable hang on first load of certain major modes". I'd file the bug now, but it sounds like you've experienced it over more versions and contexts than I have, so you can add more detail than I could. The only thing I can add to your report is that the problem goes back past version 28, at least as far as 27.1. You can add to the report that I have seen this hang consistently in 27.1 and a recent repo head version, 30.0.50. And the modes I've seen hang are elisp mode and whatever is invoked for HTML files. If you reply with an issue URL I'll look it over and probably comment. -- <a href="http://www.catb.org/~esr/">Eric S. Raymond</a>