unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
@ 2021-05-24 16:14 Basil L. Contovounesios
  2021-05-24 16:36 ` Eli Zaretskii
  2022-07-15 10:24 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 18+ messages in thread
From: Basil L. Contovounesios @ 2021-05-24 16:14 UTC (permalink / raw)
  To: 48629

For quite a while now (several months, possibly a year or more; don't
remember when it started), my graphical emacsclient sessions have been
prone to infrequent and seemingly random freezes where all GUI frames
stop responding to keyboard input, including 'C-g', 'ESC ESC ESC', and
'C-x 5 2'.  Strangely, the frames seem otherwise fine - they respond to
mouse input and are redrawn when I resize them, for example.

This is purely anecdotal, but FWIW it feels like it usually happens
around the time I'm using a memory/subprocess heavy application like
Magit or PDF-Tools.

Unfortunately I normally use an optimised build and don't have a
reproduction recipe, so my usual workaround is to open a TUI emacsclient
frame, save my work, and kill the Emacs daemon.  In fact, I'm sending
this bug report from a TUI frame of the session in question.

The way I run emacsclient is as follows.  In ~/.profile I have:

  export ALTERNATE_EDITOR=              # Lazy emacs daemonisation
  export EDITOR=ecc                     # Used by crontab et al.

where ~/bin/ecc is:

  #!/usr/bin/env sh
  emacsclient --create-frame "$@"

and I set a WM key binding to execute sensible-editor, a Debian script
that in turn runs one of $VISUAL/$EDITOR/editor/etc. in a DWIM fashion.

If I attach GDB to the corresponding 'emacsclient --create-frame'
process, I see the following:

  $ gdb -p 70401
  GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
  This GDB was configured as "x86_64-linux-gnu".
  Attaching to process 70401
  Reading symbols from /home/blc/.local/bin/emacsclient...
  (No debugging symbols found in /home/blc/.local/bin/emacsclient)
  Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...
  Reading symbols from /usr/lib/debug/.build-id/ec/3a1edbb04c6c2376a0f382429383cb2dfc350e.debug...
  Reading symbols from /lib64/ld-linux-x86-64.so.2...
  Reading symbols from /usr/lib/debug/.build-id/32/438eb3b034da54caf58c7a65446639f7cfe274.debug...
  0x00007fd2ed0a2fec in __libc_recv (fd=3, buf=0x7fff77fbe8c0, len=8192, flags=0)
      at ../sysdeps/unix/sysv/linux/recv.c:28
  28	../sysdeps/unix/sysv/linux/recv.c: No such file or directory.
  (gdb) p (char*)buf
  $1 = 0x7fff77fbe8c0 "-emacs-pid 61879"
  (gdb) p errno
  $2 = 25
  (gdb) p strerror(25)
  $3 = 0x7fd2ed1328a0 "Inappropriate ioctl for device"
  (gdb) bt full
  #0  0x00007fd2ed0a2fec in __libc_recv (fd=3, buf=0x7fff77fbe8c0, len=8192, flags=0)
      at ../sysdeps/unix/sysv/linux/recv.c:28
  No locals.
  #1  0x000055fe39b7baa6 in main ()
  No symbol table info available.

And lsof says (with the repeated first three columns of output snipped):

  $ lsof -p 70401
   FD   TYPE             DEVICE SIZE/OFF     NODE NAME
  cwd    DIR              254,0   204800 53215234 /home/blc
  rtd    DIR              254,0     4096        2 /
  txt    REG              254,0    37920 53360933 /home/blc/.local/bin/emacsclient
  mem    REG              254,0  1839792  1842920 /usr/lib/x86_64-linux-gnu/libc-2.31.so
  mem    REG              254,0   177928  1842753 /usr/lib/x86_64-linux-gnu/ld-2.31.so
    0r   CHR                1,3      0t0        4 /dev/null
    1w   REG              254,0    51650 53215248 /home/blc/.xsession-errors
    2w   REG              254,0    51650 53215248 /home/blc/.xsession-errors
    3u  unix 0x000000003c49a2bb      0t0   191265 type=STREAM

If I create another emacsclient frame using the WM key binding, the new
frame displays the *scratch* buffer as usual, except it is also frozen
(does not respond to keyboard input).  Attaching GDB to the new
emacsclient process shows the same as above.

Closing all GUI emacsclient frames and creating new ones makes no
difference; neither does calling make-frame-on-display from a TUI frame:
all created GUI frames are equally frozen.

Some extra, possibly useless info.  My ~/.Xresources says:

  emacs.cursorBlink:                    0
  emacs.dialog*font:                    DejaVu Sans Mono-9
  emacs.font:                           DejaVu Sans Mono-10
  emacs.menu*font:                      DejaVu Sans Mono-9
  emacs.menuBar:                        0
  emacs.pane.menubar.font:              DejaVu Sans Mono-9
  emacs.scrollBar:                      0
  emacs.toolBar:                        0
  emacs.verticalScrollBars:             off

and ~/.xsession-errors contains some repetition of the following
message:

  ###!!! [Parent][RunMessage] Error: Channel closing: too late to
         send/recv, messages will be lost

but there's no timestamp and I doubt it's related to this Emacs session.

Any ideas on what's wrong or how to further debug or fix this?

Thanks,

-- 
Basil

In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars)
 of 2021-05-24 built on tia
Repository revision: 19c14be04fec3ae958bd14623ca2f8f84a53915f
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure 'CC=ccache gcc' 'CFLAGS=-O2 -march=native' --config-cache
 --prefix=/home/blc/.local --enable-checking=structs
 --with-x-toolkit=lucid --with-file-notification=yes --with-x'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XAW3D XDBE XIM XPM LUCID ZLIB

Important settings:
  value of $LANG: en_IE.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  xterm-mouse-mode: t
  pdf-occur-global-minor-mode: t
  magit-wip-before-change-mode: t
  magit-wip-after-apply-mode: t
  magit-wip-after-save-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  shell-dirtrack-mode: t
  minibuffer-depth-indicate-mode: t
  global-dash-fontify-mode: t
  dash-fontify-mode: t
  bug-reference-prog-mode: t
  global-whitespace-mode: t
  display-time-mode: t
  global-subword-mode: t
  subword-mode: t
  global-paren-face-mode: t
  paren-face-mode: t
  show-paren-mode: t
  delete-selection-mode: t
  display-battery-mode: t
  blc-rainbow-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  window-divider-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-save-visited-mode: t

Load-path shadows:
/home/blc/.emacs.d/lisp/counsel hides /home/blc/.emacs.d/elpa/counsel-0.13.4.0.20210509.83303/counsel
/home/blc/.emacs.d/lisp/ivy-hydra hides /home/blc/.emacs.d/elpa/ivy-hydra-0.13.5.0.20210311.102431/ivy-hydra
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-num hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-num
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-plantuml hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-plantuml
/home/blc/.local/share/emacs/28.0.50/lisp/org/ol-rmail hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ol-rmail
/home/blc/.local/share/emacs/28.0.50/lisp/org/ol-bibtex hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ol-bibtex
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-python hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-python
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-table hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-table
/home/blc/.local/share/emacs/28.0.50/lisp/org/ol-info hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ol-info
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-stan hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-stan
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-scheme hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-scheme
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-macro hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-macro
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-habit hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-habit
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-coq hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-coq
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-ocaml hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-ocaml
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-org hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-org
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-capture hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-capture
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-emacs-lisp hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-emacs-lisp
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-attach-git hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-attach-git
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-plot hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-plot
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-exp hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-exp
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-crypt hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-crypt
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-gnuplot hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-gnuplot
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-tangle hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-tangle
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-io hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-io
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-ebnf hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-ebnf
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-haskell hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-haskell
/home/blc/.local/share/emacs/28.0.50/lisp/org/ox-icalendar hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ox-icalendar
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-dot hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-dot
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-element hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-element
/home/blc/.local/share/emacs/28.0.50/lisp/org/ox-org hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ox-org
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-makefile hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-makefile
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-shell hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-shell
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-mscgen hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-mscgen
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-clojure hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-clojure
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-protocol hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-protocol
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-clock hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-clock
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-R hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-R
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-J hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-J
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-compat hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-compat
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-keys hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-keys
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-inlinetask hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-inlinetask
/home/blc/.local/share/emacs/28.0.50/lisp/org/ol-w3m hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ol-w3m
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-datetree hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-datetree
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-abc hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-abc
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-eval hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-eval
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-version hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-version
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-src hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-src
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-agenda hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-agenda
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-footnote hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-footnote
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-shen hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-shen
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-groovy hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-groovy
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-eshell hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-eshell
/home/blc/.local/share/emacs/28.0.50/lisp/org/ox-md hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ox-md
/home/blc/.local/share/emacs/28.0.50/lisp/org/ol-bbdb hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ol-bbdb
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-fortran hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-fortran
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-matlab hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-matlab
/home/blc/.local/share/emacs/28.0.50/lisp/org/ol-mhe hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ol-mhe
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-hledger hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-hledger
/home/blc/.local/share/emacs/28.0.50/lisp/org/ox-texinfo hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ox-texinfo
/home/blc/.local/share/emacs/28.0.50/lisp/org/ox-man hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ox-man
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-ditaa hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-ditaa
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-ruby hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-ruby
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-asymptote hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-asymptote
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-ledger hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-ledger
/home/blc/.local/share/emacs/28.0.50/lisp/org/ox-html hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ox-html
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-archive hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-archive
/home/blc/.local/share/emacs/28.0.50/lisp/org/ox-odt hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ox-odt
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-pcomplete hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-pcomplete
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-sed hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-sed
/home/blc/.local/share/emacs/28.0.50/lisp/org/ol-gnus hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ol-gnus
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-macs hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-macs
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-screen hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-screen
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-ctags hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-ctags
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-entities hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-entities
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-indent hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-indent
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-js hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-js
/home/blc/.local/share/emacs/28.0.50/lisp/org/ox-latex hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ox-latex
/home/blc/.local/share/emacs/28.0.50/lisp/org/ol-eshell hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ol-eshell
/home/blc/.local/share/emacs/28.0.50/lisp/org/ox hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ox
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-table hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-table
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-java hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-java
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-colview hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-colview
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-calc hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-calc
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-sass hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-sass
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-mouse hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-mouse
/home/blc/.local/share/emacs/28.0.50/lisp/org/ol-docview hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ol-docview
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-lint hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-lint
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-goto hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-goto
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-lisp hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-lisp
/home/blc/.local/share/emacs/28.0.50/lisp/org/ol hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ol
/home/blc/.local/share/emacs/28.0.50/lisp/org/ol-eww hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ol-eww
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-lua hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-lua
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-id hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-id
/home/blc/.local/share/emacs/28.0.50/lisp/org/ox-beamer hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ox-beamer
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-attach hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-attach
/home/blc/.local/share/emacs/28.0.50/lisp/org/ol-irc hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ol-irc
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-lilypond hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-lilypond
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-core hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-core
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-ref hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-ref
/home/blc/.local/share/emacs/28.0.50/lisp/org/ox-ascii hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ox-ascii
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-list hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-list
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-mobile hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-mobile
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-perl hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-perl
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-refile hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-refile
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-faces hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-faces
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-processing hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-processing
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-picolisp hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-picolisp
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-awk hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-awk
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-vala hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-vala
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-octave hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-octave
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-maxima hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-maxima
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-duration hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-duration
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-install hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-install
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-forth hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-forth
/home/blc/.local/share/emacs/28.0.50/lisp/org/org hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-tempo hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-tempo
/home/blc/.local/share/emacs/28.0.50/lisp/org/ox-publish hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ox-publish
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-sql hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-sql
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-latex hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-latex
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-feed hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-feed
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-loaddefs hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-loaddefs
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-sqlite hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-sqlite
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-lob hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-lob
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-C hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-C
/home/blc/.local/share/emacs/28.0.50/lisp/org/org-timer hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/org-timer
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-comint hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-comint
/home/blc/.local/share/emacs/28.0.50/lisp/org/ob-css hides /home/blc/.emacs.d/elpa/org-plus-contrib-20210519/ob-css
/home/blc/.emacs.d/lisp/swiper hides /home/blc/.emacs.d/elpa/swiper-0.13.4.0.20210509.153725/swiper
/home/blc/.emacs.d/lisp/colir hides /home/blc/.emacs.d/elpa/ivy-0.13.4.0.20210518.182019/colir
/home/blc/.emacs.d/lisp/ivy-faces hides /home/blc/.emacs.d/elpa/ivy-0.13.4.0.20210518.182019/ivy-faces
/home/blc/.emacs.d/lisp/ivy-overlay hides /home/blc/.emacs.d/elpa/ivy-0.13.4.0.20210518.182019/ivy-overlay
/home/blc/.emacs.d/lisp/ivy hides /home/blc/.emacs.d/elpa/ivy-0.13.4.0.20210518.182019/ivy
/home/blc/.emacs.d/lisp/dash hides /home/blc/.emacs.d/elpa/dash-20210330.1544/dash
/home/blc/.emacs.d/elpa/transient-0.3.2.0.20210429.153940/transient hides /home/blc/.local/share/emacs/28.0.50/lisp/transient

Features:
(shadow sort footnote mail-extr gnus-msg gnus-art mm-uu mml2015 mm-view
mml-smime smime dig gnus-sum shr kinsoku svg gnus-group gnus-undo
gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 netrc
nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader emacsbug
sendmail tramp-cmds xt-mouse term/xterm xterm pdf-sync pdf-annot
facemenu pdf-outline pdf-links pdf-history pdf-occur ibuf-ext ibuffer
ibuffer-loaddefs tablist tablist-filter semantic/wisent/comp
semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util
semantic semantic/tag semantic/lex semantic/fw mode-local cedet
pdf-isearch pdf-misc pdf-tools cus-edit cus-start cus-load wid-edit
pdf-view magit-bookmark bookmark jka-compr pdf-cache pdf-info tq
pdf-util pdf-macs image-mode exif tramp tramp-loaddefs trampver
tramp-integration files-x tramp-compat ls-lisp counsel xref compile
swiper ffap org-eldoc bog bibtex org-indent org-element avl-tree
generator org-clock org-duration dom org-location-google-maps org-agenda
org-refile google-maps google-maps-static google-maps-geocode
google-maps-base org ob ob-tangle ob-ref ob-lob ob-table ob-exp
org-macro org-footnote org-src ob-comint org-pcomplete org-list
org-faces org-entities org-version ob-emacs-lisp ob-core ob-eval
org-table ol org-keys org-compat org-macs org-loaddefs find-func
cal-menu calendar cal-loaddefs matlab matlab-compat pulse disp-table
dired-aux gnus-dired hl-line face-remap pp blc-magit magit-extras
forge-list forge-commands forge-semi forge-bitbucket buck forge-gogs
gogs forge-gitea gtea forge-gitlab glab forge-github ghub-graphql treepy
gsexp ghub let-alist gnutls forge-notify forge-revnote forge-pullreq
forge-issue forge-topic parse-time iso8601 forge-post markdown-mode
thingatpt noutline outline forge-repo forge forge-core forge-db closql
emacsql-sqlite emacsql emacsql-compiler url-http url-auth url-gw nsm
magit-submodule magit-obsolete magit-blame magit-stash magit-reflog
magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-files magit-refs magit-status
magit magit-repos magit-apply magit-wip magit-log which-func imenu
magit-diff smerge-mode diff git-commit log-edit message rmc puny
git-annex advice rx dired-x deb-view dired dired-loaddefs rfc822 mml
mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs
text-property-search time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev
mail-utils gmm-utils mailheader pcvs-util add-log magit-core
magit-autorevert autorevert filenotify magit-margin magit-transient
magit-process with-editor shell pcomplete comint ansi-color magit-mode
transient cl-extra help-mode magit-git magit-section mb-depth ivy ring
ivy-faces ivy-overlay colir color magit-utils crm dash project server
vc-git diff-mode easy-mmode vc vc-dispatcher bug-reference edmacro
kmacro whitespace time cap-words superword subword paren-face paren
highlight-escape-sequences delsel delight modus-operandi-theme
modus-themes pcase format-spec battery dbus xml xdg blc-pkg finder-inf
info tex-site debian-el package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache json subr-x url-vars cl-loaddefs
cl-lib blc-lib map seq byte-opt gv bytecomp byte-compile cconv
iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd 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 easymenu timer select scroll-bar mouse jit-lock
font-lock syntax 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 macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 614521 65792)
 (symbols 48 45245 15)
 (strings 32 181777 8284)
 (string-bytes 1 6067399)
 (vectors 16 76823)
 (vector-slots 8 879291 53573)
 (floats 8 1120 520)
 (intervals 56 5299 179)
 (buffers 992 22))





^ permalink raw reply	[flat|nested] 18+ messages in thread

* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
  2021-05-24 16:14 bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv Basil L. Contovounesios
@ 2021-05-24 16:36 ` Eli Zaretskii
  2021-05-24 16:56   ` Basil L. Contovounesios
  2022-07-15 10:24 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2021-05-24 16:36 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: 48629

> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> Date: Mon, 24 May 2021 17:14:58 +0100
> 
> Any ideas on what's wrong or how to further debug or fix this?

You are asking why Emacs doesn't read keyboard input when it's stuck
inside 'recv', or you are asking why it becomes stuck in recv for
prolonged times?





^ permalink raw reply	[flat|nested] 18+ messages in thread

* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
  2021-05-24 16:36 ` Eli Zaretskii
