unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Helmut Eller <eller.helmut@gmail.com>,  emacs-devel@gnu.org
Subject: Re: Building the igc branch on MS-Windows
Date: Fri, 26 Apr 2024 10:11:28 +0200	[thread overview]
Message-ID: <m2frv8o85r.fsf@pro2.fritz.box> (raw)
In-Reply-To: <86o79wzi31.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 26 Apr 2024 10:41:38 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Helmut Eller <eller.helmut@gmail.com>
>> Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel@gnu.org
>> Date: Fri, 26 Apr 2024 09:18:59 +0200
>> 
>> >> ./src/emacs -Q src/xdisp.c -eval '(igc--collect)'
>> >
>> > I would start by investigating what stuff reachable from struct frame
>> > is and is not traced, which depends a bit on the platform. Also font
>> > stuff probably, terminals, scroll bar things (at least in NS I know
>> > there is something), and I don't know what else.
>> 
>> The problem was a corrupted font.  I added the code below and it now
>> survives the first GC cycle.  In general, fix_frame must scan the same
>> fields as mark_frame in alloc.c does.  Is that about right?  Since MPS
>> wants the address of the fields (instead the value), some creativity may
>> be required.  Is that also right?  Or can I stupidly copy what
>> mark_frame does?
>
> Thanks, I cannot answer all of the questions above, but I nevertheless
> installed this in your name, with one difference:

Oh, I see, that's why the path didn't apply :-).
 
> However, the crashes while scrolling through xdisp.c are still there.
> I just had 2 of them; backtraces below.  It sounds like the first one
> is due to Lisp strings, but the second one is related to markers.
>
>   igc.c:1584: Emacs fatal error: assertion failed: !"other"

That's the PVEC_OTHER we talked about.

Maybe it would be a good idea to take the assert !"other" out for the
moment?

