all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: esr@thyrsus.com
Cc: emacs-devel@gnu.org
Subject: Re: Insight into the mystery hangs
Date: Mon, 12 Feb 2024 21:22:15 +0200	[thread overview]
Message-ID: <86le7pqyhk.fsf@gnu.org> (raw)
In-Reply-To: <ZcpiyJVd6iNFpg7X@thyrsus.com> (esr@thyrsus.com)

> Date: Mon, 12 Feb 2024 13:26:16 -0500
> From: "Eric S. Raymond" <esr@thyrsus.com>
> Cc: emacs-devel@gnu.org
> 
> Eli Zaretskii <eliz@gnu.org>:
> > 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.

If you eventually can get Emacs into producing a backtrace, the
facilities described in the node "Debugging Redisplay", mentioned
above, should allow you to have it saved in a special buffer that you
can then examine.

> ...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.

Not sure I understand what kind of features would you like to have to
make this easier.  To detect the fact that a sub-process takes most of
the time you could use profiler.el -- the profile should show that a
large portion of time is spent inside call-process or its ilk.
Alternatively, you could use 'top' or a similar tool to see what the
Emacs process and its subprocesses are doing.



  reply	other threads:[~2024-02-12 19:22 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
2024-02-12 19:22     ` Eli Zaretskii [this message]
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=86le7pqyhk.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=esr@thyrsus.com \
    /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.