@ 2021-05-24 16:56   ` Basil L. Contovounesios
  2021-05-24 16:59     ` Eli Zaretskii
  2021-05-24 17:45     ` Andreas Schwab
  0 siblings, 2 replies; 18+ messages in thread
From: Basil L. Contovounesios @ 2021-05-24 16:56 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 48629

Eli Zaretskii <eliz@gnu.org> writes:

>> From: "Basil L. Contovounesios" <contovob@tcd.ie>
>> Date: Mon, 24 May 2021 17:14:58 +0100
>> 
>> Any ideas on what's wrong or how to further debug or fix this?
>
> You are asking why Emacs doesn't read keyboard input when it's stuck
> inside 'recv',

I assume that's because if recv blocks then Emacs can't get around to
reading keyboard input, but I know very little about these things so
please feel free to correct me or clarify.

> or you are asking why it becomes stuck in recv for prolonged times?

Not just prolonged, but indefinite.  I have yet to find a way to restore
these graphical sessions to normal operation, so for my intents and
purposes they have completely hung, i.e. I presume there's a bug
somewhere that results in recv waiting for a message it will never
receive.

Thanks,

-- 
Basil





^ permalink raw reply	[flat|nested] 18+ messages in thread

* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
  2021-05-24 16:56   ` Basil L. Contovounesios