>   eval.c:120: Emacs fatal error: assertion failed: pdl->kind == SPECPDL_BACKTRACE
>
>   Thread 1 hit Breakpoint 1, terminate_due_to_signal (sig=sig@entry=22,
>       backtrace_limit=backtrace_limit@entry=2147483647) at emacs.c:442
>   442     {
>   The program being debugged stopped while in a function called from GDB.
>   Evaluation of the expression containing the function
>   (backtrace_function) will be abandoned.
>   When the function is done executing, GDB will silently stop.

This is from the xbacktrace calling into Emacs.

And now it's becoming fun :-).

Our GC callbacks are called from MPS, in its thread. Fix_... are
subroutines of dftl_scan, which is the scanning callback. When we fail,
MPS is in some state we don't really know. And Emacs does its thing
handling the failure, which uses MPS (it allocates, for example).

Which basically means, after a failing assertion in a callback, we are
basically hosed. Memory barriers may exist, locks may not have been
released, and heaven knows...

Sometimes it helps to put MPS into a post-mortem state, as MPS calls it.
There is igc_postmorten which can be called from the debugger. That at
least lifts the memory barriers.

Does that make sense?

I think we should first get to a state where we don't fail asserts,
because it's hard to tell if followup errors are "real", so to say.




  reply	other threads:[~2024-04-26  8:11 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24 15:06 Building the igc branch on MS-Windows Eli Zaretskii
2024-04-24 15:20 ` Gerd Möllmann
2024-04-24 16:07   ` Eli Zaretskii
2024-04-24 16:48     ` Gerd Möllmann
2024-04-24 16:59       ` Gerd Möllmann
2024-04-24 19:09       ` Eli Zaretskii
2024-04-24 19:44         ` Gerd Möllmann
2024-04-25  5:38           ` Eli Zaretskii
2024-04-25  6:17             ` Gerd Möllmann
2024-04-25  4:54 ` Helmut Eller
2024-04-25  5:30   ` Eli Zaretskii
2024-04-25  6:38     ` Helmut Eller
2024-04-25  7:39       ` Gerd Möllmann
2024-04-25 10:34         ` Eli Zaretskii
2024-04-25 11:09           ` Eli Zaretskii
2024-04-25 11:16             ` Eli Zaretskii
2024-04-25 11:59             ` Gerd Möllmann
2024-04-25 13:22               ` Eli Zaretskii
2024-04-25 13:29                 ` Gerd Möllmann
2024-04-25 11:55           ` Gerd Möllmann
2024-04-25 13:29             ` Eli Zaretskii
2024-04-25 14:00               ` Gerd Möllmann
2024-04-25 14:34                 ` Eli Zaretskii
2024-04-25 14:40                   ` Gerd Möllmann
2024-04-25 12:35           ` Helmut Eller
2024-04-25 12:40             ` Gerd Möllmann
2024-04-26  7:18               ` Helmut Eller
2024-04-26  7:38                 ` Gerd Möllmann
2024-04-26  7:41                 ` Eli Zaretskii
2024-04-26  8:11                   ` Gerd Möllmann [this message]
2024-04-26  9:13                     ` Helmut Eller
2024-04-26  9:31                       ` Gerd Möllmann
2024-04-26 10:55                       ` Eli Zaretskii
2024-04-26 11:27                         ` Po Lu
2024-04-26 13:04                           ` Gerd Möllmann
2024-04-26 13:42                             ` Po Lu
2024-04-26 13:46                               ` Gerd Möllmann
2024-04-26 14:35                               ` Gerd Möllmann
2024-04-26 10:35                     ` Eli Zaretskii
2024-04-26 10:56                       ` Gerd Möllmann
2024-04-26 11:25                         ` Eli Zaretskii
2024-04-26 11:38                           ` Po Lu
2024-04-26 12:58                             ` Gerd Möllmann
2024-04-26 14:49                             ` Eli Zaretskii
2024-04-26 14:53                               ` Gerd Möllmann
2024-04-27  0:21                               ` Po Lu
2024-04-27  6:13                                 ` Eli Zaretskii
2024-04-27  6:48                                   ` Gerd Möllmann
2024-04-27  7:13                                     ` Eli Zaretskii
2024-04-26 12:58                           ` Gerd Möllmann
2024-04-26 15:11                             ` Eli Zaretskii
2024-04-26 15:27                               ` Gerd Möllmann
2024-04-26 11:32                         ` Eli Zaretskii
2024-04-26 13:09                           ` Gerd Möllmann
2024-04-26 13:12                             ` Gerd Möllmann
2024-04-26 15:01                             ` Helmut Eller
2024-04-26 15:30                               ` Gerd Möllmann
2024-04-26 15:39                               ` Eli Zaretskii
2024-04-26 17:03                                 ` Gerd Möllmann
2024-04-26 18:24                                   ` Helmut Eller
2024-04-26 18:37                                     ` Gerd Möllmann
2024-04-26 16:57                               ` Gerd Möllmann
2024-04-26 18:11                                 ` Helmut Eller
2024-04-26 18:30                                   ` Gerd Möllmann
2024-04-26 20:45                                     ` Helmut Eller
2024-04-27  4:22                                       ` Gerd Möllmann
2024-04-27  5:18                                         ` Ihor Radchenko
2024-04-27  5:26                                           ` Gerd Möllmann
2024-04-27  5:54                                             ` Ihor Radchenko
2024-04-27  6:07                                               ` Gerd Möllmann
2024-04-27  6:31                                                 ` Gerd Möllmann
2024-04-27  6:22                                             ` Eli Zaretskii
2024-04-27  6:29                                               ` Ihor Radchenko
2024-04-27  7:11                                                 ` Eli Zaretskii
2024-04-27  7:40                                                   ` Ihor Radchenko
2024-04-27  6:45                                               ` Gerd Möllmann
2024-04-27  6:11                                       ` Eli Zaretskii
2024-04-27  6:58                                         ` Eli Zaretskii
2024-04-27  7:17                                           ` Eli Zaretskii
2024-04-27  8:38                                             ` Gerd Möllmann
2024-04-27 11:15                                               ` Eli Zaretskii
2024-04-27 12:09                                                 ` Gerd Möllmann
2024-04-27 12:33                                                   ` Eli Zaretskii
2024-04-27 12:37                                                   ` Eli Zaretskii
2024-04-27 13:26                                                     ` Gerd Möllmann
2024-04-27 14:54                                                       ` Eli Zaretskii
2024-04-27 15:25                                                         ` Gerd Möllmann
2024-04-27 15:40                                                           ` Eli Zaretskii
2024-04-27 15:47                                                             ` Helmut Eller
2024-04-27 15:48                                                             ` Gerd Möllmann
2024-04-27  7:23                                           ` Gerd Möllmann
2024-04-27  7:33                                             ` Eli Zaretskii
2024-04-27  9:04                                               ` Gerd Möllmann
2024-04-27 11:44                                                 ` Eli Zaretskii
2024-04-27 12:07                                                   ` Eli Zaretskii
2024-04-27 12:41                                                     ` Gerd Möllmann
2024-04-27 13:23                                                     ` Gerd Möllmann
2024-04-27 12:32                                                   ` Gerd Möllmann
2024-04-27 14:11                                                   ` Gerd Möllmann
2024-04-27 14:47                                                     ` Eli Zaretskii
2024-04-27 15:09                                                       ` Gerd Möllmann
2024-04-27 15:15                                                         ` Helmut Eller
2024-04-27 15:29                                                           ` Gerd Möllmann
2024-04-27 15:38                                                             ` Eli Zaretskii
2024-04-27 15:42                                                               ` Gerd Möllmann
2024-04-27 16:37                                                                 ` Gerd Möllmann
2024-04-27 15:23                                                         ` Gerd Möllmann
2024-04-28  6:31                                                 ` Eli Zaretskii
2024-04-28  6:44                                                   ` Gerd Möllmann
2024-04-27  7:17                                         ` Gerd Möllmann
2024-04-27 12:11                                         ` Helmut Eller
2024-04-27 12:32                                           ` Eli Zaretskii
2024-04-27 13:41                                             ` Helmut Eller
2024-04-26  8:12                   ` Helmut Eller
2024-04-26  8:57                     ` Gerd Möllmann
2024-04-26 10:39                     ` Eli Zaretskii

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=m2frv8o85r.fsf@pro2.fritz.box \
    --to=gerd.moellmann@gmail.com \
    --cc=eliz@gnu.org \
    --cc=eller.helmut@gmail.com \
    --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 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).