[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Insight into the mystery hangs
From: |
Eric S. Raymond |
Subject: |
Re: Insight into the mystery hangs |
Date: |
Mon, 12 Feb 2024 13:26:16 -0500 |
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>