X-Loop: help-debbugs@HIDDEN Subject: bug#11639: 24.0.95; Emacs daemon hangs when emacsclient was killed Resent-From: Sanel Zukan <sanelz@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 06 Jun 2012 16:18:02 +0000 Resent-Message-ID: <handler.11639.B.1338999428685 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 11639 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 11639 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.1338999428685 (code B ref -1); Wed, 06 Jun 2012 16:18:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Jun 2012 16:17:08 +0000 Received: from localhost ([127.0.0.1]:60719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ScIuy-0000Ax-3p for submit <at> debbugs.gnu.org; Wed, 06 Jun 2012 12:17:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39967) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <sanelz@HIDDEN>) id 1ScFpl-00041w-O6 for submit <at> debbugs.gnu.org; Wed, 06 Jun 2012 08:59:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <sanelz@HIDDEN>) id 1ScFnY-0007P8-0Q for submit <at> debbugs.gnu.org; Wed, 06 Jun 2012 08:57:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:54573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <sanelz@HIDDEN>) id 1ScFnX-0007Ov-Qi for submit <at> debbugs.gnu.org; Wed, 06 Jun 2012 08:57:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <sanelz@HIDDEN>) id 1ScFnR-000180-6K for bug-gnu-emacs@HIDDEN; Wed, 06 Jun 2012 08:57:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <sanelz@HIDDEN>) id 1ScFnK-0007NG-GR for bug-gnu-emacs@HIDDEN; Wed, 06 Jun 2012 08:57:08 -0400 Received: from mail-yw0-f41.google.com ([209.85.213.41]:42503) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <sanelz@HIDDEN>) id 1ScFnK-0007Mo-A3 for bug-gnu-emacs@HIDDEN; Wed, 06 Jun 2012 08:57:02 -0400 Received: by yhr47 with SMTP id 47so5581148yhr.0 for <bug-gnu-emacs@HIDDEN>; Wed, 06 Jun 2012 05:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=oOnGJHRkcWf0mm6vCeHFDhHHicgxynvi/C0J71iaUVU=; b=fXgJLvSCUm9J/WZ0TK7goZS45P/PGithY+em/Mof8YIIRc7kX6FC/+UdrnGEtA0NFl pb9DgDhts541+lF1rtcOgQG4jJmmWx+CD6N8TimvF52F/7aoBCfjwaTG9oKjHKUYCPlC OTW9EEfXqO6fdCR5LyRNNaycVvSEpgAMtjuQWhuRq4c0gDqgPtx6JG2Oi4lg9XcDtOnM PMUrzXIgxIezlRdB6a/EpC29bDu6BmsRLFsbL+4j9auErq477NZMvs8CZvelp7uKm4Ei +e/O/tBbsnnyonIlMgmp+lSmnh9MZxqtKbh/7HCU+AtNVaCOw04pDBGDXub8a6RcjCAj WYMQ== MIME-Version: 1.0 Received: by 10.50.187.201 with SMTP id fu9mr6538367igc.5.1338987418744; Wed, 06 Jun 2012 05:56:58 -0700 (PDT) Received: by 10.231.84.148 with HTTP; Wed, 6 Jun 2012 05:56:58 -0700 (PDT) Date: Wed, 6 Jun 2012 14:56:58 +0200 Message-ID: <CAHuZ_kvqzpD+E7yHWhRsMSF5F8Lm5LtJJi9OgribVA9bwx+2vg@HIDDEN> From: Sanel Zukan <sanelz@HIDDEN> Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Mailman-Approved-At: Wed, 06 Jun 2012 12:17:07 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -6.1 (------) When Emacs was run in daemon mode (emacs --daemon) and client is connected from terminal on it (via emacsclient), everything works as expected. However, when X session is abruptly terminated killing terminal application where emacsclient is run (like mrxvt or xterm), emacs daemon is not responsible any more. Every further connection to it via emacsclient will hang client itself. For now, the only solution is to restart daemon and kill all hung clients. On other hand, when there are no connections to daemon and X session was killed, daemon is working without any issues. I'm running Emacs on Fedora 17. Below are gathered report from M-x report-emacs-bug. Thanks, Sanel If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /usr/share/emacs/24.0.95/etc/DEBUG. In GNU Emacs 24.0.95.1 (i386-redhat-linux-gnu, GTK+ Version 2.24.10) of 2012-04-06 on x86-17.phx2.fedoraproject.org Configured using: `configure '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=gtk' '--with-gpm=no' '--with-wide-int' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables' 'LDFLAGS=-Wl,-z,relro '' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US value of $XMODIFIERS: @im=none locale-coding-system: iso-latin-1-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: evil-mode: t evil-local-mode: t global-undo-tree-mode: t undo-tree-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: ESC [ > 8 2 ; 0 . 5 . 3 ; 0 c ESC x r DEL b u g TAB TAB DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL r e p o TAB TAB r TAB RET Recent messages: ("emacs") Loading /usr/share/emacs/site-lisp/site-start.d/emacs-color-theme-init.el (source)...done Loading /usr/share/emacs/site-lisp/site-start.d/focus-init.el (source)...done Loading /usr/share/emacs/site-lisp/site-start.d/php-mode-init.el (source)...done Loading /usr/share/emacs/site-lisp/site-start.d/rpm-spec-mode-init.el (source)...done Starting Emacs daemon. When done with this frame, type C-x 5 0 Making completion list... [2 times] Load-path shadows:
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Sanel Zukan <sanelz@HIDDEN> Subject: bug#11639: Acknowledgement (24.0.95; Emacs daemon hangs when emacsclient was killed) Message-ID: <handler.11639.B.1338999428685.ack <at> debbugs.gnu.org> References: <CAHuZ_kvqzpD+E7yHWhRsMSF5F8Lm5LtJJi9OgribVA9bwx+2vg@HIDDEN> X-Gnu-PR-Message: ack 11639 X-Gnu-PR-Package: emacs Reply-To: 11639 <at> debbugs.gnu.org Date: Wed, 06 Jun 2012 16:18:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 11639 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 11639: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D11639 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
Received: (at control) by debbugs.gnu.org; 5 May 2019 04:15:51 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 05 00:15:50 2019 Received: from localhost ([127.0.0.1]:52803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hN8Z4-0007ii-CE for submit <at> debbugs.gnu.org; Sun, 05 May 2019 00:15:50 -0400 Received: from mail-qt1-f175.google.com ([209.85.160.175]:44713) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <npostavs@HIDDEN>) id 1hN8Z2-0007bz-8w; Sun, 05 May 2019 00:15:48 -0400 Received: by mail-qt1-f175.google.com with SMTP id f24so775629qtk.11; Sat, 04 May 2019 21:15:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=aRxMixoPZRd6cLOLkyHPKApL58sCEM/hMkEEI9zDtbw=; b=CGrAZ8gLK0a/mtU6rFev5qMHVYtcMCSUEwe7oG3M5+tYvAZLnTAqRGL9L/ZzR+XhxE cilSvuLAdCU9L39aY/QQQLKR8n2trV1ieDdBjksDrwP/5/iwNaIbjZfsWvHPIsMzNG0z GAAtrmdtYthbGDQgIELvcESe8yO5R3Y+pisBVjOe1GzUSnyM1NEpXkhrnEA07t1elKUD vuX+hXhHcA1bKVTQ0Ry+dW6rFY5iaT3dgs41xagThDplEi5sftnrLPUKbRGxTkQtQbYm 2wxJK8D2r7vlJoxbVpOTLY7Q/+r5iw69bQ4eb8GlG7/W8n5ID0Ry0IDrY8H5R204dflu L4xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=aRxMixoPZRd6cLOLkyHPKApL58sCEM/hMkEEI9zDtbw=; b=HAJ4T+N2F0TXB4JX3wE0c2+jfHyAd2qjDEZLvEEjdTZSCOLROn+GCah2Jlsw5yvs+k agSyFaHg66EYfpbLIPLx4KoePGRxEUeCHR1EzuPepFz+v34NsQa+LgURbzeCZssfE84D Au25W5/09KQDXjehvF8DJfZnWOU1FEcaCY5cZGhzyI7wf9S+nJI3k/AG5CJwY6glHFKu u5Bmm6xJRhw77OWbrmLu/MPEUsqPgWGILnqfwvMTsipWhYsAhk7z+KOL3cl6QdLDsqNe 3W5e6sy+MfBxzUCLFTKFlWicmMgFkLcPrvq6JB0rrVkx8G/4sNqNEJHNZv3qgACjacKC jNRg== X-Gm-Message-State: APjAAAUpTB5RDcOt2tY/gMVWPCsNIFmIQolY7UvufEYYvTQ+2+bE6Zmj ypQ8SWeeZbovEhqAaQbVF+0AEhN0 X-Google-Smtp-Source: APXvYqxmd5paigikVWTWZH3z7AP6Womrbhx6lsVAXLE5Cvmj6aKBP9nRs4uVEmKyMtymJ5hiydedZw== X-Received: by 2002:a0c:c192:: with SMTP id n18mr724554qvh.203.1557029742572; Sat, 04 May 2019 21:15:42 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id m31sm4547919qtm.46.2019.05.04.21.15.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 May 2019 21:15:41 -0700 (PDT) From: Noam Postavsky <npostavs@HIDDEN> To: Doug Gilmore <dougjgilmore@HIDDEN> Subject: Re: bug#23939: Segfault in daemon mode Emacs when detaching an X session References: <CADZFUQZ06gySPwYtR__yVkG1LTKXNNZTHc4cx4OU+Ef74C1t=Q@HIDDEN> Date: Sun, 05 May 2019 00:15:40 -0400 In-Reply-To: <CADZFUQZ06gySPwYtR__yVkG1LTKXNNZTHc4cx4OU+Ef74C1t=Q@HIDDEN> (Doug Gilmore's message of "Sun, 10 Jul 2016 17:00:49 -0700") Message-ID: <87k1f5mt8z.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: 23939 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) #14958 = emacs --daemon crashing when X-frames are removed ungracefully #11676 = Daemon crashes when ssh dies #22174 = emacs --daemon crashes when ssh is disconnected. I am using lucid x toolkit. merge 14958 11676 22174 #11639 = 24.0.95; Emacs daemon hangs when emacsclient was killed # probably the GTK thing merge 11639 8501 quit Doug Gilmore <dougjgilmore@HIDDEN> writes: > I have been running my own build of Emacs 24.2 for quite a while in > daemon mode for quite a while without any problems except that the > daemon would on rare occasions crash when I detached a windows frame > via the delete-frame Emacs command. The other day this happened > several times in succession when connecting to a daemon running on > another host and I was able to catch the failure under an attached gdb > session. I attached a backtrace and a prototype fix. > > I have been building my own Emacs on Ubuntu-12/14 configured with the > --with-x-toolkit=lucid option, so this is not a Gtk issue. > > Has anyone else been seeing this problem? There are some other reports about Emacs daemon dying when closing X sessions, but the backtraces look different, so I guess it's not the same problem. > #0 x_uncatch_errors () at /scratch/dgilmore/emacs-24.2/src/xterm.c:7672 > #1 0x00000000004cb588 in x_catch_errors_unwind (dummy=<optimized out>) at /scratch/dgilmore/emacs-24.2/src/xselect.c:546 > #2 0x000000000055b4ce in unbind_to (count=<optimized out>, value=11872738) at /scratch/dgilmore/emacs-24.2/src/eval.c:3433 > #3 0x000000000055b6e5 in unwind_to_catch (catch=0x7ffc44910f60, value=<optimized out>) at /scratch/dgilmore/emacs-24.2/src/eval.c:1314 > #4 0x000000000055d5a9 in Fsignal (error_symbol=11924850, data=38401462) at /scratch/dgilmore/emacs-24.2/src/eval.c:1764 > (gdb) p x_error_message > $1 = (struct x_error_message_stack *) 0x0 > Subject: [PATCH] Make sure x_error_message is not NULL. > > Before dereferencing the pointer. > @@ -7665,6 +7665,14 @@ x_uncatch_errors (void) > { > struct x_error_message_stack *tmp; > > + /* In rare situations when running Emacs run in daemon mode, > + shutting down an emacsclient via delete-frame can cause > + x_uncatch_errors to be called when x_error_message is set to > + NULL. */ > + > + if (x_error_message == NULL) > + return; > + If this really is possible, I guess a NULL check wouldn't be a bad thing...
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.