From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Dokos Newsgroups: gmane.emacs.orgmode,gmane.emacs.help Subject: Re: diagnosing emacs hangs Date: Tue, 22 Jun 2010 10:23:29 -0400 Message-ID: <4061.1277216609@gamaville.dokosmarshall.org> References: Reply-To: nicholas.dokos@hp.com NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1277218368 25078 80.91.229.12 (22 Jun 2010 14:52:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 Jun 2010 14:52:48 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, nicholas.dokos@hp.com, emacs-orgmode@gnu.org To: Matt Price Original-X-From: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Tue Jun 22 16:52:46 2010 Return-path: Envelope-to: geo-emacs-orgmode@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 1OR4qD-0003E2-PJ for geo-emacs-orgmode@m.gmane.org; Tue, 22 Jun 2010 16:52:46 +0200 Original-Received: from localhost ([127.0.0.1]:56186 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OR4qD-00022f-Cy for geo-emacs-orgmode@m.gmane.org; Tue, 22 Jun 2010 10:52:45 -0400 Original-Received: from [140.186.70.92] (port=43845 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OR4OA-0005WA-2O for emacs-orgmode@gnu.org; Tue, 22 Jun 2010 10:23:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OR4O7-0001RY-VG for emacs-orgmode@gnu.org; Tue, 22 Jun 2010 10:23:45 -0400 Original-Received: from vms173001pub.verizon.net ([206.46.173.1]:53702) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OR4O7-0001Qv-SF; Tue, 22 Jun 2010 10:23:43 -0400 Original-Received: from gamaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173001.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0L4F00IQ86N5WU50@vms173001.mailsrvcs.net>; Tue, 22 Jun 2010 09:23:29 -0500 (CDT) Original-Received: from gamaville.dokosmarshall.org (localhost [127.0.0.1]) by gamaville.dokosmarshall.org (Postfix) with ESMTP id 3E46A34834; Tue, 22 Jun 2010 10:23:29 -0400 (EDT) In-reply-to: Message from Matt Price of "Mon, 21 Jun 2010 21:18:15 EDT." X-Mailer: MH-E 8.2; nmh 1.2; GNU Emacs 24.0.50 X-detected-operating-system: by eggs.gnu.org: Solaris 10 (1203?) X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.orgmode:26465 gmane.emacs.help:73957 Archived-At: Matt Price wrote: > I'm now using emacs for almost everything and of course that's great, > except that it is essentially a single-threaded OS that currently > HANGS with some frequency (100% CPU usgte that will continue for hours > if you let it go. I think this probably has something to do with > wanderlust or possibly org-mode (and/or misconfigurations i've made to > both of these); but at present i cna't be sure since i have no idea > how to diagnose these hangs. Can someone give me some general > directions on how to proceed with the diagnosis, and if you have them, > some pointers on how you fixed a similar problem that you used to > have? Right now it's very frustrating -- I find myself losing > substantial amounts of work when I kill emacs & maybe more > importantly, i'm constantly losing my train of thought. > > This is all under Ubuntu Lucid with emacs-snapshot 20090909, > wanderlust=wl-beta 2.15.9+0.20100303, org-mode 6.34c (some of htese > are debian sid packages). > I assume only emacs is stuck, so you can open an xterm: what does ``ps awlx | grep emacs'' say? In particular, the state and the wchan are of interest: normally, it should be in S state and waiting on select: idle and waiting for input. If it's persistently in D state, it's stuck somewhere in the kernel - the wchan gives an idea where. Do it a few times to make sure that things are not changing. The next step is to do ``strace -p'' to see whether it's going in and out of the kernel (perhaps in an infinite loop). If it is *not* going into the kernel, but accumulates CPU runtime (check the ps awlx output a few times), then it's stuck in a loop in user space. Attaching to it with ``gdb -p'' and getting a backtrace should give an idea of where it's stuck. But if the loop is in lisp code, the backtrace is not going to tell you where: it'll just be in eval. If that's the case, then bisecting through your .emacs setup is probably the best idea (maybe start by commenting out the org/wanderlust stuff, particularly if you started getting these problems recently, after making changes to their configuration.) It's always a good idea to do these things with a working emacs first, so that you learn what "normal" looks like. Then you have a better idea of what's wrong when you try them on the stuck emacs. This only scratches the surface but... HTH, Nick _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: diagnosing emacs hangs Date: Tue, 22 Jun 2010 10:23:29 -0400 Message-ID: <4061.1277216609@gamaville.dokosmarshall.org> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=43845 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OR4OA-0005WA-2O for emacs-orgmode@gnu.org; Tue, 22 Jun 2010 10:23:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OR4O7-0001RY-VG for emacs-orgmode@gnu.org; Tue, 22 Jun 2010 10:23:45 -0400 In-reply-to: Message from Matt Price of "Mon, 21 Jun 2010 21:18:15 EDT." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Matt Price Cc: help-gnu-emacs@gnu.org, nicholas.dokos@hp.com, emacs-orgmode@gnu.org Matt Price wrote: > I'm now using emacs for almost everything and of course that's great, > except that it is essentially a single-threaded OS that currently > HANGS with some frequency (100% CPU usgte that will continue for hours > if you let it go. I think this probably has something to do with > wanderlust or possibly org-mode (and/or misconfigurations i've made to > both of these); but at present i cna't be sure since i have no idea > how to diagnose these hangs. Can someone give me some general > directions on how to proceed with the diagnosis, and if you have them, > some pointers on how you fixed a similar problem that you used to > have? Right now it's very frustrating -- I find myself losing > substantial amounts of work when I kill emacs & maybe more > importantly, i'm constantly losing my train of thought. > > This is all under Ubuntu Lucid with emacs-snapshot 20090909, > wanderlust=wl-beta 2.15.9+0.20100303, org-mode 6.34c (some of htese > are debian sid packages). > I assume only emacs is stuck, so you can open an xterm: what does ``ps awlx | grep emacs'' say? In particular, the state and the wchan are of interest: normally, it should be in S state and waiting on select: idle and waiting for input. If it's persistently in D state, it's stuck somewhere in the kernel - the wchan gives an idea where. Do it a few times to make sure that things are not changing. The next step is to do ``strace -p'' to see whether it's going in and out of the kernel (perhaps in an infinite loop). If it is *not* going into the kernel, but accumulates CPU runtime (check the ps awlx output a few times), then it's stuck in a loop in user space. Attaching to it with ``gdb -p'' and getting a backtrace should give an idea of where it's stuck. But if the loop is in lisp code, the backtrace is not going to tell you where: it'll just be in eval. If that's the case, then bisecting through your .emacs setup is probably the best idea (maybe start by commenting out the org/wanderlust stuff, particularly if you started getting these problems recently, after making changes to their configuration.) It's always a good idea to do these things with a working emacs first, so that you learn what "normal" looks like. Then you have a better idea of what's wrong when you try them on the stuck emacs. This only scratches the surface but... HTH, Nick