unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: pipcet@protonmail.com, telegraph@gmx.net, 75459@debbugs.gnu.org
Subject: bug#75459: 31.0.50; scratch-igc: Breakpoint 1, terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=2147483647) at ./src/emacs.c:432
Date: Fri, 10 Jan 2025 09:53:11 +0200	[thread overview]
Message-ID: <86ikqn14wo.fsf@gnu.org> (raw)
In-Reply-To: <m2tta7xh2m.fsf@gmail.com> (message from Gerd Möllmann on Fri, 10 Jan 2025 08:29:21 +0100)

> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Cc: pipcet@protonmail.com,  telegraph@gmx.net,  75459@debbugs.gnu.org
> Date: Fri, 10 Jan 2025 08:29:21 +0100
> 
> Could the problem then perhaps be barriers? In emacs_lldb.py I have, for
> LLDB, a command
> 
>   def xpostmortem(debugger, command, ctx, result, internal_dict):
>       """Call igc_postmortem to set MPS arena to postmortem state"""
>       debugger.HandleCommand(f"expr igc_postmortem()")
> 
> I call that command manually when MPS gets in the way. Here is the
> description from MPS

Maybe.  We could add that to the xbacktrace command.  However,...

> In the postmortem state, incremental collection does not take place,
> objects do not move in memory, references do not change, the staleness
> of location dependencies does not change, and memory occupied by
> unreachable objects is not recycled. Additionally, all memory protection
> is removed, and memory may be in an inconsistent state.
> 
> Warning
> 
> After calling this function, memory managed by the arena is not in a
> consistent state, and so it is no longer safe to continue running the
> client program. This function is intended for postmortem debugging only.
> This function must be called from the thread that holds the arena lock
> (if any thread holds it). This is the case if the program is
> single-threaded, or if it is called from an MPS assertion handler. When
> calling this function from the debugger, check the stack to see which
> thread has the MPS arena lock.

...the above makes me wonder whether calling this unconditionally will
shoot us in the foot.  Debugging with GDB does sometimes call
functions in the debuggee, whereas the above says "no longer safe to
continue running the client program".  I wonder what kind of
"postmortem debugging" they had in mind, perhaps only debugging
MPS-related code itself?

In any case, we should call this function only once per run, and in
the context of thread 1.

So maybe calling it manually, like you do now, is the best
alternative?  In which case we should add this to etc/DEBUG, I think.





  reply	other threads:[~2025-01-10  7:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-09 11:19 bug#75459: 31.0.50; scratch-igc: Breakpoint 1, terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=2147483647) at ./src/emacs.c:432 Gregor Zattler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-09 13:03 ` Eli Zaretskii
2025-01-09 14:34   ` Gerd Möllmann
2025-01-09 14:47     ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-09 15:32       ` Gregor Zattler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-09 16:14         ` Gerd Möllmann
2025-01-09 19:27           ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-09 22:29             ` Gregor Zattler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-10  4:52             ` Gerd Möllmann
2025-01-10  7:15               ` Eli Zaretskii
2025-01-10  7:29                 ` Gerd Möllmann
2025-01-10  7:53                   ` Eli Zaretskii [this message]
2025-01-10  8:14                     ` Gerd Möllmann
2025-01-10 13:46                   ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-09 14:52     ` Gerd Möllmann

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=86ikqn14wo.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=75459@debbugs.gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --cc=pipcet@protonmail.com \
    --cc=telegraph@gmx.net \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).