GNU bug report logs - #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

Previous Next

Package: emacs;

Reported by: Gregor Zattler <telegraph <at> gmx.net>

Date: Thu, 9 Jan 2025 11:21:01 UTC

Severity: normal

Found in version 31.0.50

Done: Pip Cet <pipcet <at> protonmail.com>

Bug is archived. No further changes may be made.

Full log


Message #41 received at 75459 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: pipcet <at> protonmail.com, telegraph <at> gmx.net, 75459 <at> debbugs.gnu.org
Subject: Re: bug#75459: 31.0.50; scratch-igc: Breakpoint 1,
 terminate_due_to_signal (sig=sig <at> entry=6,
 backtrace_limit=backtrace_limit <at> entry=2147483647) at ./src/emacs.c:432
Date: Fri, 10 Jan 2025 09:53:11 +0200
> From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
> Cc: pipcet <at> protonmail.com,  telegraph <at> gmx.net,  75459 <at> 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.




This bug report was last modified 169 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.