From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#16093: 24.3.50; Crash of emacs --daemon on killing X server Date: Tue, 10 Dec 2013 20:43:58 +0100 Message-ID: References: <87siu2uics.fsf@spindle.srvr.nix> <52A604A7.6010104@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1386704715 10228 80.91.229.3 (10 Dec 2013 19:45:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Dec 2013 19:45:15 +0000 (UTC) Cc: 16093@debbugs.gnu.org To: Dmitry Antipov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 10 20:45:20 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VqTFA-0003cz-26 for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Dec 2013 20:45:20 +0100 Original-Received: from localhost ([::1]:51096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqTF9-0004To-GZ for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Dec 2013 14:45:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqTEz-0004EC-KG for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2013 14:45:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqTEt-0008Vl-Fq for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2013 14:45:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56391) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqTEt-0008V5-DO for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2013 14:45:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VqTEs-0006eT-Sy for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2013 14:45:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Dec 2013 19:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16093 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16093-submit@debbugs.gnu.org id=B16093.138670464725488 (code B ref 16093); Tue, 10 Dec 2013 19:45:02 +0000 Original-Received: (at 16093) by debbugs.gnu.org; 10 Dec 2013 19:44:07 +0000 Original-Received: from localhost ([127.0.0.1]:42177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VqTDz-0006d1-8K for submit@debbugs.gnu.org; Tue, 10 Dec 2013 14:44:07 -0500 Original-Received: from mailfe03.swip.net ([212.247.154.65]:35491 helo=swip.net) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VqTDv-0006cn-KG for 16093@debbugs.gnu.org; Tue, 10 Dec 2013 14:44:04 -0500 X-T2-Spam-Status: No, hits=0.0 required=5.0 Original-Received: from hosdjarv.se (account mj138573@tele2.se [46.59.42.57] verified) by mailfe03.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 292312772; Tue, 10 Dec 2013 20:44:00 +0100 In-Reply-To: <52A604A7.6010104@yandex.ru> X-Mailer: Apple Mail (2.1822) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:81708 Archived-At: Hello. 9 dec 2013 kl. 18:57 skrev Dmitry Antipov : > On 12/09/2013 07:58 PM, Nix wrote: >>=20 >> Start emacs --daemon (using the lucid toolkit), under X. Shut X down. >> Emacs crashes shortly afterwards. >>=20 >>=20 >> The lack of symbol table info is concerning (obviously my gdb has >> forgotten how to look up separated debug info *yet again*), but I = don't >> think that important, since the death site is after a = (garbage-collect) >> thus not in Lisp-land anyway. Obviously no xbacktrace is possible: = the >> process is dead. >>=20 >> It is fairly clear that we should not be calling xftfont_close() if = the >> X server is not there! Why has this started happening? >=20 > Hm... IIUC there is no convenient way to check whether X display = connection > is alive. But we can do some tricks, for example, try to select() or = poll() > ConnectionNumber() - if there is no EBADF, X server is hopefully = present... Well, file descriptors are reused, so it may be used for something else = and give a false positive. To do this properly we would need some kind of cleanup function that is = called when the display goes away. Jan D.