aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-08-26 12:05:37 -0600
committerCraig Jennings <c@cjennings.net>2026-08-26 12:05:37 -0600
commit9b102d6fb23074bebc626bfe4e61c677c006ae37 (patch)
tree699abba31ea3061dbdab385dc711b73c9b18b379 /modules
parent91fbac722e83cd108a295542a3c88de66d209fe8 (diff)
downloaddotemacs-9b102d6fb23074bebc626bfe4e61c677c006ae37.tar.gz
dotemacs-9b102d6fb23074bebc626bfe4e61c677c006ae37.zip
fix(startup): keep the native-comp log alive so the compile queue drains
comp-run parks every async native-compile worker on *Async-native-compile-log* and each worker's sentinel reads that buffer back before it starts the next job. The startup sweep in cj/dashboard-only killed the buffer, and killing a buffer SIGHUPs every :noquery process under it. Each sentinel then died with "Selecting deleted buffer" and comp--run-async-workers never ran again. The queue sat stranded for the life of the daemon and nothing it had queued was ever cached. The 31.1 upgrade emptied the eln cache. After that every boot queued about 240 files and spawned eight compilers at the moment of the first frame, then killed them, so the next boot did it all again. That storm on a cold boot is what sat behind the grey window before the dashboard. I added the buffer to cj/undead-buffer-list so the sweep buries it, the same choice *Warnings* got in 63831060. The "Selecting deleted buffer" errors I filed in June as an async race were this. The new tests pin the name to comp-async-buffer-name and run the sweep with a live :noquery process parked on the buffer. The process survives, while the same process on an ordinary buffer dies with it.
Diffstat (limited to 'modules')
-rw-r--r--modules/undead-buffers.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/undead-buffers.el b/modules/undead-buffers.el
index 21232e50..e6574a0e 100644
--- a/modules/undead-buffers.el
+++ b/modules/undead-buffers.el
@@ -40,7 +40,16 @@
;; unsupported, and emacsclient silently retried on $DISPLAY, so the first
;; frame of every 31.1 session opened on XWayland. I bury it instead, the
;; same choice desktop.el makes in `desktop-clear-preserve-buffers'.
- "*Warnings*")
+ "*Warnings*"
+ ;; The async native-compile log stays alive for the same reason, one
+ ;; buffer over. comp-run parks every compile worker on this buffer and
+ ;; the worker's sentinel reads it back before starting the next job.
+ ;; The startup sweep killed it, which SIGHUPs every :noquery worker under
+ ;; it; each sentinel then died in `with-current-buffer' on the dead
+ ;; buffer and `comp--run-async-workers' never ran again, so the queue
+ ;; sat stranded for the life of the daemon, nothing was ever cached, and
+ ;; every boot re-ran the same compile storm at the first frame.
+ "*Async-native-compile-log*")
"Buffer names to bury instead of killing (exact match).")
(defvar cj/undead-buffer-regexps nil