diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-18 16:36:49 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-18 16:36:49 -0500 |
| commit | 4d354136bf16f9a1d783e0a31785a85eb4bc671d (patch) | |
| tree | f872388ef00d4845e8c4e7504e4ff71b8d4cd8f3 /modules | |
| parent | 4930d1391ee96d5cdc4ab8328aed2f4e9aa0f4ff (diff) | |
| download | dotemacs-4d354136bf16f9a1d783e0a31785a85eb4bc671d.tar.gz dotemacs-4d354136bf16f9a1d783e0a31785a85eb4bc671d.zip | |
fix(term): pin ghostel to pre-regression 0.33.0 to stop the crash
ghostel 0.35.0-0.35.2 hard-crash the whole Emacs process when a terminal buffer is displayed. The native PTY path was reworked to spawn worker threads. On Linux/glibc a SIGSETXID handler then calls malloc while the main thread holds the arena lock, so opening an agent terminal takes the whole editor down (upstream #422, with #423 the macOS recursive-lock variant). Reproduced down to a plain M-x ghostel in a GUI frame, so it's not ai-term-specific.
Hold ghostel at the 0.33.0 build (ghostel-20260604.2049), which predates that rework. :ensure is satisfied by the installed 0.33.0 directory and won't upgrade it. The use-package block carries the rationale and a do-not-upgrade guard so it isn't bumped back into the crash before upstream ships a fix.
Also set ghostel-module-auto-install to download so the native module installs without the interactive prompt.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/term-config.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/term-config.el b/modules/term-config.el index f9c126357..fe2ead409 100644 --- a/modules/term-config.el +++ b/modules/term-config.el @@ -226,6 +226,15 @@ run its own project-named tmux session instead of a bare, auto-named one. (ghostel-send-string "tmux\n")))) (use-package ghostel + ;; PINNED at module 0.33.0 (ghostel-20260604.2049, the last pre-rework June-4 + ;; build), installed directly into elpa/ rather than from MELPA. The 0.35.0-0.35.2 + ;; native-PTY rework (worker threads + mutex-outside-read-loop) hard-crashes the + ;; whole Emacs process when a ghostel buffer is displayed: on Linux/glibc a + ;; SIGSETXID handler calls malloc while the main thread holds the arena lock + ;; (ghostel upstream #422); on macOS a recursive os_unfair_lock via + ;; run_window_change_functions (#423). `:ensure t' is satisfied by the present + ;; 0.33.0 dir and will NOT upgrade it -- do NOT `package-upgrade' ghostel until + ;; #422/#423 are fixed upstream, or it returns to the crashing 0.35.x. :ensure t :commands (ghostel) :init @@ -252,6 +261,12 @@ run its own project-named tmux session instead of a bare, auto-named one. (ghostel-mode . cj/term-launch-tmux)) :custom (ghostel-kill-buffer-on-exit t) + ;; Auto-download the prebuilt native module on first launch instead of the + ;; default `ask' prompt -- it fetches the platform release asset from GitHub + ;; (for the pinned 0.33.0 source this resolves to the matching v0.33.0 module). + ;; The compile-from-source fallback also works here: zig 0.15.2 is installed at + ;; /usr/local/bin/zig (see M-x ghostel-module-compile). + (ghostel-module-auto-install 'download) ;; Byte analog of the prior 100000-line vterm setting (~100 bytes/line) -- D7. (ghostel-max-scrollback (* 10 1024 1024))) |
