From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alex Bennee Newsgroups: gmane.emacs.help Subject: How to debug a hanging emacsclient/emacs? Date: Tue, 22 Feb 2011 12:28:44 +0000 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1298377763 28064 80.91.229.12 (22 Feb 2011 12:29:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 Feb 2011 12:29:23 +0000 (UTC) To: help-gnu-emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 22 13:29:19 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PrrMi-00060i-Dx for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Feb 2011 13:29:17 +0100 Original-Received: from localhost ([127.0.0.1]:36024 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrrMg-0004GI-EC for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Feb 2011 07:29:14 -0500 Original-Received: from [140.186.70.92] (port=58398 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrrMG-0004GC-Cs for help-gnu-emacs@gnu.org; Tue, 22 Feb 2011 07:28:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrrMF-0005Ai-2q for help-gnu-emacs@gnu.org; Tue, 22 Feb 2011 07:28:48 -0500 Original-Received: from mail-iw0-f169.google.com ([209.85.214.169]:34521) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrrME-0005AW-Sv for help-gnu-emacs@gnu.org; Tue, 22 Feb 2011 07:28:47 -0500 Original-Received: by iwl42 with SMTP id 42so3856049iwl.0 for ; Tue, 22 Feb 2011 04:28:45 -0800 (PST) Original-Received: by 10.42.167.71 with SMTP id r7mr3463952icy.151.1298377724419; Tue, 22 Feb 2011 04:28:44 -0800 (PST) Original-Received: by 10.231.35.132 with HTTP; Tue, 22 Feb 2011 04:28:44 -0800 (PST) X-Google-Sender-Auth: ALjzbwu7dx-zIcXqIHj5EKTSOR4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.169 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:79300 Archived-At: 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 ). 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 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/