@ 2021-05-24 16:59     ` Eli Zaretskii
  2021-05-24 17:12       ` Basil L. Contovounesios
  2021-05-24 17:45     ` Andreas Schwab
  1 sibling, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2021-05-24 16:59 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: 48629

> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> Cc: 48629@debbugs.gnu.org
> Date: Mon, 24 May 2021 17:56:24 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> >> Date: Mon, 24 May 2021 17:14:58 +0100
> >> 
> >> Any ideas on what's wrong or how to further debug or fix this?
> >
> > You are asking why Emacs doesn't read keyboard input when it's stuck
> > inside 'recv',
> 
> I assume that's because if recv blocks then Emacs can't get around to
> reading keyboard input, but I know very little about these things so
> please feel free to correct me or clarify.

No, that's correct, of course.

> > or you are asking why it becomes stuck in recv for prolonged times?
> 
> Not just prolonged, but indefinite.  I have yet to find a way to restore
> these graphical sessions to normal operation, so for my intents and
> purposes they have completely hung, i.e. I presume there's a bug
> somewhere that results in recv waiting for a message it will never
> receive.

OK, that's for our network experts, hope they will chime in soon...





^ permalink raw reply	[flat|nested] 18+ messages in thread

* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
  2021-05-24 16:59     ` Eli Zaretskii
