From unknown Sat Sep 06 00:30:16 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#407 <407@debbugs.gnu.org> To: bug#407 <407@debbugs.gnu.org> Subject: Status: gpm server stop making emacs abort() Reply-To: bug#407 <407@debbugs.gnu.org> Date: Sat, 06 Sep 2025 07:30:16 +0000 retitle 407 gpm server stop making emacs abort() reassign 407 emacs submitter 407 Kevin Ryde severity 407 normal tag 407 patch thanks From gg@zip.com.au Fri Jun 13 13:56:16 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.7 required=4.0 tests=AWL,BAYES_00,FOURLA, IMPRONONCABLE_2,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 13 Jun 2008 20:56:16 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5DKuCqY020294 for ; Fri, 13 Jun 2008 13:56:13 -0700 Received: from mx10.gnu.org ([199.232.76.166]:38384) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1K7GHf-00048z-4c for emacs-pretest-bug@gnu.org; Fri, 13 Jun 2008 16:54:07 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1K7GJb-0002pj-GM for emacs-pretest-bug@gnu.org; Fri, 13 Jun 2008 16:56:11 -0400 Received: from mailout2-1.pacific.net.au ([61.8.2.224]:35186 helo=mailout2.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K7GJa-0002pX-CN for emacs-pretest-bug@gnu.org; Fri, 13 Jun 2008 16:56:07 -0400 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 34DA4B2954 for ; Sat, 14 Jun 2008 06:56:05 +1000 (EST) Received: from blah.blah (ppp2564.dyn.pacific.net.au [61.8.37.100]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id C87FC8C07 for ; Sat, 14 Jun 2008 06:56:03 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1K7GJ4-0000g9-4c for emacs-pretest-bug@gnu.org; Sat, 14 Jun 2008 06:55:34 +1000 From: Kevin Ryde To: emacs-pretest-bug@gnu.org Subject: gpm server stop making emacs abort() Date: Sat, 14 Jun 2008 06:55:33 +1000 Message-ID: <87wsktf41m.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) --=-=-= If running with (gpm-mouse-mode 1) and if you stop the gpm server, then emacs dies with Fatal error (6)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. In GNU Emacs 23.0.60.1 (i586-pc-linux-gnu, GTK+ Version 2.12.10) of 2008-06-13 on blah.blah configured using `configure 'CFLAGS=-O -g' '--prefix=/down/emacs/b/inst' '--with-x-toolkit=gtk'' 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_AU value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: gpm-mouse-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t --=-=-= Content-Disposition: attachment; filename=bt.txt #0 0xb76728c1 in kill () from /lib/libc.so.6 No symbol table info available. #1 0x080fbd49 in abort () at /down/emacs/src/emacs.c:427 No locals. #2 0x0819559a in wait_reading_process_output (time_limit=30, microsecs=0, read_kbd=-1, do_display=1, wait_for_cell=137641241, wait_proc=0x0, just_wait_proc=0) at /down/emacs/src/process.c:4634 timeout_reduced_for_timers = 0 channel = 1 nfds = -1 Available = {fds_bits = {160, 0 }} Connecting = {fds_bits = {0 }} check_connect = 0 check_delay = 0 no_avail = 0 xerrno = 9 proc = 0 timeout = {tv_sec = 25, tv_usec = 696000} end_time = {tv_sec = 1213338499, tv_usec = 981053} wait_channel = -1 got_some_input = 1 #3 0x08056db5 in sit_for (timeout=240, reading=1, do_display=1) at /down/emacs/src/dispnew.c:6618 sec = 30 usec = 0 #4 0x08107775 in read_char (commandflag=1, nmaps=2, maps=0xbf9e9a60, prev_event=137641241, used_mouse_menu=0xbf9e9ae8, end_time=0x0) at /down/emacs/src/keyboard.c:2930 tem0 = delay_level = 4 buffer_size = c = 137641241 local_getcjmp = {{__jmpbuf = {137641241, 138142696, 146700176, -1080124904, 690995329, 887540718}, __mask_was_saved = 0, __saved_mask = {__val = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137667092, 1536, 3214842376, 135944962, 137667088, 0, 0, 0, 0, 0, 0, 0, 192, 4294967292, 137667088, 0, 137667088, 137667088, 3214842408, 135633649, 137667088, 192}}}} save_jump = {{__jmpbuf = {0, 0, 0, 0, 0, 0}, __mask_was_saved = 0, __saved_mask = {__val = {0 }}}} key_already_recorded = 0 tem = 146700176 save = previous_echo_area_message = 137641241 also_record = 137641241 reread = 0 polling_stopped_here = orig_kboard = (struct kboard *) 0x8be7790 #5 0x0810a47a in read_key_sequence (keybuf=0xbf9e9bc4, bufsize=30, prompt=137641241, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1) at /down/emacs/src/keyboard.c:9443 interrupted_kboard = (KBOARD *) 0x8be7790 key = 137706808 used_mouse_menu = 0 echo_local_start = 0 last_real_key_start = 0 keys_local_start = 0 local_first_binding = 0 from_string = 137641241 count = 2 t = 0 echo_start = 0 keys_start = 0 nmaps = 2 nmaps_allocated = 2 defs = (Lisp_Object * volatile) 0xbf9e9a40 submaps = (Lisp_Object * volatile) 0xbf9e9a60 orig_local_map = 147392757 orig_keymap = 137641241 localized_local_map = 0 first_binding = 0 first_unbound = 31 mock_input = 0 fkey = {parent = 137948733, map = 137948733, start = 0, end = 0} keytran = {parent = 137634685, map = 137634685, start = 0, end = 0} indec = {parent = 137948797, map = 137948797, start = 0, end = 0} shift_translated = 0 delayed_switch_frame = 137641241 original_uppercase = 137800728 original_uppercase_position = -1 starting_buffer = (struct buffer *) 0x834a210 fake_prefixed_keys = 137641241 #6 0x0810bff0 in command_loop_1 () at /down/emacs/src/keyboard.c:1651 cmd = lose = 137837243 nonundocount = 0 keybuf = {24, 56, 0 , -1080124376, -1080124528, 0, -1080164352, 137641241, 142934753, 138142696, 138142696, 138142712, -1080124344} i = 2 prev_modiff = 11 prev_buffer = (struct buffer *) 0x834a210 already_adjusted = 0 #7 0x0815edcb in internal_condition_case (bfun=0x810bd11 , handlers=137684385, hfun=0x8106559 ) at /down/emacs/src/eval.c:1511 val = c = {tag = 137641241, val = 137641241, next = 0xbf9e9d70, gcpro = 0x0, jmp = {{__jmpbuf = {138142696, 138142696, 138142712, -1080124104, 691576961, 1071307758}, __mask_was_saved = 0, __saved_mask = {__val = {1, 3214842728, 3077261132, 3078107488, 3086920636, 3214842752, 3078103028, 276967387, 3079470328, 8655230, 48, 3076832444, 3214843408, 3214843116, 3214843396, 3214843256, 135346508, 2, 3214843268, 3214843116, 0 }}}}, backlist = 0x0, handlerlist = 0x0, lisp_eval_depth = 0, pdlcount = 2, poll_suppress_count = 1, interrupt_input_blocked = 0, byte_stack = 0x0} h = {handler = 137684385, var = 137641241, chosen_clause = 0, tag = 0xbf9e9c70, next = 0x0} #8 0x08105aa2 in command_loop_2 () at /down/emacs/src/keyboard.c:1367 val = 0 #9 0x0815ee81 in internal_catch (tag=137680361, func=0x8105a7f , arg=137641241) at /down/emacs/src/eval.c:1247 c = {tag = 137680361, val = 137641241, next = 0x0, gcpro = 0x0, jmp = { {__jmpbuf = {138142696, 138142696, 138142712, -1080123848, 691716225, 1071442414}, __mask_was_saved = 0, __saved_mask = {__val = {0, 0, 0, 0, 0, 3077261489, 0, 0, 0, 0, 0, 0, 0, 0, 192, 3078107544, 1, 176, 22, 0, 137872602, 137869672, 137872600, 3214843432, 135602776, 137869673, 137872602, 137641241, 137667088, 137872602, 0, 137641265}}}}, backlist = 0x0, handlerlist = 0x0, lisp_eval_depth = 0, pdlcount = 2, poll_suppress_count = 1, interrupt_input_blocked = 0, byte_stack = 0x0} #10 0x081063d6 in command_loop () at /down/emacs/src/keyboard.c:1346 No locals. #11 0x081066eb in recursive_edit_1 () at /down/emacs/src/keyboard.c:955 val = #12 0x08106812 in Frecursive_edit () at /down/emacs/src/keyboard.c:1017 buffer = 137641241 #13 0x080fd61d in main (argc=2, argv=0xbf9ea244) at /down/emacs/src/emacs.c:1772 dummy = 48 stack_bottom_variable = 7 '\a' do_initial_setlocale = 1 skip_args = 0 rlim = {rlim_cur = 8388608, rlim_max = 18446744073709551615} no_loadup = 0 junk = 0x0 --=-=-=-- From monnier@IRO.UMontreal.CA Fri Jun 13 15:19:17 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 407) by emacsbugs.donarmstrong.com; 13 Jun 2008 22:19:17 +0000 Received: from chene.dit.umontreal.ca (chene.dit.umontreal.ca [132.204.246.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5DMJDVM008280 for <407@emacsbugs.donarmstrong.com>; Fri, 13 Jun 2008 15:19:15 -0700 Received: from ceviche.home (vpn-132-204-232-72.acd.umontreal.ca [132.204.232.72]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m5DMJB9n005652 for <407@emacsbugs.donarmstrong.com>; Fri, 13 Jun 2008 18:19:13 -0400 Received: by ceviche.home (Postfix, from userid 20848) id DBA55B4087; Fri, 13 Jun 2008 18:18:32 -0400 (EDT) From: Stefan Monnier To: 407@debbugs.gnu.org Subject: Re: bug#407: gpm server stop making emacs abort() Message-ID: References: <87wsktf41m.fsf@blah.blah> Date: Fri, 13 Jun 2008 18:18:32 -0400 In-Reply-To: <87wsktf41m.fsf@blah.blah> (Kevin Ryde's message of "Sat, 14 Jun 2008 06:55:33 +1000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered HAS_X_HELO=0, RV3038=0 > If running with > (gpm-mouse-mode 1) > and if you stop the gpm server, then emacs dies with > Fatal error (6)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) From rgm@gnu.org Tue Jul 1 00:08:08 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,MISSING_SUBJECT, MURPHY_DRUGS_REL8,NOSUBJECT,RCVD_IN_DNSWL_MED,VALID_BTS_CONTROL autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 1 Jul 2008 07:08:09 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m61786A8026915 for ; Tue, 1 Jul 2008 00:08:07 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KDZxt-00022l-Tp; Tue, 01 Jul 2008 03:07:49 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18537.55237.747316.814484@fencepost.gnu.org> Date: Tue, 1 Jul 2008 03:07:49 -0400 From: Glenn Morris To: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: magenta X-Ran: ,E>QeWl#f=6''T'>x1.qAL":W"(7=="T?1HANw<7jaA!d!wa; Tue, 1 Jul 2008 13:48:20 -0700 Received: (qmail invoked by alias); 01 Jul 2008 20:48:12 -0000 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 From: Sven Joachim To: Stefan Monnier Cc: 407@debbugs.gnu.org, Kevin Ryde Subject: Re: bug#407: gpm server stop making emacs abort() References: <87wsktf41m.fsf@blah.blah> Date: Tue, 01 Jul 2008 22:43:40 +0200 In-Reply-To: (Stefan Monnier's message of "Fri, 13 Jun 2008 18:18:32 -0400") Message-ID: <87iqvpgwsj.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.52 [ 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 From gg@zip.com.au Thu Jul 3 15:01:19 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 407) by emacsbugs.donarmstrong.com; 3 Jul 2008 22:01:20 +0000 Received: from mailout2.pacific.net.au (mailout2-7.pacific.net.au [61.8.2.230]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m63M1GWf019253 for <407@emacsbugs.donarmstrong.com>; Thu, 3 Jul 2008 15:01:17 -0700 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id 06BCCBD3DE; Fri, 4 Jul 2008 08:01:15 +1000 (EST) Received: from blah.blah (ppp22A6.dyn.pacific.net.au [61.8.34.166]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 0B5FC27403; Fri, 4 Jul 2008 08:01:11 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1KEWqy-0001fN-3o; Fri, 04 Jul 2008 08:00:36 +1000 From: Kevin Ryde To: Stefan Monnier Cc: Sven Joachim , 407@debbugs.gnu.org Subject: Re: bug#407: gpm server stop making emacs abort() References: <87wsktf41m.fsf@blah.blah> <87iqvpgwsj.fsf@gmx.de> Date: Fri, 04 Jul 2008 08:00:36 +1000 Message-ID: <874p76iq63.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > On 2008-06-14 00:18 +0200, Stefan Monnier wrote: > >> Does the patch below help? Yep. But should it clear gpm_tty too? It seems to need a "(gpm-mouse-mode 0)" before a fresh "(gpm-mouse-mode 1)" will take effect when the server is running again. From monnier@iro.umontreal.ca Thu Sep 11 21:14:36 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 407) by emacsbugs.donarmstrong.com; 12 Sep 2008 04:14:36 +0000 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8C4EUrT005872 for <407@emacsbugs.donarmstrong.com>; Thu, 11 Sep 2008 21:14:34 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuUEAN+JyUhFxIqP/2dsb2JhbACBY7RUgWKBBg X-IronPort-AV: E=Sophos;i="4.32,385,1217822400"; d="scan'208";a="26706274" Received: from 69-196-138-143.dsl.teksavvy.com (HELO ceviche.home) ([69.196.138.143]) by ironport2-out.teksavvy.com with ESMTP; 12 Sep 2008 00:14:25 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 7257FB40CD; Fri, 12 Sep 2008 00:14:25 -0400 (EDT) From: Stefan Monnier To: Sven Joachim Cc: 407@debbugs.gnu.org, Kevin Ryde Subject: Re: bug#407: gpm server stop making emacs abort() Message-ID: References: <87wsktf41m.fsf@blah.blah> <87iqvpgwsj.fsf@gmx.de> Date: Fri, 12 Sep 2008 00:14:25 -0400 In-Reply-To: <87iqvpgwsj.fsf@gmx.de> (Sven Joachim's message of "Tue, 01 Jul 2008 22:43:40 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> + 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. I've installed a similar patch. It does not do (gpm-mouse-mode 0) because I don't think it is safe at this point. So there's probably room for improvement, but it hopefully fixes the crashes. Stefan From svenjoac@gmx.de Thu Sep 11 22:54:20 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 407) by emacsbugs.donarmstrong.com; 12 Sep 2008 05:54:20 +0000 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 m8C5sGoQ008357 for <407@emacsbugs.donarmstrong.com>; Thu, 11 Sep 2008 22:54:18 -0700 Received: (qmail invoked by alias); 12 Sep 2008 05:54:10 -0000 Received: from p54863C6A.dip.t-dialin.net (EHLO debian) [84.134.60.106] by mail.gmx.net (mp032) with SMTP; 12 Sep 2008 07:54:10 +0200 X-Authenticated: #28250155 X-Provags-ID: V01U2FsdGVkX1/EkYlsSXXEbdPfW62kuDExEdNViE8TN5MiE7YMuC 0XctQK3oI9fMU5 From: Sven Joachim To: Stefan Monnier Cc: 407@debbugs.gnu.org, Kevin Ryde Subject: Re: bug#407: gpm server stop making emacs abort() References: <87wsktf41m.fsf@blah.blah> <87iqvpgwsj.fsf@gmx.de> Date: Fri, 12 Sep 2008 07:54:08 +0200 In-Reply-To: (Stefan Monnier's message of "Fri, 12 Sep 2008 00:14:25 -0400") Message-ID: <87vdx1oqnz.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.65 On 2008-09-12 06:14 +0200, Stefan Monnier wrote: >>> + 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. > > I've installed a similar patch. It does not do (gpm-mouse-mode 0) > because I don't think it is safe at this point. So there's probably > room for improvement, but it hopefully fixes the crashes. Indeed it fixes the crashes, but the room for improvement is rather large, as gpm-mouse-mode does not work at all now. :-( Sven From monnier@iro.umontreal.ca Fri Sep 12 10:09:50 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 407) by emacsbugs.donarmstrong.com; 12 Sep 2008 17:09:51 +0000 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8CH9lwR024351 for <407@emacsbugs.donarmstrong.com>; Fri, 12 Sep 2008 10:09:49 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuUEAIQ/ykhFxIqP/2dsb2JhbACBY7YsgWKBBg X-IronPort-AV: E=Sophos;i="4.32,390,1217822400"; d="scan'208";a="26732206" Received: from 69-196-138-143.dsl.teksavvy.com (HELO pastel.home) ([69.196.138.143]) by ironport2-out.teksavvy.com with ESMTP; 12 Sep 2008 13:09:42 -0400 Received: by pastel.home (Postfix, from userid 20848) id D84678136; Fri, 12 Sep 2008 13:08:56 -0400 (EDT) From: Stefan Monnier To: Nick Roberts , Sven Joachim Cc: 407@debbugs.gnu.org, Kevin Ryde Subject: Re: bug#407: gpm server stop making emacs abort() Message-ID: References: <87wsktf41m.fsf@blah.blah> <87iqvpgwsj.fsf@gmx.de> <87vdx1oqnz.fsf@gmx.de> Date: Fri, 12 Sep 2008 13:08:56 -0400 In-Reply-To: <87vdx1oqnz.fsf@gmx.de> (Sven Joachim's message of "Fri, 12 Sep 2008 07:54:08 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>>> + 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. >> >> I've installed a similar patch. It does not do (gpm-mouse-mode 0) >> because I don't think it is safe at this point. So there's probably >> room for improvement, but it hopefully fixes the crashes. > Indeed it fixes the crashes, but the room for improvement is rather > large, as gpm-mouse-mode does not work at all now. :-( Huh! Indeed! The condition "gpm < 0" is encountered all the time, so my patch ends up turning gpm off right away. But now I'm lost: I don't understand what delete_gpm_wait_descriptor and add_gpm_wait_descriptor do, because if I remove the call to add_gpm_wait_descriptor, the gpm support seems to still work just fine. Nick, do you have an idea what's going on? Stefan From gg@zip.com.au Thu Oct 30 15:12:01 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.5 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER,IMPRONONCABLE_2 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 407) by emacsbugs.donarmstrong.com; 30 Oct 2008 22:12:01 +0000 Received: from mailout2.pacific.net.au (mailout2-5.pacific.net.au [61.8.2.228]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9UMBuSQ025995 for <407@emacsbugs.donarmstrong.com>; Thu, 30 Oct 2008 15:11:58 -0700 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id BC2A1F9705; Fri, 31 Oct 2008 09:11:55 +1100 (EST) Received: from blah.blah (ppp2E76.dyn.pacific.net.au [61.8.46.118]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id AF05527407; Fri, 31 Oct 2008 09:11:49 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1KvfjP-00034y-NM; Fri, 31 Oct 2008 09:11:07 +1100 From: Kevin Ryde To: 407@debbugs.gnu.org Cc: Stefan Monnier Subject: Re: bug#407: gpm server stop making emacs abort() References: <87wsktf41m.fsf@blah.blah> <87iqvpgwsj.fsf@gmx.de> <87vdx1oqnz.fsf@gmx.de> Date: Fri, 31 Oct 2008 09:11:07 +1100 Message-ID: <87ej1xsphg.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Stefan Monnier writes: > > Huh! Indeed! The condition "gpm < 0" is encountered all the time, Yes, EWOULDBLOCK. gpm==0 is eof from the server. gpm==-1 is a protocol error as well as EWOULDBLOCK, but it might be ok to quietly ignore that. It probably only happens if libgpm.so and the running daemon are incompatible versions. I get some joy from the change below. I think the add/delete descriptor calls might be right, but I'm not terrifically confident. One thing I notice not done is to turn off the gpm-mouse-mode minor mode variable when stopping like this. Maybe that's good enough. It won't stop normally, so as long as emacs doesn't abort that could be enough. (You can M-x gpm-mouse-mode twice to toggle it back on.) --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=keyboard.c.gpm.diff *** keyboard.c 31 Oct 2008 08:25:09 +1100 1.977 --- keyboard.c 31 Oct 2008 08:25:19 +1100 *************** *** 7102,7118 **** { Gpm_Event event; struct input_event hold_quit; ! int gpm; EVENT_INIT (hold_quit); hold_quit.kind = NO_EVENT; while (gpm = Gpm_GetEvent (&event), gpm == 1) { nread += handle_one_term_event (tty, &event, &hold_quit); } ! if (gpm < 0) ! /* Presumably the GPM daemon has closed the connection. */ ! close_gpm (); if (hold_quit.kind != NO_EVENT) kbd_buffer_store_event (&hold_quit); if (nread) --- 7102,7123 ---- { Gpm_Event event; struct input_event hold_quit; ! int gpm, fd; EVENT_INIT (hold_quit); hold_quit.kind = NO_EVENT; + /* gpm==1 if event received. + gpm==0 if the GPM daemon has closed the connection, in which case + Gpm_GetEvent closes gpm_fd and clears it to -1, so save that + for close_gpm() to remove from the select masks. + gpm==-1 if a protocol error or EWOULDBLOCK; the latter is normal. */ + fd = gpm_fd; while (gpm = Gpm_GetEvent (&event), gpm == 1) { nread += handle_one_term_event (tty, &event, &hold_quit); } ! if (gpm == 0) ! close_gpm (fd); if (hold_quit.kind != NO_EVENT) kbd_buffer_store_event (&hold_quit); if (nread) --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=term.c.gpm.diff *** term.c 31 Oct 2008 08:23:59 +1100 1.229 --- term.c 31 Oct 2008 08:24:05 +1100 *************** *** 3129,3138 **** } void ! close_gpm () { ! if (gpm_fd >= 0) ! delete_gpm_wait_descriptor (gpm_fd); while (Gpm_Close()); /* close all the stack */ gpm_tty = NULL; } --- 3129,3139 ---- } void ! close_gpm (fd) ! int fd; { ! if (fd >= 0) ! delete_gpm_wait_descriptor (fd); while (Gpm_Close()); /* close all the stack */ gpm_tty = NULL; } *************** *** 3150,3156 **** if (!tty || gpm_tty != tty) return Qnil; /* Not activated on this terminal, nothing to do. */ ! close_gpm (); return Qnil; } #endif /* HAVE_GPM */ --- 3151,3157 ---- if (!tty || gpm_tty != tty) return Qnil; /* Not activated on this terminal, nothing to do. */ ! close_gpm (gpm_fd); return Qnil; } #endif /* HAVE_GPM */ --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=termhooks.h.gpm.diff *** termhooks.h 13 Sep 2008 07:34:28 +1000 1.98 --- termhooks.h 30 Oct 2008 18:54:52 +1100 *************** *** 644,650 **** extern struct terminal *initial_terminal; #ifdef HAVE_GPM ! extern void close_gpm (void); #endif /* arch-tag: 33a00ecc-52b5-4186-a410-8801ac9f087d --- 644,650 ---- extern struct terminal *initial_terminal; #ifdef HAVE_GPM ! extern void close_gpm P_ ((int)); #endif /* arch-tag: 33a00ecc-52b5-4186-a410-8801ac9f087d --=-=-= -- The sigfile one-line movie review series: "Cold Fever" -- easily the best Japanese-Icelandic road movie ever made. --=-=-=-- From gg@zip.com.au Thu Dec 18 13:03:05 2008 Received: (at control) by emacsbugs.donarmstrong.com; 18 Dec 2008 21:03:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=MURPHY_DRUGS_REL8, VALID_BTS_CONTROL autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: from mailout1.pacific.net.au (mailout1-3.pacific.net.au [61.8.2.210]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBIL3141014130 for ; Thu, 18 Dec 2008 13:03:03 -0800 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 5E66840832D for ; Fri, 19 Dec 2008 08:03:00 +1100 (EST) Received: from blah.blah (ppp24CD.dyn.pacific.net.au [61.8.36.205]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id DBED327405 for ; Fri, 19 Dec 2008 08:02:59 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1LDQ15-0000rm-AE for control@emacsbugs.donarmstrong.com; Fri, 19 Dec 2008 08:02:43 +1100 From: Kevin Ryde To: control@debbugs.gnu.org Subject: per my last addition to 407 Date: Fri, 19 Dec 2008 08:02:42 +1100 Message-ID: <87ej05urgs.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii tags 407 -moreinfo tags 407 patch thanks From monnier@iro.umontreal.ca Fri Mar 27 09:18:29 2009 Received: (at 407-done) by emacsbugs.donarmstrong.com; 27 Mar 2009 16:18:29 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: ** X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=2.5 required=4.0 tests=MURPHY_DRUGS_REL8,XIRONPORT autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2RGIPmv025830 for <407-done@emacsbugs.donarmstrong.com>; Fri, 27 Mar 2009 09:18:27 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvgEAI+ZzElFxIfy/2dsb2JhbACBUc9Eg3cGhHU X-IronPort-AV: E=Sophos;i="4.38,432,1233550800"; d="scan'208";a="35772291" Received: from 69-196-135-242.dsl.teksavvy.com (HELO pastel.home) ([69.196.135.242]) by ironport2-out.teksavvy.com with ESMTP; 27 Mar 2009 12:18:19 -0400 Received: by pastel.home (Postfix, from userid 20848) id 415248682; Fri, 27 Mar 2009 12:18:19 -0400 (EDT) From: Stefan Monnier To: 407-done@debbugs.gnu.org Subject: gpm server stop making emacs abort() Message-ID: Date: Fri, 27 Mar 2009 12:18:19 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Thanks Kevin for your patch. I've tried it out and it seems to be fine, so I installed it (at long last). We're really relying too much on undocumented parts of the GPM API, tho. Stefan From gg@zip.com.au Fri Mar 27 17:46:58 2009 Received: (at 407) by emacsbugs.donarmstrong.com; 28 Mar 2009 00:46:59 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout1.pacific.net.au (mailout1-2.pacific.net.au [61.8.2.209]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2S0ksnK001911 for <407@emacsbugs.donarmstrong.com>; Fri, 27 Mar 2009 17:46:56 -0700 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id F0C1541D78C for <407@emacsbugs.donarmstrong.com>; Sat, 28 Mar 2009 11:46:52 +1100 (EST) Received: from blah.blah (ppp203E.dyn.pacific.net.au [61.8.32.62]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 7B54F2741B for <407@emacsbugs.donarmstrong.com>; Sat, 28 Mar 2009 11:46:52 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1LnMgh-0005mk-2u for 407@emacsbugs.donarmstrong.com; Sat, 28 Mar 2009 11:46:15 +1100 From: Kevin Ryde To: 407@debbugs.gnu.org Subject: Re: bug#407 closed by Stefan Monnier (gpm server stop making emacs abort()) References: <87wsktf41m.fsf@blah.blah> Date: Sat, 28 Mar 2009 11:46:14 +1100 In-Reply-To: (Emacs bug Tracking System's message of "Fri, 27 Mar 2009 16:25:05 +0000") Message-ID: <87zlf6wk2x.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier writes: > > I've tried it out and it seems to be fine, so I installed it (at long > last). I'd wondered if it suffered some bit-rot in the interim (changes to other stuff somewhere), but yes it seems to go. > We're really relying too much on undocumented parts of the GPM API, tho. I suspect it may be slightly geared towards a program that uses gpm all the time and will exit if it goes away, so normally you don't care much about a shutdown/disconnect. From unknown Sat Sep 06 00:30:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Tue, 23 Jun 2009 14:24:10 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator