all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to debug a hanging emacsclient/emacs?
@ 2011-02-22 12:28 Alex Bennee
  2011-02-22 12:31 ` Alex Bennee
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Bennee @ 2011-02-22 12:28 UTC (permalink / raw)
  To: help-gnu-emacs mailing list

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/



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

* Re: How to debug a hanging emacsclient/emacs?
  2011-02-22 12:28 How to debug a hanging emacsclient/emacs? Alex Bennee
@ 2011-02-22 12:31 ` Alex Bennee
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Bennee @ 2011-02-22 12:31 UTC (permalink / raw)
  To: help-gnu-emacs mailing list

On 22 February 2011 12:28, Alex Bennee <kernel-hacker@bennee.com> wrote:
> Hi,
>
<snip>
> So my question is there a way to generate a backtrace on Ctrl-G so I
> can actually see where the hang is?

Sorry I should have been clearer. I have set debug-on-quit and then
all I get from C-g in the enginmatic:

Debugger entered--Lisp error: (quit)
>
> --
> Alex, homepage: http://www.bennee.com/~alex/
>



-- 
Alex, homepage: http://www.bennee.com/~alex/
http://www.half-llama.co.uk



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

end of thread, other threads:[~2011-02-22 12:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-22 12:28 How to debug a hanging emacsclient/emacs? Alex Bennee
2011-02-22 12:31 ` Alex Bennee

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.