Subject: 29.4; Crash with eglot+gopls and with sly
From: Pavel Buranov <[email-masked]>
To: [email-masked]
Date: Sat, 05 Oct 2024 22:45:46 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

When I normally program in Go with the gopls language server, Emacs
crashes on autocomplete spots. I can't pin down the precise cases when it happens, because it happens spontaneously, but I have learned to type
very fast in order not to toggle autocompletion. It must be mentioned
that I use `corfu' with `corfu-auto-delay' set to 0.5 seconds. I enabled
traces, and inspecting the trace it shows consistently that the last or
so message from the language server is a very long one. Initially, I
filed an issue at gopls:  https://github.com/golang/go/issues/69368 .
However, now it also crashes on autocomplete with Sly! I doubted it is
something with emacs initially, thinking the gopls process was somehow
crashing emacs. Now, however, I am pretty sure it is something with
emacs.
 
I use Arch linux, emacs version 29.4-2, installed with the emacs-wayland
package (with native compilation and PGTK enabled). My computer's specs:
CPU: Ryzen 5 4500
GPU: AMD ATI Radeon RX 6400/6500 XT/65
16GB of RAM
 
Running emacs on wayland with GNOME.
 
If I can provide better information, please tell me what to do.
 
In GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43,
cairo version 1.18.0)
System Description: Arch Linux
 
Configured using:
 'configure --with-pgtk --with-native-compilation=aot --sysconfdir=/etc
 --prefix=/usr --libexecdir=/usr/lib --with-tree-sitter
 --localstatedir=/var --with-cairo --disable-build-details
 --with-harfbuzz --with-libsystemd --with-modules 'CFLAGS=-march=x86-64
 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3
 -Wformat -Werror=format-security -fstack-clash-protection
 -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g
 -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto'
 'LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro
 -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto'
 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions
 -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security
 -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer
 -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g
 -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto''
 
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB
 
Important settings:
  value of $LC_ALL: C.UTF-8
  value of $LANG: ru_RU.UTF-8
  locale-coding-system: utf-8-unix
 
Major mode: Org
 
Minor modes in effect:
  server-mode: t
  adaptive-wrap-prefix-mode: t
  visual-fill-column-mode: t
  global-auto-revert-mode: t
  global-highlight-parentheses-mode: t
  highlight-parentheses-mode: t
  global-treesit-auto-mode: t
  vertico-mode: t
  global-corfu-mode: t
  corfu-mode: t
  editorconfig-mode: t
  shell-dirtrack-mode: t
  sly-symbol-completion-mode: t
  eldoc-box-hover-mode: t
  org-roam-db-autosync-mode: t
  org-bullets-mode: t
  delete-selection-mode: t
  xah-fly-keys: t
  leaf-key-override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  column-number-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
 
Load-path shadows:
/home/pavel/.config/emacs/elpa/transient-20240821.158/transient hides /usr/share/emacs/29.4/lisp/transient
 
