unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Pip Cet <pipcet@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: mwd@md5i.com, 46502@debbugs.gnu.org, akrl@sdf.org
Subject: bug#46502: 28.0.50; [feature/native-comp] (d3a399dd) native-comp bootstrap failure
Date: Sat, 20 Feb 2021 04:35:39 +0000	[thread overview]
Message-ID: <CAOqdjBdBk7+OiQCJkvczHeizAp99G7o-VxhQCe7hfig09jtLiA@mail.gmail.com> (raw)
In-Reply-To: <83ft1s2mp1.fsf@gnu.org>

On Fri, Feb 19, 2021 at 1:47 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Pip Cet <pipcet@gmail.com>
> > Date: Fri, 19 Feb 2021 13:31:49 +0000
> > Cc: akrl@sdf.org, mwd@md5i.com, 46502@debbugs.gnu.org
> >
> > > > One thing I've noticed in my experiments is that many builds that are
> > > > interrupted at the wrong point and then resumed produce different
> > > > results. I.e. you type "make", then hit Ctrl-C at the wrong time, then
> > > > type "make" again and you get a different result.
> > >
> > > What does "different result" mean in this case? is the produced .eln
> > > file different? or something else?
> >
> > There are differences both in the .elc and .eln, and I saw different
> > success/failure behavior but only with local modifications.
>
> Let's talk about *.elc files first, as this is not supposed to happen.

Okay. Here's what I'm seeing (master branch, interrupted after
macroexp.elc is compiled).