@ 2021-05-24 17:12       ` Basil L. Contovounesios
  0 siblings, 0 replies; 18+ messages in thread
From: Basil L. Contovounesios @ 2021-05-24 17:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 48629

Eli Zaretskii <eliz@gnu.org> writes:

>> > or you are asking why it becomes stuck in recv for prolonged times?
>> 
>> Not just prolonged, but indefinite.  I have yet to find a way to restore
>> these graphical sessions to normal operation, so for my intents and
>> purposes they have completely hung, i.e. I presume there's a bug
>> somewhere that results in recv waiting for a message it will never
>> receive.
>
> OK, that's for our network experts, hope they will chime in soon...

Of course, rereading what I just wrote suggests it may be possible to
unblock recv by constructing and sending a message it can act on
somehow, as a temporary band-aid.

I don't yet know how to do that, though, and in the meantime my muscle
memory stupidly killed the hung session, so it'll have to wait until the
next time it happens.

Thanks,

-- 
Basil





^ permalink raw reply	[flat|nested] 18+ messages in thread

* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
  2021-05-24 16:56   ` Basil L. Contovounesios
  2021-05-24 16:59     ` Eli Zaretskii
@ 2021-05-24 17:45     ` Andreas Schwab
  2021-05-24 18:38       ` Basil L. Contovounesios
  1 sibling, 1 reply; 18+ messages in thread
From: Andreas Schwab @ 2021-05-24 17:45 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: 48629

On Mai 24 2021, Basil L. Contovounesios wrote:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>> or you are asking why it becomes stuck in recv for prolonged times?
>
> Not just prolonged, but indefinite.

But emacsclient is just waiting for the answer from Emacs, so it is
behaving as expected.  If you want emacsclient not to wait for it, use
--no-wait.

> I have yet to find a way to restore these graphical sessions to
> normal operation,

That must be something else, not related to emacsclient.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





^ permalink raw reply	[flat|nested] 18+ messages in thread

* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
  2021-05-24 17:45     ` Andreas Schwab