Features:
(shadow sort mail-extr emacsbug server org-eldoc oc-basic ol-eww eww
url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect
gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum
gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail
mail-source utf7 nnoo gnus-spec gnus-int gnus-range message sendmail
yank-media rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util
mail-utils range mm-util mail-prsvr ol-docview doc-view jka-compr
image-mode exif ol-bibtex bibtex ol-bbdb ol-w3m ol-doi org-link-doi
modus-operandi-theme modus-themes ebnf-mode adaptive-wrap
visual-fill-column autorevert paren-face highlight-parentheses
scala-ts-mode treesit-auto prettier-js web-mode disp-table orderless
vertico-directory vertico corfu scss-mode editorconfig editorconfig-core
editorconfig-core-handle editorconfig-fnmatch clojure-ts-mode cider
tramp-sh cider-debug cider-browse-ns cider-mode cider-xref-backend
cider-find cider-inspector cider-completion cider-profile cider-eval
cider-jar cider-repl-history pulse derived cider-repl cider-resolve
cider-test cider-overlays cider-stacktrace cider-doc cider-browse-spec
cider-clojuredocs cider-eldoc cider-docstring shr pixel-fill kinsoku
url-file puny svg xml dom cider-client cider-common
cider-completion-context cider-connection cider-popup sesman-browser
nrepl-client cider-util tramp tramp-loaddefs trampver tramp-integration
files-x tramp-compat shell parse-time iso8601 sesman vc vc-dispatcher
queue nrepl-dict parseedn parseclj-parser parseclj-lex parseclj-alist
clojure-mode sly sly-completion sly-buttons sly-messages sly-common
apropos arc-mode archive-mode hyperspec dashboard dashboard-widgets
recentf tree-widget ffap yasnippet ada-mode ada-imenu wisi-process-parse
ada-skel wisi-skel skeleton ada-indent-user-options ada-core
uniquify-files gnat-compiler wisi-prj wisi wisi-fringe wisi-parse-common
semantic/lex semantic/fw mode-local find-file lua-mode
typescript-ts-mode js c-ts-common cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs erlang-start erlang
etags fileloop align dockerfile-ts-mode protobuf-ts-mode go-ts-mode
treesit finder-inf easy-mmode reformatter sbt-mode sbt-mode-rgrep grep
sbt-mode-comint sbt-mode-buffer sbt-mode-project sbt-mode-vars
rustic-spellcheck rustic-expand rustic-lsp rustic-playground
rustic-rustfix rustic-babel rustic-rustfmt rustic-comint rustic-clippy
rustic-doc f rustic-popup rustic-cargo rustic-compile spinner s
xterm-color markdown-mode edit-indirect rustic-interaction rustic
rust-utils rust-prog-mode rust-mode rust-common rust-rustfmt edmacro
kmacro eglot external-completion array filenotify jsonrpc ert ewoc debug
backtrace xref flymake-proc flymake thingatpt compile
text-property-search pcase project imenu eldoc-box nord-theme
gruvbox-theme gruvbox autothemer lisp-mnt solarized-theme solarized
solarized-faces color tao-theme org-roam-ui org-roam-dailies websocket
bindat simple-httpd comp comp-cstr warnings cl-extra help-mode
org-roam-migrate org-roam-log org-roam-mode org-roam-capture org-roam-id
org-roam-node org-roam-db emacsql-sqlite-builtin sqlite org-roam-utils
org-roam-compat org-roam org-capture org-attach emacsql-sqlite
emacsql-sqlite-common emacsql emacsql-compiler magit-section
cursor-sensor compat compat-30 dash org-bullets org-contrib ob-lisp
cus-edit pp cus-load wid-edit advice window-layout cl ox-md ox-odt
rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse
nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar org-agenda
ox-html table ox-ascii ox-publish ox org-tempo tempo org-element
org-persist xdg org-id org-refile org ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-macro org-src ob-comint org-pcomplete pcomplete
comint ansi-osc ansi-color org-list org-footnote org-faces org-entities
time-date noutline outline icons ob-emacs-lisp ob-core ob-eval org-cycle
org-table org-keys oc org-loaddefs find-func cal-menu calendar
cal-loaddefs ol rx org-fold org-fold-core org-compat ring avl-tree
generator org-version org-macs format-spec delsel xah-fly-keys dired-x
dired dired-loaddefs leaf-keywords leaf ada-mode-autoloads
adaptive-wrap-autoloads cider-autoloads clojure-mode-autoloads
clojure-ts-mode-autoloads corfu-autoloads dashboard-autoloads
ebnf-mode-autoloads edit-indirect-autoloads editorconfig-autoloads
eldoc-box-autoloads erlang-autoloads gnat-compiler-autoloads
gruvbox-theme-autoloads autothemer-autoloads
highlight-parentheses-autoloads leaf-keywords-autoloads leaf-autoloads
lua-mode-autoloads nord-theme-autoloads orderless-autoloads
org-bullets-autoloads org-contrib-autoloads org-roam-ui-autoloads
org-roam-autoloads magit-section-autoloads emacsql-autoloads
paren-face-autoloads parseedn-autoloads parseclj-autoloads
prettier-js-autoloads protobuf-ts-mode-autoloads queue-autoloads
reformatter-autoloads rustic-autoloads flycheck-autoloads
markdown-mode-autoloads f-autoloads rust-mode-autoloads
sbt-mode-autoloads scala-ts-mode-autoloads scss-mode-autoloads
sesman-autoloads simple-httpd-autoloads sly-autoloads
solarized-theme-autoloads spinner-autoloads tao-theme-autoloads
transient-autoloads treemacs-autoloads cfrs-autoloads posframe-autoloads
ht-autoloads hydra-autoloads lv-autoloads pfuture-autoloads
ace-window-autoloads avy-autoloads s-autoloads dash-autoloads
treesit-auto-autoloads tsc-autoloads typescript-mode-autoloads
typst-ts-mode-autoloads uniquify-files-autoloads vertico-autoloads
compat-autoloads visual-fill-column-autoloads web-mode-autoloads
websocket-autoloads info wisi-autoloads xah-fly-keys-autoloads
xterm-color-autoloads yasnippet-autoloads package browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x
map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win
term/common-win pgtk-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
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 emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo gtk pgtk lcms2 multi-tty make-network-process
native-compile emacs)
 
Memory information:
((conses 16 756135 530984)
 (symbols 48 51507 7)
 (strings 32 181002 54071)
 (string-bytes 1 5976376)
 (vectors 16 90000)
 (vector-slots 8 1572330 718264)
 (floats 8 832 2266)
 (intervals 56 753 0)
 (buffers 984 12))
--
Pavel