* bug#45515: 28.0.50; [feature/native-comp] emacsGcc crash on Apple Silicon M1
@ 2020-12-28 20:57 michal panoch
2020-12-29 9:01 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 13+ messages in thread
From: michal panoch @ 2020-12-28 20:57 UTC (permalink / raw)
To: 45515; +Cc: mp
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
In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.2.0, NS appkit-2022.20 Version 10.16 (Build 20C69))
Repository revision: 87f6e937995c433825173fb0473a801791d5beac
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2022
System Description: macOS 11.1
Configured using:
'configure
--prefix=/nix/store/9rsfjqclzwgsh63szkdb6mn2572pv9zi-emacs-gcc-20201217.0
--disable-build-details --with-modules --with-ns
--disable-ns-self-contained --with-nativecomp
CFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=101200'
Configured features:
JPEG TIFF PNG RSVG GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS NS MODULES NATIVE_COMP THREADS JSON PDUMPER
Important settings:
value of $LC_CTYPE: UTF-8
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs auth-source eieio eieio-core eieio-loaddefs
password-cache json map text-property-search time-date mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils comp
comp-cstr warnings subr-x rx cl-extra help-mode easymenu seq cl-seq
byte-opt cl-macs gv jka-compr cl-loaddefs cl-lib bytecomp byte-compile
cconv iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face pcase macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads kqueue cocoa ns multi-tty
make-network-process nativecomp emacs)
Memory information:
((conses 16 85548 8869)
(symbols 48 7929 1)
(strings 32 23659 2908)
(string-bytes 1 870425)
(vectors 16 15702)
(vector-slots 8 305764 19876)
(floats 8 31 37)
(intervals 56 198 0)
(buffers 984 11))
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#45515: 28.0.50; [feature/native-comp] emacsGcc crash on Apple Silicon M1
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
0 siblings, 1 reply; 13+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-12-29 9:01 UTC (permalink / raw)
To: michal panoch; +Cc: mp, 45515
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#45515: 28.0.50; [feature/native-comp] emacsGcc crash on Apple Silicon M1
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
0 siblings, 1 reply; 13+ messages in thread
From: mp @ 2020-12-29 15:07 UTC (permalink / raw)
To: 45515
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)
(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,
further debugging may prove unreliable.
Quit this debugging session? (y or n) n
This is a bug, please report it. For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.
../../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,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n
Command aborted.
Error calling thread_get_state for GP registers for thread 0x2a03
warning: Mach error at "../../gdb/i386-darwin-nat.c:83" in function
"virtual void i386_darwin_nat_target::fetch_registers(struct regcache *,
int)": (ipc/send) invalid destination port (0x10000003)
any idea how to proceed?
-mp-
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#45515: 28.0.50; [feature/native-comp] emacsGcc crash on Apple Silicon M1
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
2020-12-30 0:42 ` mp
0 siblings, 2 replies; 13+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-12-29 15:33 UTC (permalink / raw)
To: mp; +Cc: 45515
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? 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
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#45515: 28.0.50; [feature/native-comp] emacsGcc crash on Apple Silicon M1
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
2020-12-29 16:00 ` Alan Third
2020-12-30 0:42 ` mp
1 sibling, 1 reply; 13+ messages in thread
From: mp @ 2020-12-29 15:45 UTC (permalink / raw)
To: 45515
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-
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#45515: 28.0.50; [feature/native-comp] emacsGcc crash on Apple Silicon M1
2020-12-29 15:45 ` mp
@ 2020-12-29 16:00 ` Alan Third
2020-12-29 16:46 ` mp
2020-12-30 20:25 ` mp
0 siblings, 2 replies; 13+ messages in thread
From: Alan Third @ 2020-12-29 16:00 UTC (permalink / raw)
To: mp; +Cc: 45515
On Tue, Dec 29, 2020 at 04:45:05PM +0100, mp wrote:
> 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>
Looks like it's trying to draw when the destination hasn't been set...
What was going on when it crashed? Were you changing to another
application?
It may be worth trying a more up to date merge from master as there's
been a wee bit of work on the NS port recently.
--
Alan Third
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#45515: 28.0.50; [feature/native-comp] emacsGcc crash on Apple Silicon M1
2020-12-29 16:00 ` Alan Third
@ 2020-12-29 16:46 ` mp
2020-12-30 20:25 ` mp
1 sibling, 0 replies; 13+ messages in thread
From: mp @ 2020-12-29 16:46 UTC (permalink / raw)
To: 45515
On 29.12.2020 17:00, Alan Third wrote:
> On Tue, Dec 29, 2020 at 04:45:05PM +0100, mp wrote:
>> 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>
> Looks like it's trying to draw when the destination hasn't been set...
> What was going on when it crashed? Were you changing to another
> application?
not really, it was just sitting there and then crashed..
> It may be worth trying a more up to date merge from master as there's
> been a wee bit of work on the NS port recently.
recompiling now, will try and report back..
-mp-
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#45515: 28.0.50; [feature/native-comp] emacsGcc crash on Apple Silicon M1
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
@ 2020-12-30 0:42 ` mp
1 sibling, 0 replies; 13+ messages in thread
From: mp @ 2020-12-30 0:42 UTC (permalink / raw)
To: 45515
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? 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-
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#45515: 28.0.50; [feature/native-comp] emacsGcc crash on Apple Silicon M1
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
1 sibling, 1 reply; 13+ messages in thread
From: mp @ 2020-12-30 20:25 UTC (permalink / raw)
To: 45515
Ok, so the problem persists, now it takes longer for emacs daemon to crash..
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] 6134 abort emacs --fg-daemon
emacs --fg-daemon 528.80s user 46.86s system 36% cpu 26:32.46 total
-mp-
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#45515: 28.0.50; [feature/native-comp] emacsGcc crash on Apple Silicon M1
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
0 siblings, 1 reply; 13+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-12-31 13:59 UTC (permalink / raw)
To: mp; +Cc: 45515
mp <michal@panoch.net> writes:
> Ok, so the problem persists, now it takes longer for emacs daemon to crash..
>
> 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] 6134 abort emacs --fg-daemon
> emacs --fg-daemon 528.80s user 46.86s system 36% cpu 26:32.46 total
>
> -mp-
Hi mp,
is this after having merged from latest master as Alan suggested?
I suspect this might be not related to native compilation but to the NS
port.
Thanks
Andrea
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#45515: 28.0.50; [feature/native-comp] emacsGcc crash on Apple Silicon M1
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
0 siblings, 1 reply; 13+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-01-02 10:29 UTC (permalink / raw)
To: 45515; +Cc: michal
Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:
> mp <michal@panoch.net> writes:
>
>> Ok, so the problem persists, now it takes longer for emacs daemon to crash..
>>
>> 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] 6134 abort emacs --fg-daemon
>> emacs --fg-daemon 528.80s user 46.86s system 36% cpu 26:32.46 total
>>
>> -mp-
>
> Hi mp,
>
> is this after having merged from latest master as Alan suggested?
>
> I suspect this might be not related to native compilation but to the NS
> port.
>
> Thanks
>
> Andrea
Hi Michal,
I've merged latest master into native-comp. Do you still see this
issue on 5db5064395?
Andrea
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#45515: 28.0.50; [feature/native-comp] emacsGcc crash on Apple Silicon M1
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
0 siblings, 1 reply; 13+ messages in thread
From: mp @ 2021-01-02 18:56 UTC (permalink / raw)
To: 45515
On 02.01.2021 11:29, Andrea Corallo wrote:
> Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs@gnu.org> writes:
>
>> mp <michal@panoch.net> writes:
>>
>>> Ok, so the problem persists, now it takes longer for emacs daemon to crash..
>>>
>>> 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] 6134 abort emacs --fg-daemon
>>> emacs --fg-daemon 528.80s user 46.86s system 36% cpu 26:32.46 total
>>>
>>> -mp-
>> Hi mp,
>>
>> is this after having merged from latest master as Alan suggested?
>>
>> I suspect this might be not related to native compilation but to the NS
>> port.
>>
>> Thanks
>>
>> Andrea
> Hi Michal,
>
> I've merged latest master into native-comp. Do you still see this
> issue on 5db5064395?
>
> Andrea
>
Hi Andrea,
After merging the latest master, it looks good so far. It also appears
to be running faster, but not as fast as a regular emacs (non
native-comp) compiled for Apple architecture. Which runs about 10x faster!
Not sure if it is possible to compile the native-comp for Apple at this
point..?
-mp-
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#45515: 28.0.50; [feature/native-comp] emacsGcc crash on Apple Silicon M1
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
0 siblings, 0 replies; 13+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-01-02 21:11 UTC (permalink / raw)
To: mp; +Cc: 45515-done
mp <michal@panoch.net> writes:
>> Hi Michal,
>>
>> I've merged latest master into native-comp. Do you still see this
>> issue on 5db5064395?
>>
>> Andrea
>>
> Hi Andrea,
>
> After merging the latest master, it looks good so far.
Nice, I'm closing this for now, we can always reopen in case.
> It also appears to be running faster, but not as fast as a regular
> emacs (non native-comp) compiled for Apple architecture. Which runs
> about 10x faster!
>
> Not sure if it is possible to compile the native-comp for Apple at
> this point..?
I think we'll probably have to wait GCC 12.
Andrea
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2021-01-02 21:11 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.