From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sven Joachim Newsgroups: gmane.emacs.bugs Subject: bug#407: gpm server stop making emacs abort() Date: Tue, 01 Jul 2008 22:43:40 +0200 Message-ID: <87iqvpgwsj.fsf@gmx.de> References: <87wsktf41m.fsf@blah.blah> Reply-To: Sven Joachim , 407@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1214946540 17703 80.91.229.12 (1 Jul 2008 21:09:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Jul 2008 21:09:00 +0000 (UTC) Cc: Kevin Ryde , 407@emacsbugs.donarmstrong.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 01 23:09:46 2008 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.50) id 1KDn6Z-0003FX-0A for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Jul 2008 23:09:39 +0200 Original-Received: from localhost ([127.0.0.1]:41435 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KDn5i-0006H2-JL for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Jul 2008 17:08:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KDn4I-0005We-H4 for bug-gnu-emacs@gnu.org; Tue, 01 Jul 2008 17:07:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KDn4G-0005VL-Ll for bug-gnu-emacs@gnu.org; Tue, 01 Jul 2008 17:07:17 -0400 Original-Received: from [199.232.76.173] (port=45538 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KDn4G-0005VD-BT for bug-gnu-emacs@gnu.org; Tue, 01 Jul 2008 17:07:16 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:34123) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KDn4F-0000q2-LG for bug-gnu-emacs@gnu.org; Tue, 01 Jul 2008 17:07:16 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m61L7CwD008137; Tue, 1 Jul 2008 14:07:12 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m61Kt4uk004037; Tue, 1 Jul 2008 13:55:04 -0700 X-Loop: don@donarmstrong.com Resent-From: Sven Joachim Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 01 Jul 2008 20:55:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 407 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: moreinfo Original-Received: via spool by 407-submit@emacsbugs.donarmstrong.com id=B407.12149453032684 (code B ref 407); Tue, 01 Jul 2008 20:55:04 +0000 Original-Received: (at 407) by emacsbugs.donarmstrong.com; 1 Jul 2008 20:48:23 +0000 Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m61KmIjH002678 for <407@emacsbugs.donarmstrong.com>; Tue, 1 Jul 2008 13:48:20 -0700 Original-Received: (qmail invoked by alias); 01 Jul 2008 20:48:12 -0000 Original-Received: from p54865F90.dip.t-dialin.net (EHLO debian) [84.134.95.144] by mail.gmx.net (mp011) with SMTP; 01 Jul 2008 22:48:12 +0200 X-Authenticated: #28250155 X-Provags-ID: V01U2FsdGVkX1/mj+pPW3jmX9zQ2JI885LIojbF+zUVKMD2Rt5O6W gxTYpyMTjQbCBL In-Reply-To: (Stefan Monnier's message of "Fri, 13 Jun 2008 18:18:32 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.52 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Tue, 01 Jul 2008 17:07:17 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:18610 Archived-At: [ Stefan, it seems you inadvertently forgot to CC the bug submitter, which is why you did not get an answer from him.] On 2008-06-14 00:18 +0200, Stefan Monnier wrote: >> If running with >> (gpm-mouse-mode 1) >> and if you stop the gpm server, then emacs dies with >> Fatal error (6)Aborted I also saw that. When gpm was upgraded and restarted, Emacs aborted. >> Output from "bt full" below; xbacktrace printed nothing at all. > >> The backtrace shows it at the abort() under the EBADF case in >> wait_reading_process_output(). I think when Gpm_GetEvent gets an eof >> from the server it closes gpm_fd; maybe that's the bad fd in question. > > I can't test it right now. Does the patch below help? > > > Stefan > > > --- keyboard.c.~1.959.~ 2008-06-03 02:14:30.000000000 -0400 > +++ keyboard.c 2008-06-13 18:17:35.000000000 -0400 > @@ -7189,6 +7189,8 @@ > while (gpm = Gpm_GetEvent (&event), gpm == 1) { > nread += handle_one_term_event (tty, &event, &hold_quit); > } > + if (gpm < 0) > + delete_gpm_wait_descriptor (gpm_fd); > if (hold_quit.kind != NO_EVENT) > kbd_buffer_store_event (&hold_quit); > if (nread) Works fine for me. Regards, Sven