@ 2021-05-24 18:38       ` Basil L. Contovounesios
  2021-05-24 19:00         ` Andreas Schwab
  2021-05-26 15:25         ` Basil L. Contovounesios
  0 siblings, 2 replies; 18+ messages in thread
From: Basil L. Contovounesios @ 2021-05-24 18:38 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 48629

Andreas Schwab <schwab@linux-m68k.org> writes:

> On Mai 24 2021, Basil L. Contovounesios wrote:
>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>>> or you are asking why it becomes stuck in recv for prolonged times?
>>
>> Not just prolonged, but indefinite.
>
> But emacsclient is just waiting for the answer from Emacs, so it is
> behaving as expected.

Right, I just attached GDB to a non-frozen emacsclient process, and it's
exactly the same story as in the OP.  Sorry for the misleading report.

> If you want emacsclient not to wait for it, use --no-wait.

Sure, but that doesn't address...

>> I have yet to find a way to restore these graphical sessions to
>> normal operation,
>
> That must be something else, not related to emacsclient.

...whatever elusive cause is making my GUI emacsclient frames stop
accepting keyboard input.  Perhaps then the issue lies in the Emacs
keyboard input code, and I'd be able to reproduce the hang even in
non-daemon Emacs sessions?

Any ideas on how to debug that next time it happens?

Thanks,

-- 
Basil





^ permalink raw reply	[flat|nested] 18+ messages in thread

* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
  2021-05-24 18:38       ` Basil L. Contovounesios
@ 2021-05-24 19:00         ` Andreas Schwab
  2021-05-26 15:25         ` Basil L. Contovounesios
  1 sibling, 0 replies; 18+ messages in thread
From: Andreas Schwab @ 2021-05-24 19:00 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: 48629

On Mai 24 2021, Basil L. Contovounesios wrote:

> ...whatever elusive cause is making my GUI emacsclient frames stop
> accepting keyboard input.

There is no such thing as an emacsclient frame.  They are Emacs frames.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





^ permalink raw reply	[flat|nested] 18+ messages in thread

* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
  2021-05-24 18:38       ` Basil L. Contovounesios
  2021-05-24 19:00         ` Andreas Schwab
@ 2021-05-26 15:25         ` Basil L. Contovounesios
  2021-05-26 15:58           ` Basil L. Contovounesios
  2021-05-26 17:21           ` Eli Zaretskii
  1 sibling, 2 replies; 18+ messages in thread
From: Basil L. Contovounesios @ 2021-05-26 15:25 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 48629

"Basil L. Contovounesios" <contovob@tcd.ie> writes:
> Andreas Schwab <schwab@linux-m68k.org> writes:
>> On Mai 24 2021, Basil L. Contovounesios wrote:
>>> Eli Zaretskii <eliz@gnu.org> writes:
>>>> or you are asking why it becomes stuck in recv for prolonged times?
>>> Not just prolonged, but indefinite.
>> But emacsclient is just waiting for the answer from Emacs, so it is
>> behaving as expected.
>
> Right, I just attached GDB to a non-frozen emacsclient process, and it's
> exactly the same story as in the OP.  Sorry for the misleading report.
>>> I have yet to find a way to restore these graphical sessions to
>>> normal operation,
>> That must be something else, not related to emacsclient.
>
> ...whatever elusive cause is making my GUI emacsclient frames stop
> accepting keyboard input.  Perhaps then the issue lies in the Emacs
> keyboard input code, and I'd be able to reproduce the hang even in
> non-daemon Emacs sessions?
>
> Any ideas on how to debug that next time it happens?

It happened again, and this time I attached GDB to the 'emacs --daemon'
process:

Attaching to process 39876
[New LWP 39877]
[New LWP 39878]
[New LWP 39879]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f8bc8e3e9c6 in __pselect (nfds=26, readfds=0x7fff028412f0, writefds=0x7fff02841370, exceptfds=0x0, 
    timeout=<optimized out>, sigmask=0x7fff02841140) at ../sysdeps/unix/sysv/linux/pselect.c:48
48	../sysdeps/unix/sysv/linux/pselect.c: No such file or directory.
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from terminal]
DISPLAY = :0
TERM = xterm-256color
Breakpoint 1 at 0x5585832d279e
.gdbinit:1239: Error in sourced command file:
No symbol "defined_HAVE_X_WINDOWS" in current context.
(gdb) bt full
#0  0x00007f8bc8e3e9c6 in __pselect
    (nfds=26, readfds=0x7fff028412f0, writefds=0x7fff02841370,
     exceptfds=0x0, timeout=<optimized out>, sigmask=0x7fff02841140)
    at ../sysdeps/unix/sysv/linux/pselect.c:48
        resultvar = 18446744073709551102
        sc_cancel_oldtype = 0
        tval = {
          tv_sec = 2,
          tv_nsec = 908570849
        }
        data = {
          ss = 0,
          ss_len = 8
        }
#1  0x00005585834a85b6 in really_call_select ()
#2  0x00005585834a9320 in thread_select ()
#3  0x00005585834c5f58 in xg_select ()
#4  0x000055858348689d in wait_reading_process_output ()
#5  0x00005585832e5660 in sit_for ()
#6  0x00005585833cd024 in read_char ()
#7  0x00005585833cd822 in read_key_sequence ()
#8  0x00005585833cf22c in command_loop_1 ()
#9  0x000055858343d3d7 in internal_condition_case ()
#10 0x00005585833c03e4 in command_loop_2 ()
#11 0x000055858343f9d3 in internal_catch ()
#12 0x00005585833c0383 in command_loop ()
#13 0x00005585833c5976 in recursive_edit_1 ()
#14 0x00005585833c5ca1 in Frecursive_edit ()
#15 0x00005585832db09e in main ()
'backtrace_top' has unknown return type; cast the call to its declared return type

I then entered 'n' a few times followed unfortunately by C-c, which
killed the process (I would have tried 'thread apply all bt full' next).

So it looks like it's actually pselect that's blocking?

-- 
Basil





^ permalink raw reply	[flat|nested] 18+ messages in thread

* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
  2021-05-26 15:25         ` Basil L. Contovounesios
