GNU bug report logs - #51308
29.0.50; A number of tests fail with AOT

Previous Next

Package: emacs;

Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>

Date: Wed, 20 Oct 2021 18:21:02 UTC

Severity: normal

Merged with 52138

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51308 in the body.
You can then email your comments to 51308 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#51308; Package emacs. (Wed, 20 Oct 2021 18:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lars Ingebrigtsen <larsi <at> gnus.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 20 Oct 2021 18:21:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: bug-gnu-emacs <at> gnu.org
Cc: Andrea Corallo <akrl <at> sdf.org>
Subject: 29.0.50; A number of tests fail with AOT
Date: Wed, 20 Oct 2021 20:20:44 +0200
With

NATIVE_FULL_AOT=1 make -j16 bootstrap

a number of tests fail:

SUMMARY OF TEST RESULTS
-----------------------
Files examined: 375
Ran 5645 tests, 5513 results as expected, 8 unexpected, 124 skipped
5 files contained unexpected results:
  lisp/net/socks-tests.log
  lisp/loadhist-tests.log
  lisp/hi-lock-tests.log
  lisp/emacs-lisp/ert-tests.log
  lisp/calendar/todo-mode-tests.log

I have not tried to debug this further, but a cursory look at the
backtraces seems to suggest the failures might have something to do with
redefining functions -- but that's just a guess.


In GNU Emacs 29.0.50 (build 39, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0)
 of 2021-10-20 built on elva