--- build-uninterrupted/lisp/emacs-lisp/bytecomp.elc    2021-02-20
01:13:51.706632694 +0000
+++ build-interrupted/lisp/emacs-lisp/bytecomp.elc    2021-02-20
02:26:57.242906775 +0000
-(defalias 'byte-compile-form #[513
"\211 :\204H\09\203 \0\211\305>\206
\0\306!\262\203+\09\203$\0\307!\210\310!\210\202\203A\0
   \203A\09\203<\0\307!\210\311
\202f\312!\210\202f@9\2031@\211\313N\314N\206\\\0\n>\315>\203\236\0
A\211:\203\235\0\211@\211:\203\234\0\211@\211\316=\203\233\0A\211:\203\232\0\211@A\211\204\230\0\211
>\203\227\0\317\320\321 \f
#!\210\210\266\210\210\210\210\322>\203\266\0
A\242\211\242\316=\203\265\0\323A@\311\"\210\210\324\325!\203\320\0\211\305>\206\306\0\306!\262\203\320\0\326\327
\"\210\324\314 \"\203\375\0\211\203\375\0\326\330
;\203\355\0\331\332\333  !\"\202\373\0 \334=\204\372\0\320\335
\"\202\373\0\336#\210 @K\242\337=\203 \317\331\340
@#!\210\203)\341!\203)\342=\204) !\266 \202f\343 !\266
\202f\344@!\203E\f\345>\203E\346!\210\202f@\242\347=\203b\350
!\211\262 =\204b\35\"\210\311 \202f\343!\21\205l\352
)\207" [byte-compile--for-effect byte-compile-delete-errors
byte-compile-interactive-only-functions byte-compile-lexical-variables
byte-optimize (nil t) keywordp byte-compile-set-symbol-position
byte-compile-constant nil byte-compile-variable-ref byte-compile
interactive-only (set symbol-value run-hooks add-hook remove-hook
run-hook-with-args run-hook-with-args-until-success
run-hook-with-args-until-failure) quote byte-compile-report-error
format-message "%s cannot use lexical var `%s'" (add-hook remove-hook)
byte-compile-check-variable byte-compile-warning-enabled-p suspicious
byte-compile-warn "`%s' called as a function" "`%s' is for interactive
use only%s" format "; %s" substitute-command-keys t "; use `%s'
instead." "." macro "`%s' defined after use in %S (missing `require'
of a library file?)" functionp cl-byte-compile-compiler-macro
byte-compile-normal-call byte-code-function-p (t lap)
byte-compile-unfold-bcf lambda macroexp--unfold-lambda
byte-compile-form byte-compile-discard] 17 (#$ . 90529)])
\350>\203\221\351!\210\202\262@\242\352=\203\256\353 !\211\262
=\204\256\35\"\210\306 \202\262\346!\21\205\270\355
)\207" [byte-compile--for-effect byte-compile-const-variables
byte-compile-delete-errors byte-compile-interactive-only-functions
byte-compile-lexical-variables byte-optimize nil (nil t) keywordp
boundp (setting-constant) t byte-compile-set-symbol-position
byte-compile-constant byte-compile-variable-ref byte-compile
interactive-only (set symbol-value run-hooks add-hook remove-hook
run-hook-with-args run-hook-with-args-until-success
run-hook-with-args-until-failure) quote byte-compile-report-error
format-message "%s cannot use lexical var `%s'" (add-hook remove-hook)
byte-compile-check-variable byte-compile-warning-enabled-p suspicious
byte-compile-warn "`%s' called as a function" "`%s' is for interactive
use only%s" format "; %s" substitute-command-keys "; use `%s'
instead." "." macro "`%s' defined after use in %S (missing `require'
of a library file?)" functionp cl-byte-compile-compiler-macro
byte-compile-normal-call byte-code-function-p (t lap)
byte-compile-unfold-bcf lambda macroexp--unfold-lambda
byte-compile-form byte-compile-discard] 17 (#$ . 90718)])

It looks like macroexp--const-symbol-p, a defsubst, is substituted in
both cases, but differently. This makes sense to me given the make
rules, and it's not harmful, but I don't like it.

> AFAIR, we write the bytecode into a temporary file, and then rename it
> atomically only when the compilation finishes successfully.  So
> interrupting should not do any harm, and therefore I'm curious what
> kind of differences in *.elc files do you see in these cases.

I'm not sure I'm seeing harmful differences, just ... differences.

So what happens on the three branches appears to be:

master: harmless differences between interrupted make and uninterrupted make
native-comp: interrupting make at the wrong point will sometimes
result in an unbuildable tree
local: interrupting make at the wrong point and resuming it will
sometimes succeed when the uninterrupted build wouldn't have

We should deal with the first two; the third is likely to be related
to my stack size limit or my local changes.

> > It's possible that this is all harmless, but I have the bad habit of
> > assuming I can just type "make" again and have it resume an
> > interrupted build, and that certainly does not work on the
> > native-comp branch (I'm not sure it works on the master branch).
> I'd suggest to start with master, as that is supposed to be much more
> mature.  If that turns out to work correctly (and (IME it is), then we
> could take a look at the native-comp branch, where there could be
> problems we didn't yet fix.

I'll leave it to you to decide whether the harmless differences I've
seen so far count as incorrect behavior.

> In general, Make itself will delete any target files it knows about
> that were not fully built at the time of SIGINT.  Maybe we don't tell
> Make enough about the files native-comp produces?

So we should delete the early-compilation .elcs if we end up deleting
bootstrap-emacs.pdmp, too?

I'll try getting a usable backtrace for the stack overflow.





  parent reply	other threads:[~2021-02-20  4:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-14  5:05 bug#46502: 28.0.50; [feature/native-comp] (d3a399dd) native-comp bootstrap failure Michael Welsh Duggan
2021-02-18  9:47 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-18 10:14   ` Pip Cet
2021-02-18 10:29     ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-18 14:34     ` Eli Zaretskii
2021-02-19 13:31       ` Pip Cet
2021-02-19 13:48         ` Eli Zaretskii
2021-02-19 14:26           ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-20  4:35           ` Pip Cet [this message]
2021-02-20  8:56             ` Eli Zaretskii
2021-02-20  9:15               ` Pip Cet
2021-02-20 11:21                 ` Eli Zaretskii
2021-02-20 11:48                   ` Eli Zaretskii
2021-02-20 12:03                     ` Pip Cet
2021-02-20 12:42                       ` Eli Zaretskii
2021-02-20 17:00                         ` Pip Cet
2021-02-20 17:18                           ` Eli Zaretskii
2021-02-20 15:42                   ` Stefan Monnier
2021-02-20 17:02                     ` Pip Cet
2021-02-20 17:12                       ` Stefan Monnier
     [not found]                         ` <jwvo8etr7hf.fsf-monnier+emacs@gnu.org>
2021-04-05  2:56                           ` Michael Welsh Duggan
2021-02-18 14:55   ` Michael Welsh Duggan
2021-02-18 15:12     ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=CAOqdjBdBk7+OiQCJkvczHeizAp99G7o-VxhQCe7hfig09jtLiA@mail.gmail.com \
    --to=pipcet@gmail.com \
    --cc=46502@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=eliz@gnu.org \
    --cc=mwd@md5i.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).