@ 2021-05-26 15:58           ` Basil L. Contovounesios
  2021-05-26 17:24             ` Eli Zaretskii
  2021-05-26 17:21           ` Eli Zaretskii
  1 sibling, 1 reply; 18+ messages in thread
From: Basil L. Contovounesios @ 2021-05-26 15:58 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 48629

[-- Attachment #1: Type: text/plain, Size: 445 bytes --]

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> I then entered 'n' a few times followed unfortunately by C-c, which
> killed the process (I would have tried 'thread apply all bt full' next).
>
> So it looks like it's actually pselect that's blocking?

It happened again, with the attached 'thread apply all bt full' output.

I'll try to keep the session alive this time, in case anyone has any
debugging suggestions.

Thanks,

-- 
Basil


[-- Attachment #2: gdb.txt --]
[-- Type: text/plain, Size: 5744 bytes --]

$ gdb -p 46955
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 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-linux-gnu".
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".
Attaching to process 46955
[New LWP 46956]
[New LWP 46957]
[New LWP 46958]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fb2fa7ae9c6 in __pselect (nfds=24, readfds=0x7ffc492342e0, writefds=0x7ffc49234360, exceptfds=0x0,
    timeout=<optimized out>, sigmask=0x7ffc49234130) at ../sysdeps/unix/sysv/linux/pselect.c:48
48      ../sysdeps/unix/sysv/linux/pselect.c: No such file or directory.
(gdb) set logging on
Copying output to gdb.txt.
Copying debug output to gdb.txt.
(gdb) thread apply all bt full

Thread 4 (Thread 0x7fb2f5b5a700 (LWP 46958) "gdbus"):
#0  0x00007fb2fa7ac3ff in __GI___poll (fds=0x7fb2e8016990, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
        resultvar = 18446744073709551100
        sc_cancel_oldtype = 0
#1  0x00007fb2fb4ad0ae in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb2fb4ad40b in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb2fb727a36 in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007fb2fb4d60bd in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fb2faa3dea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140406603228928, 6863267776147330063, 140406611616302, 140406611616303, 140406603224768, 8396800, -6891964528408030193, -6891970972744707057}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
#6  0x00007fb2fa7b6def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7fb2f635b700 (LWP 46957) "dconf worker"):
#0  0x00007fb2fa7ac3ff in __GI___poll (fds=0x55dfc862dac0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
        resultvar = 18446744073709551100
        sc_cancel_oldtype = 0
#1  0x00007fb2fb4ad0ae in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb2fb4ad1cf in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb2f636a38d in  () at /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x00007fb2fb4d60bd in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fb2faa3dea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140406611621632, 6863267776147330063, 140721535523102, 140721535523103, 140406611617472, 8396800, -6891961230410017777, -6891970972744707057}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
#6  0x00007fb2fa7b6def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7fb2f6b94700 (LWP 46956) "gmain"):
#0  0x00007fb2fa7ac3ff in __GI___poll (fds=0x55dfc72bdf30, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
        resultvar = 18446744073709551100
        sc_cancel_oldtype = 0
#1  0x00007fb2fb4ad0ae in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb2fb4ad1cf in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb2fb4ad221 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fb2fb4d60bd in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fb2faa3dea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140406620243712, 6863267776147330063, 140721535537518, 140721535537519, 140406620239552, 8396800, -6891962223084334065, -6891970972744707057}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
#6  0x00007fb2fa7b6def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7fb2f78e9040 (LWP 46955) "emacs"):
#0  0x00007fb2fa7ae9c6 in __pselect (nfds=24, readfds=0x7ffc492342e0, writefds=0x7ffc49234360, exceptfds=0x0, timeout=<optimized out>, sigmask=0x7ffc49234130) at ../sysdeps/unix/sysv/linux/pselect.c:48
        resultvar = 18446744073709551102
        sc_cancel_oldtype = 0
        tval = {tv_sec = 14, tv_nsec = 461936780}
        data = {ss = 0, ss_len = 8}
#1  0x000055dfc63615b6 in really_call_select ()
#2  0x000055dfc6362320 in thread_select ()
#3  0x000055dfc637ef58 in xg_select ()
#4  0x000055dfc633f89d in wait_reading_process_output ()
#5  0x000055dfc62843e8 in read_char ()
#6  0x000055dfc6286822 in read_key_sequence ()
#7  0x000055dfc628822c in command_loop_1 ()
#8  0x000055dfc62f63d7 in internal_condition_case ()
#9  0x000055dfc62793e4 in command_loop_2 ()
#10 0x000055dfc62f89d3 in internal_catch ()
#11 0x000055dfc6279383 in command_loop ()
#12 0x000055dfc627e976 in recursive_edit_1 ()
#13 0x000055dfc627eca1 in Frecursive_edit ()
#14 0x000055dfc619409e in main ()

^ permalink raw reply	[flat|nested] 18+ messages in thread

* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
  2021-05-26 15:25         ` Basil L. Contovounesios
  2021-05-26 15:58           ` Basil L. Contovounesios
@ 2021-05-26 17:21           ` Eli Zaretskii
  1 sibling, 0 replies; 18+ messages in thread
From: Eli Zaretskii @ 2021-05-26 17:21 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: 48629, schwab

> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> Cc: Eli Zaretskii <eliz@gnu.org>,  48629@debbugs.gnu.org
> Date: Wed, 26 May 2021 16:25:31 +0100
> 
> So it looks like it's actually pselect that's blocking?