Repository revision: 62591c164cd6d0b0555e11b160ffa81bd3bb010f
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux bookworm/sid


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51308; Package emacs. (Wed, 20 Oct 2021 18:29:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51308 <at> debbugs.gnu.org, akrl <at> sdf.org
Subject: Re: bug#51308: 29.0.50; A number of tests fail with AOT
Date: Wed, 20 Oct 2021 21:28:07 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Wed, 20 Oct 2021 20:20:44 +0200
> Cc: Andrea Corallo <akrl <at> sdf.org>
> 
> Files examined: 375
> Ran 5645 tests, 5513 results as expected, 8 unexpected, 124 skipped
> 5 files contained unexpected results:
>   lisp/net/socks-tests.log
>   lisp/loadhist-tests.log
>   lisp/hi-lock-tests.log
>   lisp/emacs-lisp/ert-tests.log
>   lisp/calendar/todo-mode-tests.log
> 
> I have not tried to debug this further, but a cursory look at the
> backtraces seems to suggest the failures might have something to do with
> redefining functions -- but that's just a guess.

Code that redefines functions which are in *.eln files should disable
native-compilation.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51308; Package emacs. (Thu, 21 Oct 2021 03:05:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 51308 <at> debbugs.gnu.org, akrl <at> sdf.org
Subject: Re: bug#51308: 29.0.50; A number of tests fail with AOT
Date: Thu, 21 Oct 2021 05:04:44 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Code that redefines functions which are in *.eln files should disable
> native-compilation.

Isn't it possible to flet natively compiled functions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51308; Package emacs. (Thu, 21 Oct 2021 04:21:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 51308 <at> debbugs.gnu.org
Cc: Andrea Corallo <akrl <at> sdf.org>
Subject: Re: bug#51308: 29.0.50; A number of tests fail with AOT
Date: Thu, 21 Oct 2021 06:20:36 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> 5 files contained unexpected results:
>   lisp/net/socks-tests.log

This is now fixed.

>   lisp/loadhist-tests.log

This is a bug-ish.  If dired isn't natively-compiled:

(locate-file "dired" load-path (get-load-suffixes))
=> "/home/larsi/src/emacs/trunk/lisp/dired.elc"

But if it is, then we return the .el file instead:

(locate-file "dired" load-path (get-load-suffixes))
=> "/home/larsi/src/emacs/trunk/lisp/dired.el"

But load-history has:

 ("/home/larsi/src/emacs/emacs-28/lisp/dired.elc"

Which means that we can't find the .elc file by looking into
load-history based on locate-file.

Returning the .elc file would fix this, but I don't know what other
repercussions there might be.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51308; Package emacs. (Thu, 21 Oct 2021 04:32:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 51308 <at> debbugs.gnu.org
Cc: Andrea Corallo <akrl <at> sdf.org>
Subject: Re: bug#51308: 29.0.50; A number of tests fail with AOT
Date: Thu, 21 Oct 2021 06:31:26 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Files examined: 375
> Ran 5645 tests, 5513 results as expected, 8 unexpected, 124 skipped
> 5 files contained unexpected results:
>   lisp/net/socks-tests.log
>   lisp/loadhist-tests.log
>   lisp/hi-lock-tests.log
>   lisp/emacs-lisp/ert-tests.log
>   lisp/calendar/todo-mode-tests.log

I've now fixed

>   lisp/hi-lock-tests.log
>   lisp/calendar/todo-mode-tests.log

which were about wrong number of parameters (which native-comp is more
strict about) when redefining functions.

>   lisp/emacs-lisp/ert-tests.log

is about

(backtrace-frame-fun (car (ert-test-failed-backtrace result)))
=> ert-fail

(car (ert-test-failed-backtrace result))
=> #s(backtrace-frame t ert-fail ("foo") nil ((debugger-may-continue . t) (inhibit-redisplay) (inhibit-debugger . t) (inhibit-changing-match-data)) nil nil)

while it's `signal' when ert isn't natively compiled.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Forcibly Merged 51308 52138. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 27 Nov 2021 13:07:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51308; Package emacs. (Sat, 12 Mar 2022 21:34:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 51308 <at> debbugs.gnu.org
Cc: 52138 <at> debbugs.gnu.org, Andrea Corallo <akrl <at> sdf.org>
Subject: Re: bug#52138: 29.0.50; Some tests fail on emba when run with
 native compilation
Date: Sat, 12 Mar 2022 22:32:57 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> This is a bug-ish.  If dired isn't natively-compiled:
>
> (locate-file "dired" load-path (get-load-suffixes))
> => "/home/larsi/src/emacs/trunk/lisp/dired.elc"
>
> But if it is, then we return the .el file instead:
>
> (locate-file "dired" load-path (get-load-suffixes))
> => "/home/larsi/src/emacs/trunk/lisp/dired.el"
>
> But load-history has:
>
>  ("/home/larsi/src/emacs/emacs-28/lisp/dired.elc"
>
> Which means that we can't find the .elc file by looking into
> load-history based on locate-file.
>
> Returning the .elc file would fix this, but I don't know what other
> repercussions there might be.

I've now done this change (which fixes this test failure), and I don't
see any other regressions, so I've pushed it to Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51308; Package emacs. (Sat, 12 Mar 2022 21:43:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 51308 <at> debbugs.gnu.org
Cc: 52138 <at> debbugs.gnu.org, Andrea Corallo <akrl <at> sdf.org>
Subject: Re: bug#52138: 29.0.50; Some tests fail on emba when run with
 native compilation
Date: Sat, 12 Mar 2022 22:42:14 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> while it's `signal' when ert isn't natively compiled.

I've now fixed this in the test, but it's not clear that that's the
correct thing to do here.  But at least this makes EMBA have one less
failure.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 52138 <at> debbugs.gnu.org and Michael Albinus <michael.albinus <at> gmx.de> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 12 Mar 2022 21:43:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51308; Package emacs. (Sun, 13 Mar 2022 05:47:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52138 <at> debbugs.gnu.org, 51308 <at> debbugs.gnu.org, akrl <at> sdf.org
Subject: Re: bug#51308: bug#52138: 29.0.50;
 Some tests fail on emba when run with native compilation
Date: Sun, 13 Mar 2022 07:45:43 +0200
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Sat, 12 Mar 2022 22:32:57 +0100
> Cc: 52138 <at> debbugs.gnu.org, Andrea Corallo <akrl <at> sdf.org>
> 
> > Returning the .elc file would fix this, but I don't know what other
> > repercussions there might be.
> 
> I've now done this change (which fixes this test failure), and I don't
> see any other regressions, so I've pushed it to Emacs 29.

Did you check that loading a .elc file via load-library still triggers
async native-compilation when there's no .eln file or it is not
up-to-date with the .el file?  And what about loading a .el or .elc
file with an explicit extension -- that should NOT trigger
native-compilation even if there's no up-to-date .eln file.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51308; Package emacs. (Sun, 13 Mar 2022 14:16:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52138 <at> debbugs.gnu.org, 51308 <at> debbugs.gnu.org, akrl <at> sdf.org
Subject: Re: bug#51308: bug#52138: 29.0.50; Some tests fail on emba when run
 with native compilation
Date: Sun, 13 Mar 2022 15:14:56 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> Did you check that loading a .elc file via load-library still triggers
> async native-compilation when there's no .eln file or it is not
> up-to-date with the .el file?

Yes, I didn't see any noticeable difference before or after the patch in
that regard.

> And what about loading a .el or .elc
> file with an explicit extension -- that should NOT trigger
> native-compilation even if there's no up-to-date .eln file.

Didn't try that.  Let's see...  if I do

(load "~/src/emacs/trunk/lisp/battery.el")

or

(load "~/src/emacs/trunk/lisp/battery.elc")

then no .eln compilation is started.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51308; Package emacs. (Sun, 13 Mar 2022 16:42:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52138 <at> debbugs.gnu.org, 51308 <at> debbugs.gnu.org, akrl <at> sdf.org
Subject: Re: bug#51308: bug#52138: 29.0.50; Some tests fail on emba when run
 with native compilation
Date: Sun, 13 Mar 2022 18:40:58 +0200
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: 51308 <at> debbugs.gnu.org,  52138 <at> debbugs.gnu.org,  akrl <at> sdf.org
> Date: Sun, 13 Mar 2022 15:14:56 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > And what about loading a .el or .elc
> > file with an explicit extension -- that should NOT trigger
> > native-compilation even if there's no up-to-date .eln file.
> 
> Didn't try that.  Let's see...  if I do
> 
> (load "~/src/emacs/trunk/lisp/battery.el")
> 
> or
> 
> (load "~/src/emacs/trunk/lisp/battery.elc")
> 
> then no .eln compilation is started.

Great, that's the correct behavior.  Thanks.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 11 Apr 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 15 days ago.

Previous Next


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