unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lynn Winebarger <owinebar@gmail.com>
To: Andrea Corallo <akrl@sdf.org>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, Joseph Mingrone <jrm@ftfl.ca>,
	emacs-devel <emacs-devel@gnu.org>,
	emacs@freebsd.org
Subject: Re: --with-native-compilation build failure on 32-bit systems
Date: Mon, 8 Aug 2022 09:55:11 -0400	[thread overview]
Message-ID: <CAM=F=bCTm5Jz7VuvSAJTyUoNJuxL=h4vs==qx_Yywcf-yZJnVQ@mail.gmail.com> (raw)
In-Reply-To: <xjfwnbij2rl.fsf@ma.sdf.org>

[-- Attachment #1: Type: text/plain, Size: 3490 bytes --]

On Mon, Aug 8, 2022, 9:14 AM Andrea Corallo <akrl@sdf.org> wrote:

> Lynn Winebarger <owinebar@gmail.com> writes:
>
> > On Mon, Aug 8, 2022, 3:44 AM Andrea Corallo <akrl@sdf.org> wrote:
> >
> >  Lynn Winebarger <owinebar@gmail.com> writes:
> >
> >  > On Fri, Aug 5, 2022, 10:42 AM Andrea Corallo <akrl@sdf.org> wrote:
> >  >
> >  >  Andrea Corallo <akrl@sdf.org> writes:
> >  >
> >  >  > Lars Ingebrigtsen <larsi@gnus.org> writes:
> >  >  >
> >  >  >> Joseph Mingrone <jrm@ftfl.ca> writes:
> >  >  >>
> >  >  >>> Could 261d6af have broken --with-native-compilation builds on
> 32-bit
> >  >  >>> systems?  This is what I see building in a clean FreeBSD/i386
> 13.0
> >  >  >>> jail using 261d6af:
> >  >  >>>
> http://pkg.ftfl.ca/data/13i386-default/2022-08-04_22h38m28s/logs/errors/emacs-devel-29.0.50.20220804,2.log
> >  >  >>
> >  >  >> I guess these are the error messages?
> >  >  >>
> >  >  >> emacs: Trying to load incoherent dumped eln file
> >  >  >>
> >  >
> >
> /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-261d6af/native-lisp/29.0.50-7cc1a43d/preloaded/ediff-hook-0b92f1a2-f843c8a0.eln
> >
> >  >
> >  >  >>
> >  >  >> I don't know what that means; Andrea added to the CCs.
> >  >  >
> >  >  > It's very surprising to see 261d6af causing this side effect, at
> least I
> >  >  > don't see why should effect the 32bit build only.
> >  >  >
> >  >  > I'm trying to reproduce it on my 32bit env.
> >  >
> >  >  I confirm the build it's broken on my 32bit env as well, (but not on
> the
> >  >  64 one).
> >  >
> >  >  Loading the second dump, while we are relocating the ediff-hook
> >  >  compilation unit, we realize (@ pdumper.c:5304) that its file field
> is
> >  >  not a cons as expected but just a string.
> >  >
> >  >  Now the question is why this is not fixed-up in loadup.el:477 as for
> the
> >  >  other compilation units?
> >  >
> >  > Are you sure it's actually fixed up in the other compilation units?
> >
> >  Indeed, otherwise an error is signaled.
> >
> >  > This problem should be signaled by loadup if there are any NCUs it
> does not fix up.  It would be a lot easier to
> >  diagnose
> >  > the problem from there.
> >
> >  loadup is in charge of fixing up on all CU's file fields, and indeed if
> >  something goes wrong in that code an error is signaled.  But evidently
> >  this is not the case, so there's something more to understand.
> >
> > I just looked, and there are 2 possible paths for NCUs to be in the dump
> without an error being signaled:
> > 1 - either the --bin-dest or --eln-dest flag is not specified (or is
> > on the command line but empty)
>
> This is not the case in our build.
>

No, but it is one way the dump can produce an unusable file without any
error signaled until an Emacs instance attempts to load it.