pselect always blocks, so when you find Emacs stuck in pselect, it's
rarely interesting.  The backtrace just says Emacs is idle waiting for
any input, that's all.  That's normal.





^ permalink raw reply	[flat|nested] 18+ messages in thread

* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
  2021-05-26 15:58           ` Basil L. Contovounesios
@ 2021-05-26 17:24             ` Eli Zaretskii
  2021-05-26 18:10               ` Basil L. Contovounesios
  0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2021-05-26 17:24 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: 48629, schwab

> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> Cc: Eli Zaretskii <eliz@gnu.org>,  48629@debbugs.gnu.org
> Date: Wed, 26 May 2021 16:58:17 +0100
> 
> Thread 1 (Thread 0x7fb2f78e9040 (LWP 46955) "emacs"):
> #0  0x00007fb2fa7ae9c6 in __pselect (nfds=24, readfds=0x7ffc492342e0, writefds=0x7ffc49234360, exceptfds=0x0, timeout=<optimized out>, sigmask=0x7ffc49234130) at ../sysdeps/unix/sysv/linux/pselect.c:48
>         resultvar = 18446744073709551102
>         sc_cancel_oldtype = 0
>         tval = {tv_sec = 14, tv_nsec = 461936780}
>         data = {ss = 0, ss_len = 8}
> #1  0x000055dfc63615b6 in really_call_select ()
> #2  0x000055dfc6362320 in thread_select ()
> #3  0x000055dfc637ef58 in xg_select ()
> #4  0x000055dfc633f89d in wait_reading_process_output ()
> #5  0x000055dfc62843e8 in read_char ()
> #6  0x000055dfc6286822 in read_key_sequence ()
> #7  0x000055dfc628822c in command_loop_1 ()

This is slightly more interesting, because it shows that timeout for
pselect was 14 sec plus change.  So the interesting question is what
happens after the timeout expires?

IOW, when you find Emacs stuck in pselect, type "finish" and let Emacs
exit the pselect call.  Then step through the code and see what it
does and why it doesn't respond to keyboard input.  Is the keyboard
descriptor in the set of descriptors pselect waits for?





^ permalink raw reply	[flat|nested] 18+ messages in thread

* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
  2021-05-26 17:24             ` Eli Zaretskii
@ 2021-05-26 18:10               ` Basil L. Contovounesios
  2021-05-26 18:59                 ` Eli Zaretskii
  2021-06-03 13:18                 ` Basil L. Contovounesios
  0 siblings, 2 replies; 18+ messages in thread
From: Basil L. Contovounesios @ 2021-05-26 18:10 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 48629, schwab

Eli Zaretskii <eliz@gnu.org> writes:

>> From: "Basil L. Contovounesios" <contovob@tcd.ie>
>> Cc: Eli Zaretskii <eliz@gnu.org>,  48629@debbugs.gnu.org
>> Date: Wed, 26 May 2021 16:58:17 +0100
>> 
>> Thread 1 (Thread 0x7fb2f78e9040 (LWP 46955) "emacs"):
>> #0 0x00007fb2fa7ae9c6 in __pselect (nfds=24, readfds=0x7ffc492342e0,
>> writefds=0x7ffc49234360, exceptfds=0x0, timeout=<optimized out>,
>> sigmask=0x7ffc49234130) at ../sysdeps/unix/sysv/linux/pselect.c:48
>>         resultvar = 18446744073709551102
>>         sc_cancel_oldtype = 0
>>         tval = {tv_sec = 14, tv_nsec = 461936780}
>>         data = {ss = 0, ss_len = 8}
>> #1  0x000055dfc63615b6 in really_call_select ()
>> #2  0x000055dfc6362320 in thread_select ()
>> #3  0x000055dfc637ef58 in xg_select ()
>> #4  0x000055dfc633f89d in wait_reading_process_output ()
>> #5  0x000055dfc62843e8 in read_char ()
>> #6  0x000055dfc6286822 in read_key_sequence ()
>> #7  0x000055dfc628822c in command_loop_1 ()
>
> This is slightly more interesting, because it shows that timeout for
> pselect was 14 sec plus change.  So the interesting question is what
> happens after the timeout expires?
>
> IOW, when you find Emacs stuck in pselect, type "finish" and let Emacs
> exit the pselect call.

I did this, and it returned zero after a while:

Attaching to process 46955
[New LWP 46956]
[New LWP 46957]
[New LWP 46958]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fb2fa7ae9c6 in __pselect (nfds=24, readfds=0x7ffc492342e0, writefds=0x7ffc49234360, exceptfds=0x0, 
    timeout=<optimized out>, sigmask=0x7ffc49234130) at ../sysdeps/unix/sysv/linux/pselect.c:48
48      ../sysdeps/unix/sysv/linux/pselect.c: No such file or directory.
(gdb) finish
Run till exit from #0  0x00007fb2fa7ae9c6 in __pselect (nfds=24, readfds=0x7ffc492342e0, writefds=0x7ffc49234360, 
    exceptfds=0x0, timeout=<optimized out>, sigmask=0x7ffc49234130) at ../sysdeps/unix/sysv/linux/pselect.c:48
0x000055dfc63615b6 in really_call_select ()
Value returned is $1 = 0

> Then step through the code and see what it does and why it doesn't
> respond to keyboard input.

I guess I need debugging symbols for this, because at this point
step/next progressively and slowly climb frames, without any indication
of the surrounding code or values (GDB maintains that it's in pselect.c
the whole time).

> Is the keyboard descriptor in the set of descriptors pselect waits
> for?

How do I determine what the keyboard descriptor is?

Thanks,

-- 
Basil





^ permalink raw reply	[flat|nested] 18+ messages in thread

* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
  2021-05-26 18:10               ` Basil L. Contovounesios
