From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#46256: [feature/native-comp] AOT eln files ignored if run from build tree Date: Wed, 03 Mar 2021 20:21:38 +0000 Message-ID: References: <865z3866my.fsf@gmail.com> <865z38a9vo.fsf@gmail.com> <86eehujcip.fsf@gmail.com> <86blch14qt.fsf@gmail.com> <83h7m84h9g.fsf@gnu.org> <86v9ao5czu.fsf@gmail.com> <86wnutogrh.fsf@gmail.com> <86wnut8fb9.fsf@gmail.com> <861rd1tbpa.fsf@gmail.com> <83pn0km6y3.fsf@gnu.org> <86ft1f8ara.fsf@gmail.com> <83sg5cjdn8.fsf@gnu.org> <83r1kwjcy2.fsf@gnu.org> <83k0qoj9zv.fsf@gnu.org> <83im68j963.fsf@gnu.org> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18225"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 46256@debbugs.gnu.org, andrewjmoreton@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 03 21:22:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lHY0Z-0004b0-3V for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Mar 2021 21:22:11 +0100 Original-Received: from localhost ([::1]:42192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHY0Y-0002LO-4w for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Mar 2021 15:22:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56520) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHY0Q-0002Ks-Ka for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 15:22:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHY0Q-0002jF-DL for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 15:22:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lHY0Q-0004Lw-9n for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 15:22:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Mar 2021 20:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46256 X-GNU-PR-Package: emacs Original-Received: via spool by 46256-submit@debbugs.gnu.org id=B46256.161480290416697 (code B ref 46256); Wed, 03 Mar 2021 20:22:02 +0000 Original-Received: (at 46256) by debbugs.gnu.org; 3 Mar 2021 20:21:44 +0000 Original-Received: from localhost ([127.0.0.1]:57111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHY07-0004LF-UO for submit@debbugs.gnu.org; Wed, 03 Mar 2021 15:21:44 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:65146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHY05-0004Kq-H2 for 46256@debbugs.gnu.org; Wed, 03 Mar 2021 15:21:42 -0500 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 123KLcPj022319 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Wed, 3 Mar 2021 20:21:39 GMT In-Reply-To: <83im68j963.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 03 Mar 2021 22:04:36 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:201328 Archived-At: Eli Zaretskii writes: >> Date: Wed, 03 Mar 2021 21:46:44 +0200 >> From: Eli Zaretskii >> Cc: 46256@debbugs.gnu.org, andrewjmoreton@gmail.com >> >> > emacs_abort at src/w32fns.c:10947 >> > terminate_due_to_signal at src/emacs.c:417 >> > die at src/alloc.c:7452 >> > XNATIVE_COMP_UNIT at src/comp.h:70 >> > load_comp_unit at src/comp.c:4766 >> > syms_of_comp at src/comp.c:5077 >> > Fload at src/lread.c:1548 >> >> It looks like these crashes are when compiling subr-x, because I see >> zero-sized subr-x-XXXXX.eln.tmp files in the eln-cache directory. > > Yes: > > (gdb) r -batch -l comp -f batch-native-compile ../lisp/emacs-lisp/subr-x.el > Starting program: D:\gnu\git\emacs\native-comp\src\emacs.exe -batch -l comp -f batch-native-compile ../lisp/emacs-lisp/subr-x.el > warning: Enabling Low Fragmentation Heap failed: error 31 > [New Thread 14244.0x320c] > [New Thread 14244.0x3540] > [Thread 14244.0x3540 exited with code 1] > Debugger entered--Lisp error: (native-compiler-error "../lisp/emacs-lisp/subr-x.el" "\nException 0xc0000005 at this address:\n07cdac3e\n\nB...") > signal(native-compiler-error ("../lisp/emacs-lisp/subr-x.el" "\nException 0xc0000005 at this address:\n07cdac3e\n\nB...")) > comp--native-compile("../lisp/emacs-lisp/subr-x.el") > batch-native-compile() > command-line-1(("-l" "comp" "-f" "batch-native-compile" "../lisp/emacs-lisp/subr-x.el")) > command-line() > normal-top-level() > > So the async compilation process crashes with SIGSEGV when compiling > subr-x.el. > > Andrea, can you help me figure out the command line with which the > async compilation subprocess is invoked in this case? I'd like to run > it as a foreground process under a debugger, and see why it crashes. Yes, each async compilation runs executing a temporary (not to exceed the max command line length on Windows) Elisp file. This file is created by `comp-run-async-workers'. One can put a print there to have the name of this file (and execute it regularly with emacs -batch -l ...) to have the reproducer or look into the temporary directory for the most recent emacs-async-comp-...something... file. Andrea PS ATM I see a crash too in my 32bit wide-int setup here, this is while executing a top_level_run function loading a .eln file. I need to compile a more recent gdb to look into this further but it looks something basic is going wrong there.