From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#5802: emacsclient -c crashes emacs --daemon intermittently; have strace Date: Thu, 8 Apr 2010 23:11:28 -0700 (PDT) Message-ID: <201004090611.o396BSuA013644@godzilla.ics.uci.edu> References: <2a4ba2fd1003251154w52283ce8w9a728b4d1e1c4170@mail.gmail.com> <2a4ba2fd1003291508t5fccd372h2c13bbd3f19f83f7@mail.gmail.com> <2a4ba2fd1003301006w23d9110ch87068e1a6862a687@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1270794604 13648 80.91.229.12 (9 Apr 2010 06:30:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 9 Apr 2010 06:30:04 +0000 (UTC) Cc: 5802-done@debbugs.gnu.org To: Ryan Thompson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 09 08:30:02 2010 Return-path: Envelope-to: geb-bug-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 1O07j5-0003eG-18 for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Apr 2010 08:29:59 +0200 Original-Received: from localhost ([127.0.0.1]:49537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O07j2-0003LL-Hh for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Apr 2010 02:29:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O07hs-00035w-0Z for bug-gnu-emacs@gnu.org; Fri, 09 Apr 2010 02:28:44 -0400 Original-Received: from [140.186.70.92] (port=32780 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O07ho-000355-L4 for bug-gnu-emacs@gnu.org; Fri, 09 Apr 2010 02:28:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O07hl-0006cW-F0 for bug-gnu-emacs@gnu.org; Fri, 09 Apr 2010 02:28:40 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60175) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O07hl-0006cS-Bn for bug-gnu-emacs@gnu.org; Fri, 09 Apr 2010 02:28:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1O07Ri-0002vh-Dg for bug-gnu-emacs@gnu.org; Fri, 09 Apr 2010 02:12:02 -0400 Resent-From: Dan Nicolaescu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Apr 2010 06:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org Mail-Followup-To: 5802@debbugs.gnu.org, Dan Nicolaescu X-GNU-PR-Message: cc-closed 5802 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5802-done@debbugs.gnu.org id=D5802.127079350311252 (code D ref 5802); Fri, 09 Apr 2010 06:12:02 +0000 Original-Received: (at 5802-done) by debbugs.gnu.org; 9 Apr 2010 06:11:43 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O07RO-0002vR-BC for submit@debbugs.gnu.org; Fri, 09 Apr 2010 02:11:42 -0400 Original-Received: from paul-mcgann-v0.ics.uci.edu ([128.195.1.147]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O07RL-0002vM-GM for 5802-done@debbugs.gnu.org; Fri, 09 Apr 2010 02:11:40 -0400 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by paul-mcgann-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id o396BTBL028800 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 8 Apr 2010 23:11:29 -0700 Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id o396BSuA013644; Thu, 8 Apr 2010 23:11:28 -0700 (PDT) In-Reply-To: (Ryan Thompson's message of "Sat, 3 Apr 2010 14:20:04 -0700") Original-Lines: 102 X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: o396BTBL028800 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.363, required 5, autolearn=disabled, ALL_TRUSTED -1.44, TW_GT 0.08) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 09 Apr 2010 02:12:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:36127 Archived-At: Ryan Thompson writes: > On Thu, Apr 1, 2010 at 12:50 PM, Dan Nicolaescu wrote: > > Ryan Thompson writes: > > > >> On Tue, Mar 30, 2010 at 10:47 AM, Dan Nicolaescu wrote: > >>> Ryan Thompson writes: > >>> > >>>> On Tue, Mar 30, 2010 at 8:46 AM, Dan Nicolaescu wrote: > >>>>> Ryan Thompson writes: > >>>>> > >>>>>> I am trying to set myself up using emacs --daemon so that I can easily > >>>>>> manage multiple emacs frames within one process. However, I have hit a > >>>>>> significant stumbling block. If I run emacs --daemon (or emacs -nw and > >>>>>> then do (server-start) ) and then repeatedly run emacsclient -c and > >>>>>> clost the resulting window, emacs will randomly crash. Sometimes it > >>>>>> happens on the first time that I run emacsclient -c, sometimes on the > >>>>>> 20th. > >>>>>> > >>>>>> I use Ubuntu 9.10, and I have reported this bug in Launchpad. However, > >>>>>> I have also compiled both emacs 23.1 and trunk from vanilla sources, > >>>>>> and both of these exhibit the same bug as the Ubuntu-packaged > >>>>>> versions. > >>>>>> > >>>>>> I have generated some stack traces by the following procedure, as > >>>>>> described at https://bugs.launchpad.net/ubuntu/+source/emacs23/+bug/543611 > >>>>>> > >>>>>> Open two terminals. In the first terminal, run the following commands > >>>>>> to start emacs with strace: > >>>>>> > >>>>>> $ mkdir -p /tmp/emacs-strace > >>>>>> $ strace -o /tmp/emacs-strace/trace-`date +%s`.log emacs -Q -nw > >>>>>> > >>>>>> When emacs has started, do M-x server-start so that emacsclient can > >>>>>> work. Now, in the second terminal, run the following command: > >>>>>> > >>>>>> $ x=0; while emacsclient -c ; do x=$(( $x + 1 )); done; echo "Created > >>>>>> $x windows before crash." > >>>>>> > >>>>>> Now, an emacs window will open. Close it. Each time you close a > >>>>>> window, a new emacs window will open. Keep closing each one that > >>>>>> appears. If emacs exhibits the bug, then eventually you will close one > >>>>>> window, and emacs will crash when it tries to create the next one. At > >>>>>> this point, you can go get your stack trace in /tmp/emacs-strace. > >>>>> > >>>>> This is very likely due to a long standing bug in Gtk+, see: > >>>>> http://bugzilla.gnome.org/show_bug.cgi?id=85715 > >>>>> > >>>>> Please compile emacs using > >>>>> > >>>>> ./configure --with-x-toolkit=lucid > >>>>> > >>>>> and try to reproduce the problem you are seeing with that emacs. > >>>>> > >>>> > >>>> I tried that; same problem. Would you like a stack trace? > >>> > >>> Sure, for the lucid version please. > >>> But please get the stack trace using by attaching gdb to emacs. > >>> See etc/DEBUG for more info. > >>> > >>> Also, please start emacs using "emacs -Q" > >>> > >>> > >>> > >> > >> I tried to figure out gdb, but I couldn't figure it out in the time I > >> had. But I have been running all my tests with -Q. I'll try again when > >> I have more time to mess around with it. > > > > cd emacs/src > > gdb ./emacs > > run -Q -nw -f server-start > > > > > > do whatever you do to to crash emacs, and when that happens type > > > > xbacktrace > > > > in gdb > > > > Again, this is only useful for the version compiled using ./configure --with-x-toolkit=lucid > > > > On further inspection, I can no longer reproduce the crash > --with-x-toolkit=lucid. The segfault in the gtk version occurs in > "gdk_screen_get_display," from /usr/lib/libgdk-x11-2.0.so.0, which is > in Ubuntu package libgtk2.0-0 version 2.18.3-1ubuntu2.2. > > When the lucid version, emacs does not crash, but for some reason, > when I run the emacsclient frame-creating loop that I described > previously, sometimes the client frame disappears as soon as it > appears, and I assumed that a crash had occurred. But in this case, > emacs does not crash, and I only get the problem in a loop like this. > Simply running "emacsclient -c" manually over and over at the > command-line never causes a frame to disappear. So, I think I will > move forward using the lucid version, and you can mark this as a GTK > problem. > > Thanks for your patience. Closing this the, we have plenty of similar reports.