From unknown Thu Aug 14 21:52:48 2025 X-Loop: don@donarmstrong.com Subject: bug#558: 23.0.60; crash on M-x make-frame-on-display Reply-To: Andreas Seltenreich , 558@debbugs.gnu.org Resent-From: Andreas Seltenreich Original-Sender: Andreas Seltenreich Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 14 Jul 2008 08:50:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 558 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12160248746403 (code B ref -1); Mon, 14 Jul 2008 08:50:03 +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-Status: No, score=-7.0 required=4.0 tests=BAYES_00,IMPRONONCABLE_2, MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 14 Jul 2008 08:41:14 +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 m6E8f8fv006394 for ; Mon, 14 Jul 2008 01:41:10 -0700 Received: from mx10.gnu.org ([199.232.76.166]:47044) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KIJbn-0001NE-LT for emacs-pretest-bug@gnu.org; Mon, 14 Jul 2008 04:40:35 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KIJcE-0002bC-1p for emacs-pretest-bug@gnu.org; Mon, 14 Jul 2008 04:41:07 -0400 Received: from smtp1.rz.uni-karlsruhe.de ([129.13.185.217]:36687) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KIJcC-0002aC-JK for emacs-pretest-bug@gnu.org; Mon, 14 Jul 2008 04:41:01 -0400 Received: from rzstud2.stud.uni-karlsruhe.de (rzstud2.stud.uni-karlsruhe.de [193.196.41.42]) by smtp1.rz.uni-karlsruhe.de with esmtps (Exim 4.63 #1) id 1KIJc7-0000zF-N8; Mon, 14 Jul 2008 10:40:55 +0200 Received: from uwi7 by rzstud2.stud.uni-karlsruhe.de with local (Exim 4.63) (envelope-from ) id 1KIJc1-00068I-R1 for emacs-pretest-bug@gnu.org; Mon, 14 Jul 2008 10:40:50 +0200 From: Andreas Seltenreich To: emacs-pretest-bug@gnu.org User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) X-Hashcash: 1:26:080714:emacs-pretest-bug@gnu.org::SXwcwFCQNx72qDAy:000000004HCEs Date: Mon, 14 Jul 2008 10:40:50 +0200 Message-ID: <87d4lg3lkd.fsf@gate450.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Andreas Seltenreich X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) > Please write in English if possible, because the Emacs maintainers > usually do not have translators to read other languages for them. > Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. > Please describe exactly what actions triggered the bug > and the precise symptoms of the bug: 1. compiling emacs from CVS using ./configure --with-x-toolkit=no CFLAGS='-O2 -g -fno-crossjumping' 2. running emacs -Q -nw 3. now there's a 1 in 10 chance M-x make-frame-on-display RET :0 RET will crash emacs with the following symptoms: --8<---------------cut here---------------start------------->8--- Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 47821396663536 (LWP 3159)] 0x00002b7e4864e28e in XPending () from /usr/lib/libX11.so.6 (gdb) bt #0 0x00002b7e4864e28e in XPending () from /usr/lib/libX11.so.6 #1 0x000000000049a33f in XTread_socket (terminal=0xefcb70, expected=1, hold_quit=0x7fff6301e830) at xterm.c:7193 #2 0x00000000004c2f05 in read_avail_input (expected=1) at keyboard.c:7086 #3 0x00000000004c2fea in handle_async_input () at keyboard.c:7313 #4 0x0000000000494a37 in x_term_init (display_name=20626963, xrm_option=0x0, resource_name=0x1c7c2b0 "emacs") at xterm.c:10128 #5 0x000000000049f783 in x_display_info_for_name (name=20626963) at xfns.c:4101 #6 0x00000000004a453d in Fx_create_frame (parms=28664357) at xfns.c:3149 #7 0x000000000052a4c6 in Ffuncall (nargs=, args=) at eval.c:3042 #8 0x000000000055f32b in Fbyte_code (bytestr=, vector=19839377, maxdepth=28) at bytecode.c:678 #9 0x0000000000529f6f in funcall_lambda (fun=7562500, nargs=1, arg_vector=0x7fff6301ec38) at eval.c:3229 #10 0x000000000052a345 in Ffuncall (nargs=, args=) at eval.c:3088 #11 0x000000000055f32b in Fbyte_code (bytestr=, vector=29642081, maxdepth=80) at bytecode.c:678 #12 0x0000000000529f6f in funcall_lambda (fun=8106276, nargs=1, arg_vector=0x7fff6301edc8) at eval.c:3229 #13 0x000000000052a345 in Ffuncall (nargs=, args=) at eval.c:3088 #14 0x000000000055f32b in Fbyte_code (bytestr=, vector=10541745, maxdepth=26) at bytecode.c:678 #15 0x0000000000529f6f in funcall_lambda (fun=8103764, nargs=1, arg_vector=0x7fff6301ef98) at eval.c:3229 #16 0x000000000052a345 in Ffuncall (nargs=, args=) at eval.c:3088 #17 0x0000000000527522 in Fcall_interactively (function=29659713, record_flag=9669105, keys=9736036) at callint.c:857 #18 0x000000000052a4f4 in Ffuncall (nargs=, args=) at eval.c:3048 #19 0x000000000052a734 in call3 (fn=, arg1=, arg2=140734854457392, arg3=140734854457464) at eval.c:2868 #20 0x00000000004c092c in Fexecute_extended_command (prefixarg=9669009) at keyboard.c:10533 #21 0x000000000052a4c6 in Ffuncall (nargs=, args=) at eval.c:3042 #22 0x0000000000527522 in Fcall_interactively (function=9739089, record_flag=9669009, keys=9736036) at callint.c:857 #23 0x000000000052a4f4 in Ffuncall (nargs=, args=) at eval.c:3048 #24 0x000000000052a734 in call3 (fn=, arg1=, arg2=140734854457392, arg3=140734854457464) at eval.c:2868 #25 0x00000000004cd322 in command_loop_1 () at keyboard.c:1910 #26 0x0000000000528d34 in internal_condition_case (bfun=0x4ccf60 , handlers=9756209, hfun=0x4c6ab0 ) at eval.c:1511 #27 0x00000000004c5d9a in command_loop_2 () at keyboard.c:1367 #28 0x0000000000528e37 in internal_catch (tag=, func=0x4c5d80 , arg=9669009) at eval.c:1247 #29 0x00000000004c68f3 in command_loop () at keyboard.c:1346 #30 0x00000000004c6c8c in recursive_edit_1 () at keyboard.c:955 #31 0x00000000004c6df0 in Frecursive_edit () at keyboard.c:1017 #32 0x00000000004bc533 in main (argc=3, argv=0x7fff6301fe38) at emacs.c:1762 Lisp Backtrace: "x-create-frame" (0x6301eaa8) "x-create-frame-with-faces" (0x6301ec38) "make-frame" (0x6301edc8) "make-frame-on-display" (0x6301ef98) "call-interactively" (0x6301f1b8) "execute-extended-command" (0x6301f368) "call-interactively" (0x6301f578) (gdb) up #1 0x000000000049a33f in XTread_socket (terminal=0xefcb70, expected=1, hold_quit=0x7fff6301e830) at xterm.c:7193 (gdb) list 7188 #endif 7189 } 7190 #endif 7191 7192 #ifndef USE_GTK 7193 while (XPending (terminal->display_info.x->display)) 7194 { 7195 int finish; 7196 7197 XNextEvent (terminal->display_info.x->display, &event); (gdb) p terminal->display_info.x->display $1 = (Display *) 0x0 (gdb) up #2 0x00000000004c2f05 in read_avail_input (expected=1) at keyboard.c:7086 (gdb) #3 0x00000000004c2fea in handle_async_input () at keyboard.c:7313 (gdb) #4 0x0000000000494a37 in x_term_init (display_name=20626963, xrm_option=0x0, resource_name=0x1c7c2b0 "emacs") at xterm.c:10128 (gdb) list 10123 init_kboard (terminal->kboard); 10124 terminal->kboard->Vwindow_system = intern ("x"); 10125 if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound)) 10126 { 10127 char *vendor = ServerVendor (dpy); 10128 UNBLOCK_INPUT; 10129 terminal->kboard->Vsystem_key_alist 10130 = call1 (Qvendor_specific_keysyms, 10131 vendor ? build_string (vendor) : empty_unibyte_string); 10132 BLOCK_INPUT; (gdb) p terminal == terminal_list $2 = 1 (gdb) p terminal->display_info.x->display $3 = (Display *) 0x0 (gdb) --8<---------------cut here---------------end--------------->8--- I can no longer trigger any crashes after patching xterm.c like this: --8<---------------cut here---------------start------------->8--- *** xterm.c.~1.1000.~ 2008-07-13 18:20:31.000000000 +0200 --- xterm.c 2008-07-14 05:22:26.000000000 +0200 *************** *** 10125,10135 **** --- 10125,10140 ---- if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound)) { char *vendor = ServerVendor (dpy); + /* temporarily hide the partially initialized terminal */ + xassert(terminal_list == terminal); + terminal_list = terminal->next; UNBLOCK_INPUT; terminal->kboard->Vsystem_key_alist = call1 (Qvendor_specific_keysyms, vendor ? build_string (vendor) : empty_unibyte_string); BLOCK_INPUT; + terminal->next = terminal_list; + terminal_list = terminal; } terminal->kboard->next_kboard = all_kboards; --8<---------------cut here---------------end--------------->8--- Here's a ChangeLog entry in case this fix is actually correct. --8<---------------cut here---------------start------------->8--- 2008-07-14 Andreas Seltenreich * xterm.c (x_term_init) [MULTI_KBOARD]: Hide the partially initialized terminal while unblocking input for call1 of Qvendor_specific_keysyms. --8<---------------cut here---------------end--------------->8--- regards, andreas > In GNU Emacs 23.0.60.6 (x86_64-unknown-linux-gnu) > of 2008-07-14 on tengen > Windowing system distributor `The X.Org Foundation', version 11.0.70101000 > configured using `configure '--with-x-toolkit=no' '--enable-debug'' From unknown Thu Aug 14 21:52:48 2025 X-Loop: don@donarmstrong.com Subject: bug#558: (23.0.60; crash on M-x make-frame-on-display) Reply-To: Andreas Seltenreich , 558@debbugs.gnu.org Resent-From: Andreas Seltenreich Original-Sender: Andreas Seltenreich Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 14 Jul 2008 17:40:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 558 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 558-submit@emacsbugs.donarmstrong.com id=B558.12160568598334 (code B ref 558); Mon, 14 Jul 2008 17:40: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-Status: No, score=-7.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 558) by emacsbugs.donarmstrong.com; 14 Jul 2008 17:34:19 +0000 Received: from smtp1.rz.uni-karlsruhe.de (Debian-exim@smtp1.rz.uni-karlsruhe.de [129.13.185.217]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m6EHYEJG008328 for <558@emacsbugs.donarmstrong.com>; Mon, 14 Jul 2008 10:34:16 -0700 Received: from rzstud2.stud.uni-karlsruhe.de (rzstud2.stud.uni-karlsruhe.de [193.196.41.42]) by smtp1.rz.uni-karlsruhe.de with esmtps (Exim 4.63 #1) id 1KIRwD-0007p1-JM; Mon, 14 Jul 2008 19:34:13 +0200 Received: from uwi7 by rzstud2.stud.uni-karlsruhe.de with local (Exim 4.63) (envelope-from ) id 1KIRwC-0004Bz-TA for 558@emacsbugs.donarmstrong.com; Mon, 14 Jul 2008 19:34:13 +0200 From: Andreas Seltenreich To: 558@debbugs.gnu.org In-Reply-To: (Emacs bug Tracking System's message of "Mon, 14 Jul 2008 01:50:04 -0700") References: <87d4lg3lkd.fsf@gate450.dyndns.org> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) X-Hashcash: 1:26:080714:558@emacsbugs.donarmstrong.com::7Ti52zQE8uMWuead:0001Jrk8 Date: Mon, 14 Jul 2008 19:34:13 +0200 Message-ID: <87bq10v08a.fsf@gate450.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Andreas Seltenreich Emacs bug Tracking System writes: > If you wish to submit further information on this problem, please > send it to 558@emacsbugs.donarmstrong.com, as before. The patch in the initial report is broken. Sorry for the inconvenience. Here's a tested version. --8<---------------cut here---------------start------------->8--- *** xterm.c.~1.1000.~ 2008-07-13 18:20:31.000000000 +0200 --- xterm.c 2008-07-14 19:04:45.000000000 +0200 *************** *** 10125,10135 **** --- 10125,10140 ---- if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound)) { char *vendor = ServerVendor (dpy); + /* temporarily hide the partially initialized terminal */ + xassert(terminal_list == 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->next_terminal = terminal_list; + terminal_list = terminal; } terminal->kboard->next_kboard = all_kboards; --8<---------------cut here---------------end--------------->8--- I also found a way to artificially cause a SIGIO at the right time to trigger the crash more reliably: 1. compiling emacs from CVS using ./configure --with-x-toolkit=no CFLAGS='-O2 -g -fno-crossjumping' 2. running emacs -Q -nw 3. M-x find-function RET vendor-specific-keysyms RET 4. C-u C-M-x 5. crash on M-x make-frame-on-display RET :0 RET regards, andreas From unknown Thu Aug 14 21:52:48 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Andreas Seltenreich Subject: bug#558 closed by Chong Yidong (Re: bug#558: (23.0.60; crash on M-x make-frame-on-display)) Message-ID: References: <877ia3nwpz.fsf@cyd.mit.edu> <87d4lg3lkd.fsf@gate450.dyndns.org> X-Emacs-PR-Message: they-closed 558 X-Emacs-PR-Package: emacs Reply-To: 558@debbugs.gnu.org Content-Type: multipart/mixed; boundary="----------=_1219796104-3546-1" This is a multi-part message in MIME format... ------------=_1219796104-3546-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #558: 23.0.60; crash on M-x make-frame-on-display It has been closed by Chong Yidong . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Chong Yidong by replying to this email. --=20 558: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D558 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1219796104-3546-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From cyd@stupidchicken.com Tue Aug 26 17:09:21 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.1 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 558-done) by emacsbugs.donarmstrong.com; 27 Aug 2008 00:09:21 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7R09If9001801 for <558-done@emacsbugs.donarmstrong.com>; Tue, 26 Aug 2008 17:09:19 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 58FD957E34B; Tue, 26 Aug 2008 20:11:04 -0400 (EDT) To: Andreas Seltenreich Cc: 558-done@debbugs.gnu.org Subject: Re: bug#558: (23.0.60; crash on M-x make-frame-on-display) From: Chong Yidong Date: Tue, 26 Aug 2008 20:11:04 -0400 Message-ID: <877ia3nwpz.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Thanks very much for your patch. I've checked it in. ------------=_1219796104-3546-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From uwi7@rz.uni-karlsruhe.de Mon Jul 14 01:41:14 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=-7.0 required=4.0 tests=BAYES_00,IMPRONONCABLE_2, MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 14 Jul 2008 08:41:14 +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 m6E8f8fv006394 for ; Mon, 14 Jul 2008 01:41:10 -0700 Received: from mx10.gnu.org ([199.232.76.166]:47044) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KIJbn-0001NE-LT for emacs-pretest-bug@gnu.org; Mon, 14 Jul 2008 04:40:35 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KIJcE-0002bC-1p for emacs-pretest-bug@gnu.org; Mon, 14 Jul 2008 04:41:07 -0400 Received: from smtp1.rz.uni-karlsruhe.de ([129.13.185.217]:36687) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KIJcC-0002aC-JK for emacs-pretest-bug@gnu.org; Mon, 14 Jul 2008 04:41:01 -0400 Received: from rzstud2.stud.uni-karlsruhe.de (rzstud2.stud.uni-karlsruhe.de [193.196.41.42]) by smtp1.rz.uni-karlsruhe.de with esmtps (Exim 4.63 #1) id 1KIJc7-0000zF-N8; Mon, 14 Jul 2008 10:40:55 +0200 Received: from uwi7 by rzstud2.stud.uni-karlsruhe.de with local (Exim 4.63) (envelope-from ) id 1KIJc1-00068I-R1 for emacs-pretest-bug@gnu.org; Mon, 14 Jul 2008 10:40:50 +0200 From: Andreas Seltenreich To: emacs-pretest-bug@gnu.org Subject: 23.0.60; crash on M-x make-frame-on-display User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) X-Hashcash: 1:26:080714:emacs-pretest-bug@gnu.org::SXwcwFCQNx72qDAy:000000004HCEs Date: Mon, 14 Jul 2008 10:40:50 +0200 Message-ID: <87d4lg3lkd.fsf@gate450.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Andreas Seltenreich X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) > Please write in English if possible, because the Emacs maintainers > usually do not have translators to read other languages for them. > Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. > Please describe exactly what actions triggered the bug > and the precise symptoms of the bug: 1. compiling emacs from CVS using ./configure --with-x-toolkit=no CFLAGS='-O2 -g -fno-crossjumping' 2. running emacs -Q -nw 3. now there's a 1 in 10 chance M-x make-frame-on-display RET :0 RET will crash emacs with the following symptoms: --8<---------------cut here---------------start------------->8--- Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 47821396663536 (LWP 3159)] 0x00002b7e4864e28e in XPending () from /usr/lib/libX11.so.6 (gdb) bt #0 0x00002b7e4864e28e in XPending () from /usr/lib/libX11.so.6 #1 0x000000000049a33f in XTread_socket (terminal=0xefcb70, expected=1, hold_quit=0x7fff6301e830) at xterm.c:7193 #2 0x00000000004c2f05 in read_avail_input (expected=1) at keyboard.c:7086 #3 0x00000000004c2fea in handle_async_input () at keyboard.c:7313 #4 0x0000000000494a37 in x_term_init (display_name=20626963, xrm_option=0x0, resource_name=0x1c7c2b0 "emacs") at xterm.c:10128 #5 0x000000000049f783 in x_display_info_for_name (name=20626963) at xfns.c:4101 #6 0x00000000004a453d in Fx_create_frame (parms=28664357) at xfns.c:3149 #7 0x000000000052a4c6 in Ffuncall (nargs=, args=) at eval.c:3042 #8 0x000000000055f32b in Fbyte_code (bytestr=, vector=19839377, maxdepth=28) at bytecode.c:678 #9 0x0000000000529f6f in funcall_lambda (fun=7562500, nargs=1, arg_vector=0x7fff6301ec38) at eval.c:3229 #10 0x000000000052a345 in Ffuncall (nargs=, args=) at eval.c:3088 #11 0x000000000055f32b in Fbyte_code (bytestr=, vector=29642081, maxdepth=80) at bytecode.c:678 #12 0x0000000000529f6f in funcall_lambda (fun=8106276, nargs=1, arg_vector=0x7fff6301edc8) at eval.c:3229 #13 0x000000000052a345 in Ffuncall (nargs=, args=) at eval.c:3088 #14 0x000000000055f32b in Fbyte_code (bytestr=, vector=10541745, maxdepth=26) at bytecode.c:678 #15 0x0000000000529f6f in funcall_lambda (fun=8103764, nargs=1, arg_vector=0x7fff6301ef98) at eval.c:3229 #16 0x000000000052a345 in Ffuncall (nargs=, args=) at eval.c:3088 #17 0x0000000000527522 in Fcall_interactively (function=29659713, record_flag=9669105, keys=9736036) at callint.c:857 #18 0x000000000052a4f4 in Ffuncall (nargs=, args=) at eval.c:3048 #19 0x000000000052a734 in call3 (fn=, arg1=, arg2=140734854457392, arg3=140734854457464) at eval.c:2868 #20 0x00000000004c092c in Fexecute_extended_command (prefixarg=9669009) at keyboard.c:10533 #21 0x000000000052a4c6 in Ffuncall (nargs=, args=) at eval.c:3042 #22 0x0000000000527522 in Fcall_interactively (function=9739089, record_flag=9669009, keys=9736036) at callint.c:857 #23 0x000000000052a4f4 in Ffuncall (nargs=, args=) at eval.c:3048 #24 0x000000000052a734 in call3 (fn=, arg1=, arg2=140734854457392, arg3=140734854457464) at eval.c:2868 #25 0x00000000004cd322 in command_loop_1 () at keyboard.c:1910 #26 0x0000000000528d34 in internal_condition_case (bfun=0x4ccf60 , handlers=9756209, hfun=0x4c6ab0 ) at eval.c:1511 #27 0x00000000004c5d9a in command_loop_2 () at keyboard.c:1367 #28 0x0000000000528e37 in internal_catch (tag=, func=0x4c5d80 , arg=9669009) at eval.c:1247 #29 0x00000000004c68f3 in command_loop () at keyboard.c:1346 #30 0x00000000004c6c8c in recursive_edit_1 () at keyboard.c:955 #31 0x00000000004c6df0 in Frecursive_edit () at keyboard.c:1017 #32 0x00000000004bc533 in main (argc=3, argv=0x7fff6301fe38) at emacs.c:1762 Lisp Backtrace: "x-create-frame" (0x6301eaa8) "x-create-frame-with-faces" (0x6301ec38) "make-frame" (0x6301edc8) "make-frame-on-display" (0x6301ef98) "call-interactively" (0x6301f1b8) "execute-extended-command" (0x6301f368) "call-interactively" (0x6301f578) (gdb) up #1 0x000000000049a33f in XTread_socket (terminal=0xefcb70, expected=1, hold_quit=0x7fff6301e830) at xterm.c:7193 (gdb) list 7188 #endif 7189 } 7190 #endif 7191 7192 #ifndef USE_GTK 7193 while (XPending (terminal->display_info.x->display)) 7194 { 7195 int finish; 7196 7197 XNextEvent (terminal->display_info.x->display, &event); (gdb) p terminal->display_info.x->display $1 = (Display *) 0x0 (gdb) up #2 0x00000000004c2f05 in read_avail_input (expected=1) at keyboard.c:7086 (gdb) #3 0x00000000004c2fea in handle_async_input () at keyboard.c:7313 (gdb) #4 0x0000000000494a37 in x_term_init (display_name=20626963, xrm_option=0x0, resource_name=0x1c7c2b0 "emacs") at xterm.c:10128 (gdb) list 10123 init_kboard (terminal->kboard); 10124 terminal->kboard->Vwindow_system = intern ("x"); 10125 if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound)) 10126 { 10127 char *vendor = ServerVendor (dpy); 10128 UNBLOCK_INPUT; 10129 terminal->kboard->Vsystem_key_alist 10130 = call1 (Qvendor_specific_keysyms, 10131 vendor ? build_string (vendor) : empty_unibyte_string); 10132 BLOCK_INPUT; (gdb) p terminal == terminal_list $2 = 1 (gdb) p terminal->display_info.x->display $3 = (Display *) 0x0 (gdb) --8<---------------cut here---------------end--------------->8--- I can no longer trigger any crashes after patching xterm.c like this: --8<---------------cut here---------------start------------->8--- *** xterm.c.~1.1000.~ 2008-07-13 18:20:31.000000000 +0200 --- xterm.c 2008-07-14 05:22:26.000000000 +0200 *************** *** 10125,10135 **** --- 10125,10140 ---- if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound)) { char *vendor = ServerVendor (dpy); + /* temporarily hide the partially initialized terminal */ + xassert(terminal_list == terminal); + terminal_list = terminal->next; UNBLOCK_INPUT; terminal->kboard->Vsystem_key_alist = call1 (Qvendor_specific_keysyms, vendor ? build_string (vendor) : empty_unibyte_string); BLOCK_INPUT; + terminal->next = terminal_list; + terminal_list = terminal; } terminal->kboard->next_kboard = all_kboards; --8<---------------cut here---------------end--------------->8--- Here's a ChangeLog entry in case this fix is actually correct. --8<---------------cut here---------------start------------->8--- 2008-07-14 Andreas Seltenreich * xterm.c (x_term_init) [MULTI_KBOARD]: Hide the partially initialized terminal while unblocking input for call1 of Qvendor_specific_keysyms. --8<---------------cut here---------------end--------------->8--- regards, andreas > In GNU Emacs 23.0.60.6 (x86_64-unknown-linux-gnu) > of 2008-07-14 on tengen > Windowing system distributor `The X.Org Foundation', version 11.0.70101000 > configured using `configure '--with-x-toolkit=no' '--enable-debug'' ------------=_1219796104-3546-1--