Subject: Re: bug#24119: 25.1; suspend-frame "freezes" Emacs under i3-wm

From: Benjamin Riefenstahl <[email-masked]>
Date: Sun, 31 Jul 2016 20:00:32 +0200

Eli Zaretskii writes:
> In case it wasn't clear, I meant to look at the threads while Emacs is
> left to its own devices, before attaching GDB.  IOW, press C-z, and
> then use some system tool to display what each thread does.

Are you looking for something particular?  This is what "ps -fL" says:

  UID        PID  PPID   LWP  C NLWP STIME TTY      STAT   TIME CMD
  benny     7989  3441  7989  0    4 16:52 pts/1    Sl     0:06 ./emacs -Q
  benny     7989  3441  8004  0    4 16:52 pts/1    Sl     0:00 ./emacs -Q
  benny     7989  3441  8016  0    4 16:52 pts/1    Sl     0:00 ./emacs -Q
  benny     7989  3441  8017  0    4 16:52 pts/1    Sl     0:00 ./emacs -Q

The first of these is the main thread, its TIME goes up when I type.
When I press C-z not much happens.  In HTOP tool, which I also tried,
the columns RES and SHR temporarily go up when I press C-z, but that is
hardly surprising.

> This looks like Emacs is just waiting for input.

Yeah.

C-z boils down to iconify-frame, and calling that directly does indeed
show the same behaviour.

To speculate, I would guess that Emacs just disables some stuff inside
iconify-frame, because it expects its request for iconification to be
honored by the WM.  I will try to trace that further.