help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to debug a hanging emacsclient/emacs?


From: Alex Bennee
Subject: How to debug a hanging emacsclient/emacs?
Date: Tue, 22 Feb 2011 12:28:44 +0000

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 address@hidden/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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]