From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: mp Newsgroups: gmane.emacs.bugs Subject: bug#45515: 28.0.50; [feature/native-comp] emacsGcc crash on Apple Silicon M1 Date: Wed, 30 Dec 2020 01:42:58 +0100 Message-ID: <75419913-88e6-c40a-c2aa-f5fa77f0b480@panoch.net> References: <0c66af66-ff95-a198-67de-b62269bee0c9@panoch.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26670"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 To: 45515@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 30 01:44:10 2020 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 1kuPaz-0006p7-HF for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Dec 2020 01:44:09 +0100 Original-Received: from localhost ([::1]:44222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kuPay-0005VC-It for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Dec 2020 19:44:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kuPas-0005V3-24 for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2020 19:44:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57218) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kuPar-0004L5-RY for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2020 19:44:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kuPar-00022e-Mf for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2020 19:44:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: mp Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Dec 2020 00:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45515 X-GNU-PR-Package: emacs Original-Received: via spool by 45515-submit@debbugs.gnu.org id=B45515.16092889857778 (code B ref 45515); Wed, 30 Dec 2020 00:44:01 +0000 Original-Received: (at 45515) by debbugs.gnu.org; 30 Dec 2020 00:43:05 +0000 Original-Received: from localhost ([127.0.0.1]:40531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kuPZw-00021N-Th for submit@debbugs.gnu.org; Tue, 29 Dec 2020 19:43:05 -0500 Original-Received: from ms1.panoch.net ([89.22.65.5]:49994) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kuPZt-00020t-6i for 45515@debbugs.gnu.org; Tue, 29 Dec 2020 19:43:03 -0500 Original-Received: from mpm.local (unknown [10.19.249.102]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by ms1.panoch.net (Postfix) with ESMTP id 06646580B7F0D for <45515@debbugs.gnu.org>; Wed, 30 Dec 2020 01:42:59 +0100 (CET) In-Reply-To: Content-Language: en-US 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:196991 Archived-At: On 29.12.2020 16:33, Andrea Corallo wrote: > mp writes: > >> On 29.12.2020 10:01, Andrea Corallo wrote: >> >>> michal panoch writes: >>> >>>> hi, >>>> >>>> i'm on the new Apple Silicon M1 architecture and using nix emacs-overlay - https://github.com/nix-community/emacs-overlay/ >>>> >>>> like this: ~/.config/nixpkgs/overlays/emacs.nix >>>> >>>> import (builtins.fetchTarball { >>>> url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz; >>>> }) >>>> >>>> install whith: >>>> >>>> $ nix-env -iA nixpkgs.emacsGcc >>>> >>>> it compiles no problem. it runs and bytecompiles everything no problem, but after a while it crashes with: >>>> >>>> Assertion failed: (mach_vm_map(mach_task_self(), &address, size, 0, >>>> VM_FLAGS_ANYWHERE | >>>> VM_MAKE_TAG(VM_MEMORY_COREGRAPHICS_BACKINGSTORES), port, 0, false, >>>> prot, prot, VM_INHERIT_SHARE) == KERN_SUCCESS), function >>>> backing_map, file >>>> /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/SkyLight/SkyLight-569.6/SkyLight/Services/Windows/CGSBackingStore.c, >>>> line 192. Fatal error 6: Aborted [1] 2319 abort emacs --fg-daemon >>>> >>>> any idea how to investigate? >>>> >>>> uname -a: >>>> Darwin mpm.local 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec 2 20:40:21 PST 2020; root:xnu-7195.60.75~1/RELEASE_ARM64_T8101 arm64 >>> Hi Michal, >>> >>> this assertion is out of our code so doesn't ring any bell to me. >>> Running under a debugger to have a back-trace of the crash might give >>> more information. >>> >>> Thanks >>> >>> Andrea >> trying to run with gbd, but it doesn't seem to be working: >> >> mp@mpm:~ :$ gdb /Users/mp/.nix-profile/bin/emacs >> GNU gdb (GDB) 10.1 >> Copyright (C) 2020 Free Software Foundation, Inc. >> License GPLv3+: GNU GPL version 3 or later >> >> This is free software: you are free to change and redistribute it. >> There is NO WARRANTY, to the extent permitted by law. >> Type "show copying" and "show warranty" for details. >> This GDB was configured as "x86_64-apple-darwin". >> Type "show configuration" for configuration details. >> For bug reporting instructions, please see: >> . >> Find the GDB manual and other documentation resources online at: >>     . >> >> For help, type "help". >> Type "apropos word" to search for commands related to "word"... >> Reading symbols from /Users/mp/.nix-profile/bin/emacs... >> (No debugging symbols found in /Users/mp/.nix-profile/bin/emacs) > This build is stripped (no debug symbols). I'd build manually from > source to have 100% control leaving a side a layer (not a Nix expert of > user). > >> (gdb) r --fg-daemon >> Starting program: >> /nix/store/2y79kkpvkbjdd2jzdxx2w3p3mxdqpagf-user-environment/bin/emacs >> --fg-daemon >> [New Thread 0x2a03 of process 54326] >> [New Thread 0x2b03 of process 54326] >> ../../gdb/target.c:2149: internal-error: void >> target_mourn_inferior(ptid_t): Assertion `ptid == inferior_ptid' >> failed. >> A problem internal to GDB has been detected, > Looks like an internal problem of gdb? Perhaps gdb doesn't like to run > under rosetta? Is this an X86 gdb build correct? You might be more > lucky with lldb. > > That said I think to have native-comp running native on M1 GCC will have > to be ported and AFAIK this has still not be done (at list in GCC > trunk). > > Hope it helps > > Andrea looks like it has been fixed.. after installing new nix package emacs-gcc-20201229.0 it hasn't crashed yet.. -mp-