unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: mp <michal@panoch.net>
To: 45515@debbugs.gnu.org
Subject: bug#45515: 28.0.50; [feature/native-comp] emacsGcc crash on Apple Silicon M1
Date: Tue, 29 Dec 2020 16:45:05 +0100	[thread overview]
Message-ID: <f64e68ee-ef58-300e-1e32-be75c4814080@panoch.net> (raw)
In-Reply-To: <xjf35zolj8n.fsf@sdf.org>

On 29.12.2020 16:33, Andrea Corallo wrote:

> mp <michal@panoch.net> writes:
>
>> On 29.12.2020 10:01, Andrea Corallo wrote:
>>
>>> michal panoch <michal@panoch.net> 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
>> <http://gnu.org/licenses/gpl.html>
>> 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:
>> <https://www.gnu.org/software/gdb/bugs/>.
>> Find the GDB manual and other documentation resources online at:
>>      <http://www.gnu.org/software/gdb/documentation/>.
>>
>> 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?
yep. its an X86 build.. the arm build fails for some reason..
>    You might be more
> lucky with lldb.

tried lldb, but it doesn't help much i guess:

2020-12-29 16:38:51.737315+0100 emacs[85147:7251664] [emacs] 
CGContextSetStrokeColorWithColor: invalid context 0x0. Backtrace:
   <NSColorSetWithFillAndStroke+165>
    <ns_draw_window_cursor+862>
     <display_and_set_cursor+2278>
      <update_cursor_in_window_tree+235>
       <update_cursor_in_window_tree+99>
        <-[EmacsView windowDidResignKey:]+162>
<__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__+12>
          <___CFXRegistrationPost_block_invoke+49>
           <_CFXRegistrationPost+454>
            <_CFXNotificationPost+787>
             <-[NSNotificationCenter 
postNotificationName:object:userInfo:]+59>
              <-[NSWindow resignKeyWindow]+725>
               <_NXEndKeyAndMain+162>
                <-[NSApplication _handleDeactivateEvent:]+756>
                 <-[NSApplication(NSEvent) sendEvent:]+2742>
                  <-[EmacsApp sendEvent:]+484>
                   <-[NSApplication _handleEvent:]+65>
                    <-[NSApplication run]+623>
                     <-[EmacsApp run]+404>
                      <ns_select+974>
                       <wait_reading_process_output+4132>
                        <sit_for+306>
                         <read_char+5162>
                          <read_key_sequence+2216>
                           <command_loop_1+1324>
                            <internal_condition_case+281>
                             <command_loop_2+48>
                              <internal_catch+279>
                               <command_loop+158>
                                <recursive_edit_1+115>
                                 <Frecursive_edit+347>
                                  <main+6880>
<start+1>                                          2
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.
Process 85147 exited with status = 0 (0x00000000) Terminated due to signal 6
(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).

i see, so there is not much to be done at this point../

-mp-







  reply	other threads:[~2020-12-29 15:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-28 20:57 bug#45515: 28.0.50; [feature/native-comp] emacsGcc crash on Apple Silicon M1 michal panoch
2020-12-29  9:01 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-29 15:07   ` mp
2020-12-29 15:33     ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-29 15:45       ` mp [this message]
2020-12-29 16:00         ` Alan Third
2020-12-29 16:46           ` mp
2020-12-30 20:25           ` mp
2020-12-31 13:59             ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-02 10:29               ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-02 18:56                 ` mp
2021-01-02 21:11                   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-30  0:42       ` mp

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=f64e68ee-ef58-300e-1e32-be75c4814080@panoch.net \
    --to=michal@panoch.net \
    --cc=45515@debbugs.gnu.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).