>
> > 2 - there is an NCU loaded for which no symbol is bound to a subr in
> that NCU.
>
> CUs that are not reachable from the function slot of a symbol are
> unloaded when GC runs.  We do run GC before dumping so this should not
> happen.


Yes, "should" is the operative word there.  Why not validate the condition
before writing the dump file?  If not in loadup, then in the procedure that
records the NCU in the dump?  Why wait until load-time to catch something
that was almost certainly (barring user performing surgery on the dump
file) the case when the dump was produced?  Just put the same check before
the "write" operation that is  done immediately after the corresponding
"read" operation.

Lynn

[-- Attachment #2: Type: text/html, Size: 5560 bytes --]

  reply	other threads:[~2022-08-08 13:55 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05  2:12 --with-native-compilation build failure on 32-bit systems Joseph Mingrone
2022-08-05 11:58 ` Lars Ingebrigtsen
2022-08-05 13:30   ` Andrea Corallo
2022-08-05 14:40     ` Andrea Corallo
2022-08-05 15:16       ` Lynn Winebarger
2022-08-08  7:44         ` Andrea Corallo
2022-08-08 10:22           ` Lynn Winebarger
2022-08-08 13:14             ` Andrea Corallo
2022-08-08 13:55               ` Lynn Winebarger [this message]
2022-08-08 14:13                 ` Andrea Corallo
2022-08-09  9:11       ` Andrea Corallo
2022-08-09  9:21         ` Andrea Corallo
2022-08-09  9:48           ` Po Lu
2022-08-09 10:03             ` Andrea Corallo
2022-08-09 10:10               ` Po Lu
2022-08-09 10:20           ` Lynn Winebarger
2022-08-09 11:16           ` Eli Zaretskii
2022-08-17 19:59             ` Andrea Corallo
2022-08-17 21:01               ` Andrea Corallo
2022-08-18  5:30                 ` Eli Zaretskii
2022-08-18  8:06                   ` Andrea Corallo
2022-08-18  8:15                     ` Eli Zaretskii
2022-08-18  9:08                       ` Andrea Corallo
2022-08-18  8:31                     ` Po Lu
2022-08-18 11:48                     ` Joseph Mingrone
2022-08-18 13:40                   ` Stefan Monnier
2022-08-18 13:47                     ` Lynn Winebarger
2022-08-18 14:49                     ` Andrea Corallo
2022-08-18  5:17               ` Eli Zaretskii
2022-08-18  7:59                 ` Andrea Corallo
2022-08-18  8:14                   ` Eli Zaretskii
2022-08-18  9:06                     ` Andrea Corallo
2022-08-18  9:45                       ` Eli Zaretskii
2022-08-18  9:57                         ` Andrea Corallo
2022-08-18 10:31                           ` Eli Zaretskii
2022-08-18 11:08                             ` Andrea Corallo
2022-08-18 13:08                               ` Eli Zaretskii
2022-08-18 14:09                                 ` Andrea Corallo
2022-08-18 14:22                                   ` Eli Zaretskii
2022-08-18 14:50                                     ` Andrea Corallo
2022-08-18 15:57                                       ` Eli Zaretskii
2022-08-18 16:42                                         ` Andrea Corallo
2022-08-18 17:11                                           ` Eli Zaretskii
2022-08-18 19:35                                             ` Andrea Corallo
2022-08-19  5:49                                               ` Eli Zaretskii
2022-08-19  8:11                                                 ` Andrea Corallo
2022-08-09 15:32           ` Lars Ingebrigtsen

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='CAM=F=bCTm5Jz7VuvSAJTyUoNJuxL=h4vs==qx_Yywcf-yZJnVQ@mail.gmail.com' \
    --to=owinebar@gmail.com \
    --cc=akrl@sdf.org \
    --cc=emacs-devel@gnu.org \
    --cc=emacs@freebsd.org \
    --cc=jrm@ftfl.ca \
    --cc=larsi@gnus.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).