@ 2021-05-26 18:59                 ` Eli Zaretskii
  2021-06-03 13:18                 ` Basil L. Contovounesios
  1 sibling, 0 replies; 18+ messages in thread
From: Eli Zaretskii @ 2021-05-26 18:59 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: 48629, schwab

> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> Cc: schwab@linux-m68k.org,  48629@debbugs.gnu.org
> Date: Wed, 26 May 2021 19:10:30 +0100
> 
> > IOW, when you find Emacs stuck in pselect, type "finish" and let Emacs
> > exit the pselect call.
> 
> I did this, and it returned zero after a while:

So it found no input available.

> > Is the keyboard descriptor in the set of descriptors pselect waits
> > for?
> 
> How do I determine what the keyboard descriptor is?

Look at fd_callback_info[desc].flags for values of DESC from zero to
max_desc, and see if any of them have the FOR_READ and KEYBOARD_FD
flags set.  Then see whether those descriptors, which have those flags
set, have their bit set in readfds set passed to pselect.





^ permalink raw reply	[flat|nested] 18+ messages in thread

* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
  2021-05-26 18:10               ` Basil L. Contovounesios
  2021-05-26 18:59                 ` Eli Zaretskii
@ 2021-06-03 13:18                 ` Basil L. Contovounesios
  1 sibling, 0 replies; 18+ messages in thread
From: Basil L. Contovounesios @ 2021-06-03 13:18 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 48629, schwab

[-- Attachment #1: Type: text/plain, Size: 802 bytes --]

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: "Basil L. Contovounesios" <contovob@tcd.ie>
>>> Cc: Eli Zaretskii <eliz@gnu.org>,  48629@debbugs.gnu.org
>>> Date: Wed, 26 May 2021 16:58:17 +0100
>>> 
>> Then step through the code and see what it does and why it doesn't
>> respond to keyboard input.
>
> I guess I need debugging symbols for this, because at this point
> step/next progressively and slowly climb frames, without any indication
> of the surrounding code or values (GDB maintains that it's in pselect.c
> the whole time).

I'm now running with '-Og -ggdb'.  I didn't have time to investigate
further the last two times the freeze happened, but I did save the
attached output of 'thread apply all bt full' for posterity.

-- 
Basil


[-- Attachment #2: GDB backtrace --]
[-- Type: application/gzip, Size: 4172 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
  2021-05-24 16:14 bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv Basil L. Contovounesios
  2021-05-24 16:36 ` Eli Zaretskii
@ 2022-07-15 10:24 ` Lars Ingebrigtsen
  2022-07-24  3:54   ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 18+ messages in thread
From: Lars Ingebrigtsen @ 2022-07-15 10:24 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: 48629

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> For quite a while now (several months, possibly a year or more; don't
> remember when it started), my graphical emacsclient sessions have been
> prone to infrequent and seemingly random freezes where all GUI frames
> stop responding to keyboard input, including 'C-g', 'ESC ESC ESC', and
> 'C-x 5 2'. 

Are you still seeing this with the current Emacs trunk?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 18+ messages in thread

* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
  2022-07-15 10:24 ` Lars Ingebrigtsen
@ 2022-07-24  3:54   ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-07-24  9:25     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 18+ messages in thread
From: Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-07-24  3:54 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 48629

Lars Ingebrigtsen [2022-07-15 12:24 +0200] wrote:

> "Basil L. Contovounesios" <contovob@tcd.ie> writes:
>
>> For quite a while now (several months, possibly a year or more; don't
>> remember when it started), my graphical emacsclient sessions have been
>> prone to infrequent and seemingly random freezes where all GUI frames
>> stop responding to keyboard input, including 'C-g', 'ESC ESC ESC', and
>> 'C-x 5 2'. 
>
> Are you still seeing this with the current Emacs trunk?

I think it's happened maybe once in the last few months, and not
particularly recently, but I've been largely AFK since September, so
maybe I've just been lucky.  Feel free to close (or merge) this, either
in favour of bug#55726, or until I have more information to report.

Thanks,

-- 
Basil





^ permalink raw reply	[flat|nested] 18+ messages in thread

* bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv
  2022-07-24  3:54   ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-07-24  9:25     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 18+ messages in thread
From: Lars Ingebrigtsen @ 2022-07-24  9:25 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: 48629

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> I think it's happened maybe once in the last few months, and not
> particularly recently, but I've been largely AFK since September, so
> maybe I've just been lucky.  Feel free to close (or merge) this, either
> in favour of bug#55726, or until I have more information to report.

OK; I'm closing this bug report, then.  Please reopen (or file a new
bug report) if the problem reappears.






^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-07-24  9:25 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-24 16:14 bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv Basil L. Contovounesios
2021-05-24 16:36 ` Eli Zaretskii
2021-05-24 16:56   ` Basil L. Contovounesios
2021-05-24 16:59     ` Eli Zaretskii
2021-05-24 17:12       ` Basil L. Contovounesios
2021-05-24 17:45     ` Andreas Schwab
2021-05-24 18:38       ` Basil L. Contovounesios
2021-05-24 19:00         ` Andreas Schwab
2021-05-26 15:25         ` Basil L. Contovounesios
2021-05-26 15:58           ` Basil L. Contovounesios
2021-05-26 17:24             ` Eli Zaretskii
2021-05-26 18:10               ` Basil L. Contovounesios
2021-05-26 18:59                 ` Eli Zaretskii
2021-06-03 13:18                 ` Basil L. Contovounesios
2021-05-26 17:21           ` Eli Zaretskii
2022-07-15 10:24 ` Lars Ingebrigtsen
2022-07-24  3:54   ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-24  9:25     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).