From: Dmitry Antipov <dmantipov@yandex.ru>
To: 15025@debbugs.gnu.org
Cc: Dan Nicolaescu <dann@gnu.org>, Paul Eggert <eggert@cs.ucla.edu>
Subject: bug#15025: emacs --daemon stuck in infinite loop
Date: Mon, 12 Aug 2013 12:10:03 +0400 [thread overview]
Message-ID: <5208985B.9010106@yandex.ru> (raw)
In-Reply-To: <yxq4nay8r9g.fsf@fencepost.gnu.org>
On 08/10/2013 01:54 AM, Dan Nicolaescu wrote:
> Unfortunately I won't have time to debug this any time soon.
> But the recipe I gave shows the problem every time, so hopefully someone
> can track down the problem.
Finally I got it reproduced. Very nasty and long-standing issue (I'm pretty
sure that it was there before r111121).
The problem is that candidate_frame looks for 1) frames which shares the
keyboard for graphical frames or 2) frames which share the TTY for termcap
frames. But with Dan's example, we have:
(gdb) p XFRAME (frame)
$20 = (struct frame *) 0x108c6e0 ; argument of `next_frame'
And in Vframe_list:
(gdb) p XFRAME (XCAR (Vframe_list))
$27 = (struct frame *) 0x10756e0
(gdb) p XFRAME (XCAR (Vframe_list))->terminal
$28 = (struct terminal *) 0x1075570 ; TTY /dev/pts/X
(gdb) p XFRAME (XCAR (Vframe_list))->output_method
$29 = output_termcap
(gdb) p XFRAME (XCAR (XCDR (Vframe_list)))
$30 = (struct frame *) 0x108c6e0
(gdb) p XFRAME (XCAR (XCDR (Vframe_list)))->terminal
$31 = (struct terminal *) 0xbeba70 ; TTY /dev/pts/Y
(gdb) p XFRAME (XCAR (XCDR (Vframe_list)))->output_method
$32 = output_termcap
Two TTY frames on a different TTYs! So, candidate_frame always returns Qnil.
But the problem is much more interesting than redesign this:
if ((!FRAME_TERMCAP_P (c) && !FRAME_TERMCAP_P (f)
&& FRAME_KBOARD (c) == FRAME_KBOARD (f))
|| (FRAME_TERMCAP_P (c) && FRAME_TERMCAP_P (f)
&& FRAME_TTY (c) == FRAME_TTY (f)))
IIUC, TTY "peers" (which was on xterms connected to :1) of Emacs frames becomes
invalid when Xnest dies. I suspect that we should have a method to handle such
a "TTY disconnect", but currently I have no ideas how to implement this :-(.
Dmitry
next prev parent reply other threads:[~2013-08-12 8:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 12:36 bug#15025: emacs --daemon stuck in infinite loop Dan Nicolaescu
2013-08-06 23:55 ` Glenn Morris
2013-08-07 2:13 ` Dmitry Antipov
2013-08-09 1:23 ` Dan Nicolaescu
2013-08-09 2:34 ` Dmitry Antipov
2013-08-09 9:12 ` martin rudalics
2013-08-09 13:25 ` Dan Nicolaescu
2013-08-09 15:00 ` Dmitry Antipov
2013-08-09 19:14 ` Dan Nicolaescu
2013-08-09 20:34 ` martin rudalics
2013-08-09 21:54 ` Dan Nicolaescu
2013-08-12 8:10 ` Dmitry Antipov [this message]
2013-08-13 14:41 ` Dan Nicolaescu
2013-08-14 17:43 ` Dmitry Antipov
2013-08-15 15:40 ` Dmitry Antipov
2013-08-16 18:36 ` Dan Nicolaescu
2013-08-09 17:09 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5208985B.9010106@yandex.ru \
--to=dmantipov@yandex.ru \
--cc=15025@debbugs.gnu.org \
--cc=dann@gnu.org \
--cc=eggert@cs.ucla.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).