From: Alex Bennee <kernel-hacker@bennee.com>
To: help-gnu-emacs mailing list <help-gnu-emacs@gnu.org>
Subject: How to debug a hanging emacsclient/emacs?
Date: Tue, 22 Feb 2011 12:28:44 +0000 [thread overview]
Message-ID: <AANLkTikHVdkAPmamsw8TdsbdVumsA99HTPeDAgjmjYUz@mail.gmail.com> (raw)
Hi,
I'm having problems with my emacs client setup. It's almost certainly
due to something in my .emacs setup (-q makes the problems go away)
but I'd like to actually nail down what it is so I can fix it. It
would be nice if there was someway other than selectively enabling the
rather large sprawl that makes up my config.
The symptoms:
I attempt to open a file outside of some directory scope with
emacsclient (emacsclient -n -a '\'''\'' -c <path>). Emacs client never
returns. strace shows emacsclient waiting for feedback:
12:18 ajb@sloy/x86_64 [~] >strace -p 13287
Process 13287 attached - interrupt to quit
recvfrom(3, ^C <unfinished ...>
emacs itself is polling waiting for something which keeps becoming unavailable:
--- SIGIO (I/O possible) @ 0 (0) ---
rt_sigreturn(0x1d) = 16
poll([{fd=9, events=POLLIN}], 1, -1) = 1 ([{fd=9, revents=POLLIN}])
read(9, "\1\1D\6\0\0\0\0\0\0\0\0\376\377\376\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
4096) = 32
read(9, 0x304c2e4, 4096) = -1 EAGAIN (Resource
temporarily unavailable)
poll([{fd=9, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=9, revents=POLLOUT}])
writev(9, [{"+\0\1\0", 4}, {NULL, 0}, {"", 0}], 3) = 4
poll([{fd=9, events=POLLIN}], 1, -1) = 1 ([{fd=9, revents=POLLIN}])
--- SIGIO (I/O possible) @ 0 (0) ---
rt_sigreturn(0x1d) = 1
read(9, "\1\2E\6\0\0\0\0\265\0`\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
4096) = 32
read(9, 0x304c2e4, 4096) = -1 EAGAIN (Resource
temporarily unavailable)
poll([{fd=9, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=9, revents=POLLOUT}])
writev(9, [{"+\0\1\0", 4}, {NULL, 0}, {"", 0}], 3) = 4
poll([{fd=9, events=POLLIN}], 1, -1) = 1 ([{fd=9, revents=POLLIN}])
--- SIGIO (I/O possible) @ 0 (0) ---
rt_sigreturn(0x1d) = 1
read(9, "\1\2F\6\0\0\0\0\265\0`\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
4096) = 32
read(9, 0x304c2e4, 4096) = -1 EAGAIN (Resource
temporarily unavailable)
read(9, 0x304c2e4, 4096) = -1 EAGAIN (Resource
temporarily unavailable)
read(9, 0x304c2e4, 4096) = -1 EAGAIN (Resource
temporarily unavailable)
fd 9 is a Unix socket to somewhere. Emacs is in a busy loop consuming
a whole CPU core at this point.
The window appears but is blank. The screen responds to Ctrl-G and I
can get to the buffer which has loaded. However no mode styling has
been run. I can manually trigger the mode although I have to issue
another Ctrl-G to get to editing again.
So my question is there a way to generate a backtrace on Ctrl-G so I
can actually see where the hang is?
--
Alex, homepage: http://www.bennee.com/~alex/
next reply other threads:[~2011-02-22 12:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-22 12:28 Alex Bennee [this message]
2011-02-22 12:31 ` How to debug a hanging emacsclient/emacs? Alex Bennee
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTikHVdkAPmamsw8TdsbdVumsA99HTPeDAgjmjYUz@mail.gmail.com \
--to=kernel-hacker@bennee.com \
--cc=help-gnu-emacs@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.