homebrew-emacs-plus
homebrew-emacs-plus copied to clipboard
[General]: Crash on Sonoma 14.6
Issue description
I am using doom emacs with emacs-plus (with native-comp and poll). It randomly crashes with the following error code
➜ doom run
Fatal error 6: Aborted
/var/folders/j4/xnp99by57dqc_hlwh8s6xs8c0000gn/T//doom.7527.0.sh: line 6: 7618 Abort trap: 6 HOME="/var/folders/j4/xnp99by57dqc_hlwh8s6xs8c0000gn/T/doom.run" Emacs
The crash report is
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Emacs [7618]
Path: /opt/homebrew/*/Emacs.app/Contents/MacOS/Emacs
Identifier: org.gnu.Emacs
Version: Version 29.4 (9.0)
Code Type: ARM-64 (Native)
Parent Process: bash [7601]
Responsible: wezterm-gui [1077]
User ID: 501
Date/Time: 2024-08-07 15:29:05.2254 +0200
OS Version: macOS 14.6 (23G80)
Report Version: 12
Anonymous UUID: 1916A380-19C2-9305-D876-7D160D65F6C0
Time Awake Since Boot: 5400 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process: Emacs [7618]
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x184aed5f0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x184b25c20 pthread_kill + 288
2 libsystem_c.dylib 0x1849fc1e0 raise + 32
3 Emacs 0x102d242dc terminate_due_to_signal + 212
4 Emacs 0x102d24b1c emacs_abort + 20
5 Emacs 0x102cedf54 ns_term_shutdown + 144
6 Emacs 0x102bb2e50 shut_down_emacs + 332
7 Emacs 0x102d242a4 terminate_due_to_signal + 156
8 Emacs 0x102d24b1c emacs_abort + 20
9 Emacs 0x102c43a8c signal_or_quit + 2504
10 Emacs 0x102d266e0 Fsignal + 36
11 Emacs 0x102d26700 xsignal + 12
12 Emacs 0x102d264a4 xsignal2 + 32
13 Emacs 0x102d25cec wrong_type_argument + 28
14 highlight-indent-guides-0ced38b0-177eecb8.eln 0x179d1bd84 setcar.constprop.0.isra.0 + 68
15 highlight-indent-guides-0ced38b0-177eecb8.eln 0x179d25844 F686967686c696768742d696e64656e742d6775696465732d2d6269746d61702d686967686c696768746572_highlight_indent_guides__bitmap_highlighter_0 + 1156
16 Emacs 0x102c3f57c eval_sub + 2012
17 Emacs 0x102c443b0 Feval + 88
18 font-lock-895216f6-1f3b244f.eln 0x10714d860 F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_17 + 160
19 font-lock-895216f6-1f3b244f.eln 0x10714e86c F666f6e742d6c6f636b2d666f6e746966792d6b6579776f7264732d726567696f6e_font_lock_fontify_keywords_region_0 + 940
20 Emacs 0x102c4195c Ffuncall + 396
21 font-lock-895216f6-1f3b244f.eln 0x10714b214 F666f6e742d6c6f636b2d64656661756c742d666f6e746966792d726567696f6e_font_lock_default_fontify_region_0 + 564
22 Emacs 0x102c4195c Ffuncall + 396
23 font-lock-895216f6-1f3b244f.eln 0x10714a1ec F666f6e742d6c6f636b2d666f6e746966792d726567696f6e_font_lock_fontify_region_0 + 140
24 Emacs 0x102c8d820 exec_byte_code + 3032
25 Emacs 0x102c4195c Ffuncall + 396
26 Emacs 0x102c452ec Frun_hook_wrapped + 244
27 jit-lock-8a988e43-a9956d8b.eln 0x109e30be4 F6a69742d6c6f636b2d2d72756e2d66756e6374696f6e73_jit_lock__run_functions_0 + 196
28 Emacs 0x102c4195c Ffuncall + 396
29 jit-lock-8a988e43-a9956d8b.eln 0x109e30f6c F6a69742d6c6f636b2d666f6e746966792d6e6f77_jit_lock_fontify_now_0 + 644
30 Emacs 0x102c4195c Ffuncall + 396
31 jit-lock-8a988e43-a9956d8b.eln 0x109e30920 F6a69742d6c6f636b2d66756e6374696f6e_jit_lock_function_0 + 576
32 Emacs 0x102c4195c Ffuncall + 396
33 Emacs 0x102c42d2c internal_condition_case_n + 332
34 Emacs 0x102b0784c safe__call + 304
35 Emacs 0x102b07710 safe_call + 40
36 Emacs 0x102b2fca4 handle_fontified_prop + 700
37 Emacs 0x102b2ecdc handle_stop + 80
38 Emacs 0x102b31ab4 next_element_from_buffer + 240
39 Emacs 0x102b0103c get_next_display_element + 72
40 Emacs 0x102b1607c display_line + 1040
41 Emacs 0x102b15a14 try_window + 228
42 Emacs 0x102b3c9f8 redisplay_window + 10744
43 Emacs 0x102b39ff4 redisplay_window_0 + 44
44 Emacs 0x102c42a74 internal_condition_case_1 + 268
45 Emacs 0x102b39618 redisplay_windows + 108
46 Emacs 0x102b39650 redisplay_windows + 164
47 Emacs 0x102b39650 redisplay_windows + 164
48 Emacs 0x102b39650 redisplay_windows + 164
49 Emacs 0x102b10098 redisplay_internal + 5172
50 Emacs 0x102b14ac4 redisplay_preserve_echo_area + 132
51 Emacs 0x102bbe2f0 detect_input_pending_run_timers + 152
52 Emacs 0x102ca30c4 wait_reading_process_output + 4764
53 Emacs 0x102bbc088 read_char + 7884
54 Emacs 0x102bb8778 read_key_sequence + 1280
55 Emacs 0x102bb6bb0 command_loop_1 + 872
56 Emacs 0x102c42940 internal_condition_case + 260
57 Emacs 0x102bb6834 command_loop_2 + 52
58 Emacs 0x102c420a0 internal_catch + 256
59 Emacs 0x102d24730 command_loop.cold.1 + 80
60 Emacs 0x102bb5f6c command_loop + 156
61 Emacs 0x102bb5e24 recursive_edit_1 + 152
62 Emacs 0x102bb61d4 Frecursive_edit + 372
63 Emacs 0x102bb4fa8 main + 8452
64 dyld 0x18479b154 start + 2476
Any ideas how to remedy this?
Hey @dwinkler1
Shame it crashes. Can you please try to reproduce with https://emacsformacosx.com/builds. If it's reproducible with 'bare' Emacs -> it needs to be reported to Emacs bug tracker.
I don't have access to Sonoma and from the stack trace I don't have any clues, sadly.
Unfortunately I am using Doomemacs and the documentation states it's incompatible with that version. However, I installed Emacs+ 30 with the default settings (except for the icon ;)) and I have not had any crashes or other issues since. Is nativecomp on by default in 30? If not I suspect that to be the culprit as I had it on when the crashes occurred.
If not I suspect that to be the culprit as I had it on when the crashes occurred.
You stated that you used two different options. You can try them in different configurations (one on, another on, both on) to see which configuration breaks it.
I'm getting a similar crash, and it seems like it's only emacs-plus@30, and it's a combination of font-face and native-comp. emacs/osx pretest 30.0.92 doesn't have native comp enabled, and while noticeably slower seems solid as a rock over my tests.
After brew reinstall emacs-plus@30 --with-native-comp emacs-plus@30 load properly a few times, then start crashing. If I remove my theme--but not my font-family settings---then emacs-plus@30 will work again. This happens w/ built-in themes (specifically modus-operandi) and packaged themes (specifically ef-themes). I don't think it's font related, b/c I'm also using nerd-icons packages and I've customized the default fixed and variable font-families they don't trigger this problem.
However, I've been hacking on my init for the last week and this didn't start until a few days ago, and it will stop happening for a time after a reinstall. I think there's an additional trigger in here somewhere but I don't know what it is. It's possible there's some context-dependent font-face work in one of my packages, but that will be difficult to find.
Crash logs at startup invariably look like so:
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Emacs [86808]
Path: /opt/homebrew/*/Emacs.app/Contents/MacOS/Emacs
Identifier: org.gnu.Emacs
Version: Version 30.0.92 (9.0)
Code Type: ARM-64 (Native)
Parent Process: zsh [83153]
Responsible: iTerm2 [87454]
User ID: 501
Date/Time: 2024-12-18 12:10:20.8724 -0600
OS Version: macOS 14.6.1 (23G93)
Report Version: 12
Anonymous UUID: A3D98691-3847-10B7-2197-C24D1E0B7AD1
Sleep/Wake UUID: 2596CC4E-824E-46FD-B6CC-6C75A615F75F
Time Awake Since Boot: 960000 seconds
Time Since Wake: 2349 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x646c6f42696d6558 -> 0x00006f42696d6558 (possible pointer authentication failure)
Exception Codes: 0x0000000000000001, 0x646c6f42696d6558
Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process: Emacs [86808]
VM Region Info: 0x6f42696d6558 is not in any region. Bytes after previous region: 16777374164313
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
MALLOC_NANO 600000000000-600020000000 [512.0M] rw-/rwx SM=PRV
--->
UNUSED SPACE AT END
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x197c1d5f0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x197c55c20 pthread_kill + 288
2 libsystem_c.dylib 0x197b2c1e0 raise + 32
3 Emacs 0x10244c110 terminate_due_to_signal + 212
4 Emacs 0x10244c92c emacs_abort + 20
5 Emacs 0x10241a77c ns_term_shutdown + 132
6 Emacs 0x102306690 shut_down_emacs + 368
7 Emacs 0x10244c0d8 terminate_due_to_signal + 156
8 Emacs 0x1023272dc deliver_fatal_thread_signal + 128
9 Emacs 0x102328cc0 handle_sigsegv + 64
10 libsystem_platform.dylib 0x197c86584 _sigtramp + 56
11 Emacs 0x10239d214 font_find_for_lface + 340
12 Emacs 0x102409bb8 fontset_find_font + 2192
13 Emacs 0x102406138 fontset_font + 500
14 Emacs 0x102405e40 face_for_char + 332
15 Emacs 0x1023a0d10 Finternal_char_font + 320
16 Emacs 0x102381908 Ffuncall + 316
...
I can supply full traces if needed.
@Cerebus TBH, this repo is not the place to report these kind of issues. Emacs+ is practically just a formula and nothing more. At least the unconditional patches we provide do not modify font-related things, so I am pretty sure you'll get more help on Emacs bug tracker.
P.S. The original crash doesn't seem related to fonts. But since there was no activity from original author, closing this one as not planned / wontfix.