From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 12 09:58:27 2010 Received: (at submit) by debbugs.gnu.org; 12 Jan 2010 14:58:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NUiCQ-0000H7-KV for submit@debbugs.gnu.org; Tue, 12 Jan 2010 09:58:26 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NUiCM-0000Gs-1G for submit@debbugs.gnu.org; Tue, 12 Jan 2010 09:58:24 -0500 Received: from mail.gnu.org ([199.232.76.166]:53392 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NUiCH-0004tn-8f for submit@debbugs.gnu.org; Tue, 12 Jan 2010 09:58:17 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NUiCF-0004XC-E7 for submit@debbugs.gnu.org; Tue, 12 Jan 2010 09:58:16 -0500 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.1.0 Received: from lists.gnu.org ([199.232.76.165]:37935) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NUiCF-0004Wy-6z for submit@debbugs.gnu.org; Tue, 12 Jan 2010 09:58:15 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUiCE-0008PG-So for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2010 09:58:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUiCA-0008Ln-G2 for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2010 09:58:14 -0500 Received: from [199.232.76.173] (port=36594 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUiCA-0008Ld-7c for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2010 09:58:10 -0500 Received: from mail.gmx.net ([213.165.64.20]:39249) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1NUiC9-0004Tq-IR for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2010 09:58:09 -0500 Received: (qmail invoked by alias); 12 Jan 2010 14:58:06 -0000 Received: from p5486459C.dip.t-dialin.net (EHLO turtle.gmx.de) [84.134.69.156] by mail.gmx.net (mp070) with SMTP; 12 Jan 2010 15:58:06 +0100 X-Authenticated: #28250155 X-Provags-ID: V01U2FsdGVkX19xpQk1dRRxcdVaxuzEjQgK+/9ijf7PzXxZA0v+8n mCvP3qcuM8cQs8 Received: by turtle.gmx.de (Postfix, from userid 1000) id 5BDBA35545; Tue, 12 Jan 2010 15:58:05 +0100 (CET) From: Sven Joachim To: bug-gnu-emacs@gnu.org Subject: 23.1.91; Wrong type argument: keymapp, ("DEAD" . 35215396) X-Debbugs-Cc: Sven Joachim Date: Tue, 12 Jan 2010 15:58:04 +0100 Message-ID: <87skab2ww3.fsf@turtle.gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.46 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.5 (----) Today I've built and installed an emacs-snapshot package for Debian, and I'm seeing this: ,---- | % emacs -Q | Wrong type argument: keymapp, ("DEAD" . 35215396) | % echo $? | 255 `---- Unfortunately this is a Heisenbug, I'm not able to reproduce it under gdb. It even depends on the exact contents of argv[0], i.e. running "/usr/bin/emacs -Q" or "emacs-snapshot -Q" does not show the error. A similar issue has been reported against Debian's emacs23 package, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550170. The most valuable message there is probably http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550170#26. In GNU Emacs 23.1.91.1 (i486-pc-linux-gnu, GTK+ Version 2.18.5) of 2010-01-12 on turtle, modified by Debian (emacs-snapshot package, version 1:20100112-1) Windowing system distributor `The X.Org Foundation', version 11.0.10703902 configured using `configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.1.91/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1.91/site-lisp:/usr/share/emacs/site-lisp' '--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C 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: de_DE.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 12 14:08:39 2010 Received: (at 5365) by debbugs.gnu.org; 12 Jan 2010 19:08:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NUm6Z-0004Gh-MP for submit@debbugs.gnu.org; Tue, 12 Jan 2010 14:08:39 -0500 Received: from pantheon-po39.its.yale.edu ([130.132.50.100]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NUm6X-0004Gc-ME for 5365@debbugs.gnu.org; Tue, 12 Jan 2010 14:08:37 -0500 Received: from furry (dhcp128036014123.central.yale.edu [128.36.14.123]) (authenticated bits=0) by pantheon-po39.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o0CJ8XU2008569 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 12 Jan 2010 14:08:33 -0500 Received: by furry (Postfix, from userid 1000) id 48F6AC05D; Tue, 12 Jan 2010 12:08:33 -0700 (MST) From: Chong Yidong To: Sven Joachim Subject: Re: 23.1.91; Wrong type argument: keymapp, ("DEAD" . 35215396) Date: Tue, 12 Jan 2010 14:08:33 -0500 Message-ID: <876377kuoe.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 5365 Cc: 5365@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > | % emacs -Q > | Wrong type argument: keymapp, ("DEAD" . 35215396) > > Unfortunately this is a Heisenbug, I'm not able to reproduce it under > gdb. It even depends on the exact contents of argv[0], i.e. running > "/usr/bin/emacs -Q" or "emacs-snapshot -Q" does not show the error. > > A similar issue has been reported against Debian's emacs23 package, see > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550170. The most > valuable message there is probably > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550170#26. Pretty bizaare. I can't reproduce this on my machine, but according to the Debian bug report, it seems to be related to environment variables somehow. Do you see the bug if you start Emacs with an empty environment like env -i DISPLAY=":0.0" HOME=/home/cyd /home/cyd/emacs/src/emacs (replacing cyd with your username)? From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 12 14:39:28 2010 Received: (at 5365) by debbugs.gnu.org; 12 Jan 2010 19:39:28 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NUmaN-0004gG-MN for submit@debbugs.gnu.org; Tue, 12 Jan 2010 14:39:28 -0500 Received: from mail.gmx.net ([213.165.64.20]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1NUmaK-0004g7-Pe for 5365@debbugs.gnu.org; Tue, 12 Jan 2010 14:39:25 -0500 Received: (qmail invoked by alias); 12 Jan 2010 19:39:14 -0000 Received: from p5486459C.dip.t-dialin.net (EHLO turtle.gmx.de) [84.134.69.156] by mail.gmx.net (mp021) with SMTP; 12 Jan 2010 20:39:14 +0100 X-Authenticated: #28250155 X-Provags-ID: V01U2FsdGVkX19XvnEdqRpXznST/3rhkJq9ln7TmIw8u5PQdNjEiK 07fO3SZUlQD0FD Received: by turtle.gmx.de (Postfix, from userid 1000) id 0376735545; Tue, 12 Jan 2010 20:39:10 +0100 (CET) From: Sven Joachim To: Chong Yidong Subject: Re: 23.1.91; Wrong type argument: keymapp, ("DEAD" . 35215396) References: <876377kuoe.fsf@stupidchicken.com> Date: Tue, 12 Jan 2010 20:39:10 +0100 In-Reply-To: <876377kuoe.fsf@stupidchicken.com> (Chong Yidong's message of "Tue, 12 Jan 2010 14:08:33 -0500") Message-ID: <87vdf715b5.fsf@turtle.gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.57 X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 5365 Cc: 5365@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.0 (---) On 2010-01-12 20:08 +0100, Chong Yidong wrote: >> | % emacs -Q >> | Wrong type argument: keymapp, ("DEAD" . 35215396) >> >> Unfortunately this is a Heisenbug, I'm not able to reproduce it under >> gdb. It even depends on the exact contents of argv[0], i.e. running >> "/usr/bin/emacs -Q" or "emacs-snapshot -Q" does not show the error. >> >> A similar issue has been reported against Debian's emacs23 package, see >> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550170. The most >> valuable message there is probably >> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550170#26. > > Pretty bizaare. I can't reproduce this on my machine, but according to > the Debian bug report, it seems to be related to environment variables > somehow. Apparently, though I don't see the bug with Debian's emacs23 package in the same environment. > Do you see the bug if you start Emacs with an empty > environment like > > env -i DISPLAY=":0.0" HOME=/home/cyd /home/cyd/emacs/src/emacs > > (replacing cyd with your username)? In that case, Emacs starts normally. Sven From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 12 15:30:45 2010 Received: (at control) by debbugs.gnu.org; 12 Jan 2010 20:30:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NUnNz-0005J8-N0 for submit@debbugs.gnu.org; Tue, 12 Jan 2010 15:30:45 -0500 Received: from pantheon-po19.its.yale.edu ([130.132.50.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NUnNy-0005Ix-2R for control@debbugs.gnu.org; Tue, 12 Jan 2010 15:30:42 -0500 Received: from furry (dhcp128036014123.central.yale.edu [128.36.14.123]) (authenticated bits=0) by pantheon-po19.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o0CKUb7e013666 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 12 Jan 2010 15:30:37 -0500 Received: by furry (Postfix, from userid 1000) id CBCCEC05D; Tue, 12 Jan 2010 13:30:37 -0700 (MST) From: Chong Yidong To: control@debbugs.gnu.org Subject: severity 5365 serious Date: Tue, 12 Jan 2010 15:30:37 -0500 Message-ID: <87wrzn83rm.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.0 (----) severity 5365 serious thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 13 05:04:04 2010 Received: (at 5365) by debbugs.gnu.org; 13 Jan 2010 10:04:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NV055-00064t-Ck for submit@debbugs.gnu.org; Wed, 13 Jan 2010 05:04:03 -0500 Received: from mail.gmx.net ([213.165.64.20]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1NV052-00064O-PF for 5365@debbugs.gnu.org; Wed, 13 Jan 2010 05:04:01 -0500 Received: (qmail invoked by alias); 13 Jan 2010 10:03:56 -0000 Received: from p548646C5.dip.t-dialin.net (EHLO turtle.gmx.de) [84.134.70.197] by mail.gmx.net (mp011) with SMTP; 13 Jan 2010 11:03:56 +0100 X-Authenticated: #28250155 X-Provags-ID: V01U2FsdGVkX1+9AJkW2zy9WHG7V3YpoJHym1tcQfiYE3FW66bP7q yk5mmDHYd+nx6C Received: by turtle.gmx.de (Postfix, from userid 1000) id 5794035545; Wed, 13 Jan 2010 11:03:55 +0100 (CET) From: Sven Joachim To: 5365@debbugs.gnu.org Subject: Re: bug#5365: 23.1.91; Wrong type argument: keymapp, ("DEAD" . 35215396) References: <87skab2ww3.fsf@turtle.gmx.de> Date: Wed, 13 Jan 2010 11:03:55 +0100 In-Reply-To: <87skab2ww3.fsf@turtle.gmx.de> (Sven Joachim's message of "Tue, 12 Jan 2010 15:58:04 +0100") Message-ID: <87ockyqq2c.fsf@turtle.gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.51 X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 5365 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) On 2010-01-12 15:58 +0100, Sven Joachim wrote: > Today I've built and installed an emacs-snapshot package for Debian, and > I'm seeing this: > > ,---- > | % emacs -Q > | Wrong type argument: keymapp, ("DEAD" . 35215396) > | % echo $? > | 255 > `---- > > Unfortunately this is a Heisenbug, I'm not able to reproduce it under > gdb. I now managed to attach gdb to a running process and get a backtrace after setting a breakpoint on Fsignal: ,---- | (gdb) bt | #0 Fsignal (error_symbol=138366426, data=138990086) at eval.c:1629 | #1 0x0818cfa8 in xsignal (error_symbol=138366426, data=138990086) at eval.c:1729 | #2 0x0818d377 in xsignal2 (error_symbol=138366426, arg1=138358370, arg2=140861614) at eval.c:1753 | #3 0x0817b0a1 in wrong_type_argument (predicate=138358370, value=140861614) at data.c:118 | #4 0x081324a5 in get_keymap (object=140861614, error=1, autoload=1) at keymap.c:307 | #5 0x08132d32 in keymap_parent (keymap=140861614, autoload=1) at keymap.c:321 | #6 0x08132dc9 in Fkeymap_parent (keymap=140861614) at keymap.c:341 | #7 0x0818cb44 in Ffuncall (nargs=2, args=0xffa14ac8) at eval.c:3024 | #8 0x081c4bd1 in Fbyte_code (bytestr=137365729, vector=137365749, maxdepth=16) at bytecode.c:679 | #9 0x0818e944 in funcall_lambda (fun=, nargs=, arg_vector=0x848d216) at eval.c:3211 | #10 0x0818c953 in Ffuncall (nargs=2, args=0xffa14c30) at eval.c:3081 | #11 0x081c4bd1 in Fbyte_code (bytestr=136627065, vector=136627085, maxdepth=20) at bytecode.c:679 | #12 0x0818e944 in funcall_lambda (fun=, nargs=, arg_vector=0x848d216) at eval.c:3211 | #13 0x0818c953 in Ffuncall (nargs=2, args=0xffa14db0) at eval.c:3081 | #14 0x081c4bd1 in Fbyte_code (bytestr=137074713, vector=137074733, maxdepth=24) at bytecode.c:679 | #15 0x0818e944 in funcall_lambda (fun=, nargs=, arg_vector=0x848d216) at eval.c:3211 | #16 0x0818c953 in Ffuncall (nargs=2, args=0xffa14f30) at eval.c:3081 | #17 0x081c4bd1 in Fbyte_code (bytestr=137071977, vector=137071997, maxdepth=24) at bytecode.c:679 | #18 0x0818e944 in funcall_lambda (fun=, nargs=, arg_vector=0x848d216) at eval.c:3211 | #19 0x0818c953 in Ffuncall (nargs=1, args=0xffa150b0) at eval.c:3081 | #20 0x081c4bd1 in Fbyte_code (bytestr=136675297, vector=136675317, maxdepth=28) at bytecode.c:679 | #21 0x0818e944 in funcall_lambda (fun=, nargs=, arg_vector=0x848d216) at eval.c:3211 | #22 0x0818c953 in Ffuncall (nargs=1, args=0xffa15230) at eval.c:3081 | #23 0x081c4bd1 in Fbyte_code (bytestr=136672241, vector=136672261, maxdepth=24) at bytecode.c:679 | #24 0x0818e944 in funcall_lambda (fun=, nargs=, arg_vector=0x848d216) at eval.c:3211 | #25 0x0818eb43 in apply_lambda (fun=136672221, args=138328562, eval_flag=1) at eval.c:3135 | #26 0x0818e224 in Feval (form=138570382) at eval.c:2406 | #27 0x08123cf3 in top_level_2 () at keyboard.c:1369 | #28 0x0818be91 in internal_condition_case (bfun=0x8123ce0 , handlers=138366378, hfun=0x8128a00 ) at eval.c:1490 | #29 0x081287b5 in top_level_1 () at keyboard.c:1377 | #30 0x0818bf71 in internal_catch (tag=138363450, func=0x8128750 , arg=138328562) at eval.c:1226 | #31 0x08128831 in command_loop () at keyboard.c:1332 | #32 0x08128bea in recursive_edit_1 () at keyboard.c:954 | #33 0x08128d12 in Frecursive_edit () at keyboard.c:1016 | #34 0x0811d3d8 in main (argc=, argv=) at emacs.c:1833 | | Lisp Backtrace: | "keymap-parent" (0xffa14acc) | "x-setup-function-keys" (0xffa14c34) | "x-create-frame-with-faces" (0xffa14db4) | "make-frame" (0xffa14f34) | "frame-initialize" (0xffa150b4) | "command-line" (0xffa15234) | "normal-top-level" (0xffa15330) | (gdb) `---- Any advice how to proceed would be appreciated. Sven From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 13 10:17:30 2010 Received: (at 5365) by debbugs.gnu.org; 13 Jan 2010 15:17:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NV4yQ-0002Xu-0B for submit@debbugs.gnu.org; Wed, 13 Jan 2010 10:17:30 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NV4yP-0002Xp-8T for 5365@debbugs.gnu.org; Wed, 13 Jan 2010 10:17:29 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhoFAPZyTUvO+KPG/2dsb2JhbACBRNVohDAEijI X-IronPort-AV: E=Sophos;i="4.49,268,1262581200"; d="scan'208";a="53669858" Received: from 206-248-163-198.dsl.teksavvy.com (HELO pastel.home) ([206.248.163.198]) by ironport2-out.pppoe.ca with ESMTP; 13 Jan 2010 10:17:23 -0500 Received: by pastel.home (Postfix, from userid 20848) id 9D1CB806E; Wed, 13 Jan 2010 10:17:23 -0500 (EST) From: Stefan Monnier To: Sven Joachim Subject: Re: bug#5365: 23.1.91; Wrong type argument: keymapp, ("DEAD" . 35215396) Message-ID: References: <87skab2ww3.fsf@turtle.gmx.de> <87ockyqq2c.fsf@turtle.gmx.de> Date: Wed, 13 Jan 2010 10:17:23 -0500 In-Reply-To: <87ockyqq2c.fsf@turtle.gmx.de> (Sven Joachim's message of "Wed, 13 Jan 2010 11:03:55 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 5365 Cc: 5365@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) >> Today I've built and installed an emacs-snapshot package for Debian, and >> I'm seeing this: >> >> ,---- >> | % emacs -Q >> | Wrong type argument: keymapp, ("DEAD" . 35215396) >> | % echo $? >> | 255 >> `---- This cons cell is almost for sure on the free-list. I.e. the memory management code thought it was unused and put it back on the free list for reuse (and luckily it hasn't been reused yet). This implies that a backtrace probably won't be sufficient to track it down :-( >> Unfortunately this is a Heisenbug, I'm not able to reproduce it under >> gdb. > I now managed to attach gdb to a running process and get a backtrace > after setting a breakpoint on Fsignal: > | Lisp Backtrace: > | "keymap-parent" (0xffa14acc) > | "x-setup-function-keys" (0xffa14c34) > | "x-create-frame-with-faces" (0xffa14db4) > | "make-frame" (0xffa14f34) > | "frame-initialize" (0xffa150b4) > | "command-line" (0xffa15234) > | "normal-top-level" (0xffa15330) > | (gdb) OK, so if we trust your backtrace (if you compiled with optimizations, there's a good chance that some parts of the backtrace aren't to be trusted, tho the Lisp part is less likely to be invented), the above implies that we're looking at the (keymap-parent local-function-key-map) call in x-win.el's x-setup-function-keys. > ,---- > | (gdb) bt > | #0 Fsignal (error_symbol=138366426, data=138990086) at eval.c:1629 > | #1 0x0818cfa8 in xsignal (error_symbol=138366426, data=138990086) at eval.c:1729 > | #2 0x0818d377 in xsignal2 (error_symbol=138366426, arg1=138358370, arg2=140861614) at eval.c:1753 > | #3 0x0817b0a1 in wrong_type_argument (predicate=138358370, value=140861614) at data.c:118 > | #4 0x081324a5 in get_keymap (object=140861614, error=1, autoload=1) at keymap.c:307 > | #5 0x08132d32 in keymap_parent (keymap=140861614, autoload=1) at keymap.c:321 > | #6 0x08132dc9 in Fkeymap_parent (keymap=140861614) at keymap.c:341 And this seems to indicate that the free cons cell ("DEAD" . 35215396) is actually the one we got from local-function-key-map. As for how that could happen... Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 13 12:11:35 2010 Received: (at 5365) by debbugs.gnu.org; 13 Jan 2010 17:11:35 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NV6kp-0004mv-HH for submit@debbugs.gnu.org; Wed, 13 Jan 2010 12:11:35 -0500 Received: from pantheon-po43.its.yale.edu ([130.132.50.104]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NV6ko-0004mq-D9 for 5365@debbugs.gnu.org; Wed, 13 Jan 2010 12:11:34 -0500 Received: from furry (dhcp128036014123.central.yale.edu [128.36.14.123]) (authenticated bits=0) by pantheon-po43.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o0DHBT1T004328 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 13 Jan 2010 12:11:29 -0500 Received: by furry (Postfix, from userid 1000) id ABB48C05D; Wed, 13 Jan 2010 10:11:29 -0700 (MST) From: Chong Yidong To: Sven Joachim Subject: Re: bug#5365: 23.1.91; Wrong type argument: keymapp, ("DEAD" . 35215396) References: <87skab2ww3.fsf@turtle.gmx.de> <87ockyqq2c.fsf@turtle.gmx.de> Date: Wed, 13 Jan 2010 12:11:29 -0500 In-Reply-To: (Stefan Monnier's message of "Wed, 13 Jan 2010 10:17:23 -0500") Message-ID: <87aawigcam.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 5365 Cc: Stefan Monnier , 5365@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) Stefan Monnier writes: >> | #4 0x081324a5 in get_keymap (object=140861614, error=1, autoload=1) at keymap.c:307 >> | #5 0x08132d32 in keymap_parent (keymap=140861614, autoload=1) at keymap.c:321 >> | #6 0x08132dc9 in Fkeymap_parent (keymap=140861614) at keymap.c:341 >> ... >> | Lisp Backtrace: >> | "keymap-parent" (0xffa14acc) >> | "x-setup-function-keys" (0xffa14c34) >> | "x-create-frame-with-faces" (0xffa14db4) >> | "make-frame" (0xffa14f34) >> | "frame-initialize" (0xffa150b4) >> | "command-line" (0xffa15234) >> | "normal-top-level" (0xffa15330) >> | (gdb) > > OK, so if we trust your backtrace (if you compiled with optimizations, > there's a good chance that some parts of the backtrace aren't to be > trusted, tho the Lisp part is less likely to be invented), the above > implies that we're looking at the (keymap-parent local-function-key-map) > call in x-win.el's x-setup-function-keys. Sven, could you verify this? In GDB, do f 5 p keymap p current_kboard->Vlocal_function_key_map The two values should be the same. Even if that's the case, I'm not sure why Vlocal_function_key_map is getting garbage-collected, tho. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 13 12:28:00 2010 Received: (at 5365) by debbugs.gnu.org; 13 Jan 2010 17:28:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NV70i-00050K-Fj for submit@debbugs.gnu.org; Wed, 13 Jan 2010 12:28:00 -0500 Received: from pantheon-po43.its.yale.edu ([130.132.50.104]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NV70g-00050C-GQ for 5365@debbugs.gnu.org; Wed, 13 Jan 2010 12:27:58 -0500 Received: from furry (dhcp128036014123.central.yale.edu [128.36.14.123]) (authenticated bits=0) by pantheon-po43.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o0DHRsEd015820 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 13 Jan 2010 12:27:54 -0500 Received: by furry (Postfix, from userid 1000) id E3489C05D; Wed, 13 Jan 2010 10:27:53 -0700 (MST) From: Chong Yidong To: Sven Joachim Subject: Re: bug#5365: 23.1.91; Wrong type argument: keymapp, ("DEAD" . 35215396) References: <87skab2ww3.fsf@turtle.gmx.de> <87ockyqq2c.fsf@turtle.gmx.de> <87aawigcam.fsf@stupidchicken.com> Date: Wed, 13 Jan 2010 12:27:53 -0500 In-Reply-To: <87aawigcam.fsf@stupidchicken.com> (Chong Yidong's message of "Wed, 13 Jan 2010 12:11:29 -0500") Message-ID: <87pr5d7w4m.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 5365 Cc: Stefan Monnier , 5365@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) Chong Yidong writes: > Even if that's the case, I'm not sure why Vlocal_function_key_map is > getting garbage-collected, tho. OK, I see one place where this could happen. In xterm.c:10207: terminal->kboard = (KBOARD *) xmalloc (sizeof (KBOARD)); ... if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound)) { char *vendor = ServerVendor (dpy); /* Temporarily hide the partially initialized terminal */ terminal_list = terminal->next_terminal; UNBLOCK_INPUT; terminal->kboard->Vsystem_key_alist = call1 (Qvendor_specific_keysyms, vendor ? build_string (vendor) : empty_unibyte_string); BLOCK_INPUT; ... } terminal->kboard->next_kboard = all_kboards; all_kboards = terminal->kboard; It's possible that garbage-collection occurs during the call1, when the keyboard has not yet been put on the all_kboards linked list. In that case, it will not be protected from garbage collection. Sven, does the following patch fix the bug? *** src/xterm.c 2010-01-09 04:16:32 +0000 --- src/xterm.c 2010-01-13 17:27:27 +0000 *************** *** 10210,10215 **** --- 10210,10216 ---- if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound)) { char *vendor = ServerVendor (dpy); + int count = inhibit_garbage_collection (); /* Temporarily hide the partially initialized terminal */ terminal_list = terminal->next_terminal; UNBLOCK_INPUT; *************** *** 10217,10222 **** --- 10218,10224 ---- = call1 (Qvendor_specific_keysyms, vendor ? build_string (vendor) : empty_unibyte_string); BLOCK_INPUT; + unbind_to (count, Qnil); terminal->next_terminal = terminal_list; terminal_list = terminal; } From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 13 13:46:59 2010 Received: (at 5365) by debbugs.gnu.org; 13 Jan 2010 18:46:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NV8F9-0006cv-ER for submit@debbugs.gnu.org; Wed, 13 Jan 2010 13:46:59 -0500 Received: from mail.gmx.net ([213.165.64.20]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1NV8F6-0006cm-CH for 5365@debbugs.gnu.org; Wed, 13 Jan 2010 13:46:57 -0500 Received: (qmail invoked by alias); 13 Jan 2010 18:46:49 -0000 Received: from p548646C5.dip.t-dialin.net (EHLO turtle.gmx.de) [84.134.70.197] by mail.gmx.net (mp046) with SMTP; 13 Jan 2010 19:46:49 +0100 X-Authenticated: #28250155 X-Provags-ID: V01U2FsdGVkX1/slS1QjG7sCfVPrR18UyPOpPNggmjDd/gUMt9baK lk1opn54qXbUSR Received: by turtle.gmx.de (Postfix, from userid 1000) id 522CE35545; Wed, 13 Jan 2010 19:46:48 +0100 (CET) From: Sven Joachim To: Chong Yidong Subject: Re: bug#5365: 23.1.91; Wrong type argument: keymapp, ("DEAD" . 35215396) References: <87skab2ww3.fsf@turtle.gmx.de> <87ockyqq2c.fsf@turtle.gmx.de> <87aawigcam.fsf@stupidchicken.com> Date: Wed, 13 Jan 2010 19:46:48 +0100 In-Reply-To: <87aawigcam.fsf@stupidchicken.com> (Chong Yidong's message of "Wed, 13 Jan 2010 12:11:29 -0500") Message-ID: <87y6k1q1uv.fsf@turtle.gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.64 X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 5365 Cc: Stefan Monnier , 5365@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) On 2010-01-13 18:11 +0100, Chong Yidong wrote: > Stefan Monnier writes: >> >> OK, so if we trust your backtrace (if you compiled with optimizations, >> there's a good chance that some parts of the backtrace aren't to be >> trusted, tho the Lisp part is less likely to be invented), the above >> implies that we're looking at the (keymap-parent local-function-key-map) >> call in x-win.el's x-setup-function-keys. > > Sven, could you verify this? In GDB, do > > f 5 > p keymap > p current_kboard->Vlocal_function_key_map > > The two values should be the same. Yes, they are. Sven From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 13 13:57:47 2010 Received: (at 5365) by debbugs.gnu.org; 13 Jan 2010 18:57:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NV8PZ-0006nz-GS for submit@debbugs.gnu.org; Wed, 13 Jan 2010 13:57:47 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NV8PV-0006nn-0w for 5365@debbugs.gnu.org; Wed, 13 Jan 2010 13:57:43 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvIEAIamTUvO+KPG/2dsb2JhbACBRNYXhDAEijI X-IronPort-AV: E=Sophos;i="4.49,269,1262581200"; d="scan'208";a="53688534" Received: from 206-248-163-198.dsl.teksavvy.com (HELO pastel.home) ([206.248.163.198]) by ironport2-out.pppoe.ca with ESMTP; 13 Jan 2010 13:57:36 -0500 Received: by pastel.home (Postfix, from userid 20848) id 10B5E806E; Wed, 13 Jan 2010 13:57:35 -0500 (EST) From: Stefan Monnier To: Chong Yidong Subject: Re: bug#5365: 23.1.91; Wrong type argument: keymapp, ("DEAD" . 35215396) Message-ID: References: <87skab2ww3.fsf@turtle.gmx.de> <87ockyqq2c.fsf@turtle.gmx.de> <87aawigcam.fsf@stupidchicken.com> <87pr5d7w4m.fsf@stupidchicken.com> Date: Wed, 13 Jan 2010 13:57:35 -0500 In-Reply-To: <87pr5d7w4m.fsf@stupidchicken.com> (Chong Yidong's message of "Wed, 13 Jan 2010 12:27:53 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 5365 Cc: Sven Joachim , 5365@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) >> Even if that's the case, I'm not sure why Vlocal_function_key_map is >> getting garbage-collected, tho. > OK, I see one place where this could happen. In xterm.c:10207: terminal-> kboard = (KBOARD *) xmalloc (sizeof (KBOARD)); > ... > if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound)) > { > char *vendor = ServerVendor (dpy); > /* Temporarily hide the partially initialized terminal */ > terminal_list = terminal->next_terminal; > UNBLOCK_INPUT; terminal-> kboard->Vsystem_key_alist > = call1 (Qvendor_specific_keysyms, > vendor ? build_string (vendor) : empty_unibyte_string); > BLOCK_INPUT; > ... > } Indeed, that looks risky. Why don't we add this new kboard to the all_kboards list before calling Qvendor_specific_keysyms? Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 13 14:13:59 2010 Received: (at 5365) by debbugs.gnu.org; 13 Jan 2010 19:14:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NV8fH-0007cB-7G for submit@debbugs.gnu.org; Wed, 13 Jan 2010 14:13:59 -0500 Received: from mail.gmx.net ([213.165.64.20]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1NV8f2-0007bc-Ir for 5365@debbugs.gnu.org; Wed, 13 Jan 2010 14:13:57 -0500 Received: (qmail invoked by alias); 13 Jan 2010 19:13:38 -0000 Received: from p548646C5.dip.t-dialin.net (EHLO turtle.gmx.de) [84.134.70.197] by mail.gmx.net (mp068) with SMTP; 13 Jan 2010 20:13:38 +0100 X-Authenticated: #28250155 X-Provags-ID: V01U2FsdGVkX18ziF1GKXwzoDw8xXIxzgj1x2sFdlM2TfJuDLDX8p Cc1ipDkXdic0AF Received: by turtle.gmx.de (Postfix, from userid 1000) id 826AB35545; Wed, 13 Jan 2010 20:13:36 +0100 (CET) From: Sven Joachim To: Chong Yidong Subject: Re: bug#5365: 23.1.91; Wrong type argument: keymapp, ("DEAD" . 35215396) References: <87skab2ww3.fsf@turtle.gmx.de> <87ockyqq2c.fsf@turtle.gmx.de> <87aawigcam.fsf@stupidchicken.com> <87pr5d7w4m.fsf@stupidchicken.com> Date: Wed, 13 Jan 2010 20:13:36 +0100 In-Reply-To: <87pr5d7w4m.fsf@stupidchicken.com> (Chong Yidong's message of "Wed, 13 Jan 2010 12:27:53 -0500") Message-ID: <87ska9q0m7.fsf@turtle.gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.52 X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 5365 Cc: Stefan Monnier , 5365@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) On 2010-01-13 18:27 +0100, Chong Yidong wrote: > Chong Yidong writes: > >> Even if that's the case, I'm not sure why Vlocal_function_key_map is >> getting garbage-collected, tho. > > OK, I see one place where this could happen. In xterm.c:10207: > > terminal->kboard = (KBOARD *) xmalloc (sizeof (KBOARD)); > ... > if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound)) > { > char *vendor = ServerVendor (dpy); > /* Temporarily hide the partially initialized terminal */ > terminal_list = terminal->next_terminal; > UNBLOCK_INPUT; > terminal->kboard->Vsystem_key_alist > = call1 (Qvendor_specific_keysyms, > vendor ? build_string (vendor) : empty_unibyte_string); > BLOCK_INPUT; > ... > } > > terminal->kboard->next_kboard = all_kboards; > all_kboards = terminal->kboard; > > It's possible that garbage-collection occurs during the call1, when the > keyboard has not yet been put on the all_kboards linked list. In that > case, it will not be protected from garbage collection. > > Sven, does the following patch fix the bug? Apparently, at least I can no longer reproduce the bug. Sven From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 13 15:53:49 2010 Received: (at 5365) by debbugs.gnu.org; 13 Jan 2010 20:53:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NVADq-0000ib-UJ for submit@debbugs.gnu.org; Wed, 13 Jan 2010 15:53:49 -0500 Received: from pantheon-po39.its.yale.edu ([130.132.50.100]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NVADo-0000iS-P2 for 5365@debbugs.gnu.org; Wed, 13 Jan 2010 15:53:45 -0500 Received: from furry (dhcp128036014123.central.yale.edu [128.36.14.123]) (authenticated bits=0) by pantheon-po39.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o0DKrew2017018 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 13 Jan 2010 15:53:40 -0500 Received: by furry (Postfix, from userid 1000) id 6F26CC05D; Wed, 13 Jan 2010 13:53:40 -0700 (MST) From: Chong Yidong To: Stefan Monnier Subject: Re: bug#5365: 23.1.91; Wrong type argument: keymapp, ("DEAD" . 35215396) References: <87skab2ww3.fsf@turtle.gmx.de> <87ockyqq2c.fsf@turtle.gmx.de> <87aawigcam.fsf@stupidchicken.com> <87pr5d7w4m.fsf@stupidchicken.com> Date: Wed, 13 Jan 2010 15:53:40 -0500 In-Reply-To: (Stefan Monnier's message of "Wed, 13 Jan 2010 13:57:35 -0500") Message-ID: <87pr5d9163.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 5365 Cc: Sven Joachim , 5365@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) Stefan Monnier writes: >>> Even if that's the case, I'm not sure why Vlocal_function_key_map is >>> getting garbage-collected, tho. > >> OK, I see one place where this could happen. In xterm.c:10207: > > terminal-> kboard = (KBOARD *) xmalloc (sizeof (KBOARD)); >> ... >> if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound)) >> { >> char *vendor = ServerVendor (dpy); >> /* Temporarily hide the partially initialized terminal */ >> terminal_list = terminal->next_terminal; >> UNBLOCK_INPUT; > terminal-> kboard->Vsystem_key_alist >> = call1 (Qvendor_specific_keysyms, >> vendor ? build_string (vendor) : empty_unibyte_string); >> BLOCK_INPUT; >> ... >> } > > Indeed, that looks risky. Why don't we add this new kboard to the > all_kboards list before calling Qvendor_specific_keysyms? We'd still have to protect the terminal object. I've checked in a fix that uses inhibit_garbage_collection, but if you'd like to replace this with a more elegant fix, go ahead. Since it appears to fix the problem (as far as Sven can tell), I'll close this bug. I'll forward the patch to the Debian bts too. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 13 15:54:07 2010 Received: (at control) by debbugs.gnu.org; 13 Jan 2010 20:54:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NVAEA-0000jO-TR for submit@debbugs.gnu.org; Wed, 13 Jan 2010 15:54:07 -0500 Received: from pantheon-po19.its.yale.edu ([130.132.50.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NVAE8-0000ip-AA for control@debbugs.gnu.org; Wed, 13 Jan 2010 15:54:04 -0500 Received: from furry (dhcp128036014123.central.yale.edu [128.36.14.123]) (authenticated bits=0) by pantheon-po19.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o0DKs0Lx007872 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 13 Jan 2010 15:54:00 -0500 Received: by furry (Postfix, from userid 1000) id 3909DC05D; Wed, 13 Jan 2010 13:54:00 -0700 (MST) From: Chong Yidong To: control@debbugs.gnu.org Subject: close 5365 Date: Wed, 13 Jan 2010 15:54:00 -0500 Message-ID: <87ljg1915j.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.1 (----) close 5365 thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 13 23:21:08 2010 Received: (at 5365) by debbugs.gnu.org; 14 Jan 2010 04:21:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NVHCl-0007ch-Ja for submit@debbugs.gnu.org; Wed, 13 Jan 2010 23:21:07 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NVHCj-0007cH-3f for 5365@debbugs.gnu.org; Wed, 13 Jan 2010 23:21:05 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At4EAPIqTktFxLLV/2dsb2JhbACBRdZIhDAEijM X-IronPort-AV: E=Sophos;i="4.49,272,1262581200"; d="scan'208";a="53720051" Received: from 69-196-178-213.dsl.teksavvy.com (HELO pastel.home) ([69.196.178.213]) by ironport2-out.pppoe.ca with ESMTP; 13 Jan 2010 23:21:01 -0500 Received: by pastel.home (Postfix, from userid 20848) id 99933806E; Wed, 13 Jan 2010 23:21:00 -0500 (EST) From: Stefan Monnier To: Chong Yidong Subject: Re: bug#5365: 23.1.91; Wrong type argument: keymapp, ("DEAD" . 35215396) Message-ID: References: <87skab2ww3.fsf@turtle.gmx.de> <87ockyqq2c.fsf@turtle.gmx.de> <87aawigcam.fsf@stupidchicken.com> <87pr5d7w4m.fsf@stupidchicken.com> <87pr5d9163.fsf@stupidchicken.com> Date: Wed, 13 Jan 2010 23:21:00 -0500 In-Reply-To: <87pr5d9163.fsf@stupidchicken.com> (Chong Yidong's message of "Wed, 13 Jan 2010 15:53:40 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: 5365 Cc: Sven Joachim , 5365@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.7 (-) >> Indeed, that looks risky. Why don't we add this new kboard to the >> all_kboards list before calling Qvendor_specific_keysyms? > We'd still have to protect the terminal object. Why? It's a normal Lisp object, so it should be protected by the usual GCPRO or stack marking, no? [ Oddly enough, mark_terminal doesn't traverse the terminal's kboard. ] As for my original question: can anyone think of a reason not to place the new kboard in all_kboards earlier? Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 15 11:27:12 2010 Received: (at 5365) by debbugs.gnu.org; 15 Jan 2010 16:27:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NVp0x-0003Vx-RI for submit@debbugs.gnu.org; Fri, 15 Jan 2010 11:27:12 -0500 Received: from pantheon-po43.its.yale.edu ([130.132.50.104]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NVp0w-0003Vr-0U for 5365@debbugs.gnu.org; Fri, 15 Jan 2010 11:27:10 -0500 Received: from furry (dhcp128036014123.central.yale.edu [128.36.14.123]) (authenticated bits=0) by pantheon-po43.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o0FGR5IJ010576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 15 Jan 2010 11:27:05 -0500 Received: by furry (Postfix, from userid 1000) id 131D6C05D; Fri, 15 Jan 2010 09:27:05 -0700 (MST) From: Chong Yidong To: Stefan Monnier Subject: Re: bug#5365: 23.1.91; Wrong type argument: keymapp, ("DEAD" . 35215396) References: <87skab2ww3.fsf@turtle.gmx.de> <87ockyqq2c.fsf@turtle.gmx.de> <87aawigcam.fsf@stupidchicken.com> <87pr5d7w4m.fsf@stupidchicken.com> <87pr5d9163.fsf@stupidchicken.com> Date: Fri, 15 Jan 2010 11:27:05 -0500 In-Reply-To: (Stefan Monnier's message of "Wed, 13 Jan 2010 23:21:00 -0500") Message-ID: <873a27z63q.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 5365 Cc: Sven Joachim , 5365@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) Stefan Monnier writes: >>> Indeed, that looks risky. Why don't we add this new kboard to the >>> all_kboards list before calling Qvendor_specific_keysyms? >> We'd still have to protect the terminal object. > > Why? It's a normal Lisp object, so it should be protected by the usual > GCPRO or stack marking, no? > [ Oddly enough, mark_terminal doesn't traverse the terminal's kboard. ] But the terminal object is removed from the terminal list before the call1 (this was before my latest patch): if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound)) { char *vendor = ServerVendor (dpy); terminal_list = terminal->next_terminal; UNBLOCK_INPUT; terminal->kboard->Vsystem_key_alist = call1 (Qvendor_specific_keysyms, vendor ? build_string (vendor) : empty_unibyte_string); ... This means that mark_terminal won't be able to reach the newly-allocated terminal object, so its contents could get gc'ed. I haven't checked that there is anything in the terminal object that is actually in danger of being gc'ed, but given some could hypothetically be added in the future, it seems better to pre-emptively turn off gc during this function call. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 15 12:53:02 2010 Received: (at 5365) by debbugs.gnu.org; 15 Jan 2010 17:53:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NVqM1-0006gh-TH for submit@debbugs.gnu.org; Fri, 15 Jan 2010 12:53:02 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NVqLz-0006gS-Ce for 5365@debbugs.gnu.org; Fri, 15 Jan 2010 12:52:59 -0500 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o0FHqmve019519; Fri, 15 Jan 2010 12:52:48 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 75EB43A0C7; Fri, 15 Jan 2010 12:52:48 -0500 (EST) From: Stefan Monnier To: Chong Yidong Subject: Re: bug#5365: 23.1.91; Wrong type argument: keymapp, ("DEAD" . 35215396) Message-ID: References: <87skab2ww3.fsf@turtle.gmx.de> <87ockyqq2c.fsf@turtle.gmx.de> <87aawigcam.fsf@stupidchicken.com> <87pr5d7w4m.fsf@stupidchicken.com> <87pr5d9163.fsf@stupidchicken.com> <873a27z63q.fsf@stupidchicken.com> Date: Fri, 15 Jan 2010 12:52:48 -0500 In-Reply-To: <873a27z63q.fsf@stupidchicken.com> (Chong Yidong's message of "Fri, 15 Jan 2010 11:27:05 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3449=0 X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 5365 Cc: Sven Joachim , 5365@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.5 (-) >>>> Indeed, that looks risky. Why don't we add this new kboard to the >>>> all_kboards list before calling Qvendor_specific_keysyms? >>> We'd still have to protect the terminal object. >> >> Why? It's a normal Lisp object, so it should be protected by the usual >> GCPRO or stack marking, no? >> [ Oddly enough, mark_terminal doesn't traverse the terminal's kboard. ] > But the terminal object is removed from the terminal list before the > call1 (this was before my latest patch): But that's OK because the `terminal' variable is still on the stack so the stack marking should see it and mark the corresponding terminal, like any other Lisp object. We should add a corresponding GCPRO, to make sure it also works without conservative stack marking. Stefan From unknown Fri Aug 15 18:12:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 13 Feb 2010 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 31 14:00:58 2010 Received: (at control) by debbugs.gnu.org; 31 Mar 2010 18:00:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nx2Dq-0008Gy-OB for submit@debbugs.gnu.org; Wed, 31 Mar 2010 14:00:58 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nx2Dp-0008Gs-12 for control@debbugs.gnu.org; Wed, 31 Mar 2010 14:00:57 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1Nx2Dj-0000uY-FD; Wed, 31 Mar 2010 14:00:51 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19379.36307.342420.168332@fencepost.gnu.org> Date: Wed, 31 Mar 2010 14:00:51 -0400 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: cyan X-Ran: |xb+Qi!x3@qp^&UV8ipxV]x}wjI#jV~r]2Qrm_)s{j List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.1 (-----) merge 5797 5799 severity 5808 minor reassign 5811 emacs,ns unarchive 5365 forcemerge 5365 5810 From unknown Fri Aug 15 18:12:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 29 Apr 2010 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator