unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrea Corallo <akrl@sdf.org>
To: Lynn Winebarger <owinebar@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
	michael.albinus@gmx.de, emacs-devel <emacs-devel@gnu.org>
Subject: Re: Loading tramp for dump goes into infinite regress
Date: Mon, 25 Jul 2022 20:11:14 +0000	[thread overview]
Message-ID: <xjfsfmpkl5p.fsf@ma.sdf.org> (raw)
In-Reply-To: <CAM=F=bBwjdx1==pY1j9dwCTyvwuX+=XdF9c_krkJogKVY0M4qQ@mail.gmail.com> (Lynn Winebarger's message of "Mon, 25 Jul 2022 08:49:27 -0400")

Lynn Winebarger <owinebar@gmail.com> writes:

> On Sun, Jul 24, 2022 at 12:31 PM Eli Zaretskii <eliz@gnu.org> wrote:
>>
>> > From: Lynn Winebarger <owinebar@gmail.com>
>> > Date: Sun, 24 Jul 2022 12:20:47 -0400
>> > Cc: michael.albinus@gmx.de, emacs-devel@gnu.org
>> >
>> > it seems like something undesirable is going on between dumping and
>> > the native compilation unit.
>>
>> I find this hard to believe.
>
> If I can recreate it in a more direct way on my personal machines, I'll put in a bug with details including the required
> modifications to tramp.el (to remove the problematic require of tramp-loaddefs).
> I also observed the same problem/fix with:
>   gnus/message
>   progmodes/gdb-mi
>   calc/calc-ext
>   gnus/gnus-sum
>   gnus/gnus-art
> More troublesome, though is that emacs segfaulted when it attempted to load nxml/rng-pttrn, whether loading
> native-compiled, byte-compiled, or source.
>
> Otherwise, I was able to resolve the various issues (including some extensive surgery on vc/ediff-X files to stamp out
> the circular loading).  I am going to have to do a real bootstrap to avoid the "incoherent eln" error, though, and
> somehow force native compilation for all the libraries loaded in the dump (that are not on the compiler's "forbidden"
> list, anyway).
>
>> Btw, you are aware that dumping *.eln files basically dumps just their
>> names, not their code?  And that, when you start Emacs after dumping,
>> it will load all of those *.eln files one by one, which takes time
>> (*.eln files are just shared libraries, like *.so files), and use up
>> shared-library and handle slots of the Emacs process?  So I'm not even
>> sure doing this would make sense from the performance POV: it could be
>> that startup will slower, not faster.
>
> I am aware that dumping the eln files produces an indirection to the shared library, but not the details of the
> implementation.
> I would expect (or at least hope) that the effect of the evaluation that is done on loading to be stored in the dump and
> for the shared libraries to get loaded into the process without repeating the evaluation.  So things like the order of
> customization groups should be fixed.

While resurrecting from a dump an eln is mapped into memory if (at
least) a native compiled function noted in the dump was loaded from it.
So yeah the dumped state is preserved a no top level re-evaluation is
happening.

BTW I think so far we do not support re-dumping Emacs twice with native
code.  This is not a deep technical limitaiton, it's only because how we
fixup relative eln paths to support installed and non installed builds,
we should probably work on this limitation...

BR

  Andrea



  parent reply	other threads:[~2022-07-25 20:11 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-24  0:47 Loading tramp for dump goes into infinite regress Lynn Winebarger
2022-07-24  7:55 ` Michael Albinus
2022-07-24 12:05   ` Lynn Winebarger
2022-07-24 12:23     ` Eli Zaretskii
2022-07-24 13:30       ` Lynn Winebarger
2022-07-24 13:34         ` Eli Zaretskii
2022-07-24 14:05           ` Lynn Winebarger
2022-07-24 14:09             ` Eli Zaretskii
2022-07-24 14:28               ` Lynn Winebarger
2022-07-24 16:00             ` Lynn Winebarger
2022-07-24 16:20               ` Lynn Winebarger
2022-07-24 16:31                 ` Eli Zaretskii
2022-07-25 12:49                   ` Lynn Winebarger
2022-07-25 13:56                     ` Eli Zaretskii
2022-07-26 11:24                       ` Lynn Winebarger
2022-07-27  0:58                         ` Lynn Winebarger
2022-07-27  2:48                           ` Lynn Winebarger
2022-07-27  8:31                             ` Lynn Winebarger
2022-08-09 12:29                       ` Lynn Winebarger
2022-08-09 12:36                         ` Po Lu
2022-08-09 13:22                           ` Lynn Winebarger
2022-08-09 13:42                             ` Po Lu
2022-08-09 15:55                               ` Lynn Winebarger
2022-07-25 16:54                     ` Stefan Monnier
2022-07-25 17:05                       ` Stefan Monnier
2022-07-26  0:28                       ` Lynn Winebarger
2022-07-26  1:10                         ` Lynn Winebarger
2022-08-06  6:07                       ` Lynn Winebarger
2022-08-06 12:57                         ` Lynn Winebarger
2022-08-06 15:39                           ` Lynn Winebarger
2022-08-06 20:23                             ` Working fully native-compiled "mega dump" (was Re: Loading tramp for dump goes into infinite regress) Lynn Winebarger
2022-08-06 20:52                               ` Lynn Winebarger
2022-07-25 20:11                     ` Andrea Corallo [this message]
2022-07-31 20:22                       ` Loading tramp for dump goes into infinite regress Lynn Winebarger
2022-08-03  9:58                         ` Lynn Winebarger
2022-08-03 12:22                           ` Eli Zaretskii
2022-08-03 14:53                             ` Native-compilation build process (was Re: Loading tramp for dump goes into infinite regress) Lynn Winebarger
2022-08-03 16:15                               ` Eli Zaretskii
2022-08-04  3:33                                 ` Lynn Winebarger
2022-08-05  1:57                                   ` Lynn Winebarger
2022-07-24 16:23               ` Loading tramp for dump goes into infinite regress 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=xjfsfmpkl5p.fsf@ma.sdf.org \
    --to=akrl@sdf.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=owinebar@gmail.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 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).