all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Eric S. Raymond" <esr@thyrsus.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Insight into the mystery hangs
Date: Mon, 12 Feb 2024 13:26:16 -0500	[thread overview]
Message-ID: <ZcpiyJVd6iNFpg7X@thyrsus.com> (raw)
In-Reply-To: <868r3psv2s.fsf@gnu.org>

Eli Zaretskii <eliz@gnu.org>:
> > From: "Eric S. Raymond" <esr@thyrsus.com>
> > Date: Sun, 11 Feb 2024 16:37:37 -0500 (EST)
> > 
> > However.  Emacs is not entirely off the hook here.  When I'm not under
> > deadline pressure I will file a bug with a title something like
> > "With debug-on-quit enabled, Emacs does not reliably raise a debug
> > trace on interrupt of call-process"
> 
> Isn't that call issued from the mode-line display?  If so, that is
> done from redisplay, and redisplay cannot enter debugger, so it
> catches all errors.  If you want to produce Lisp backtraces from Lisp
> code called by redisplay, you need to use the facilities documented in
> the node "Debugging Redisplay" in the ELisp Reference manual.

1. Thinking about it, I can see why redisplay can't be allowed to enter
the debugger. Infinite regress...

2. I don't know if that subprocess is called from the modeline
code. Probably, but I'd have to dig into vc.el to check. I won't have
time for that for a few days yet.

3. Assuming that it is called from the modeline code, the question
shifts from "Why did I have so much trouble generating a debug trace?"
to "How could I get one at all"?" There's some kind of timing issue,
I think.

Just to make this saga more interesting, after I turned in my last
report I was disamayed to find the the hang on mode initialization
wasn't *entirely* banished.  Fortunately I had a test case that would
reproduce it reliably.  

Some bisecting revealed that SRC had a *real* hang bug (not a mere.
pseudo-hang due to a long-running command) It seems I omitted a loop
break while I was performing what I thought was a safe refactor. Last
September...

644 cases in my test suite and none of them caught it, nor did I
encounter it in heavy production use between then and yesterday. The
trigger is some strange corner case in parsing RCS masters.  I repaired
the code, but...

...this directs my attention to the fact that that Emacs makes it
generally difficult to notice and diagnose ill-behaved subprocesses,
wuth problems behind the mode-line being the extreme case.  Alas, I
don't know what to do about this other than windmill my arms at the
dev group.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>





  reply	other threads:[~2024-02-12 18:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-11 21:37 Insight into the mystery hangs Eric S. Raymond
2024-02-12 12:38 ` Alan Mackenzie
2024-02-12 12:52 ` Eli Zaretskii
2024-02-12 18:26   ` Eric S. Raymond [this message]
2024-02-12 19:22     ` Eli Zaretskii
2024-02-13  7:52   ` Kévin Le Gouguec
2024-02-13 12:56     ` Eli Zaretskii
2024-02-13 23:05       ` Kévin Le Gouguec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZcpiyJVd6iNFpg7X@thyrsus.com \
    --to=esr@thyrsus.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.