[Bug: 21.4.21] ABORT() in Fget_buffer_window()

Glynn Clements glynn at gclements.plus.com
Fri Apr 11 16:52:32 EDT 2008


================================================================
Dear Bug Team!

I can repeatably hit the following ABORT() in window_loop():

	  /* #### Still needed ?? */
	  /* Given the outstanding quality of the rest of this code,
	     I feel no shame about putting this piece of shit in. */
	  if (++lose_lose >= 500)
	    {
	      /* Call to ABORT() added by Darryl Okahata (16 Nov. 2001),
	         at Ben's request, to catch any remaining bugs.

		 If you find that XEmacs is ABORTing here, and you
		 need to be up and running ASAP, it should be safe to
		 comment out the following ABORT(), as long as you
		 leave the "break;" alone.  */
	      ABORT();
	      break;	/* <--- KEEP THIS HERE!  Do not delete!  */
	    }

The following steps cause the abort to occur:

1. Start XEmacs under X
2. M-x make-frame-on-display RET remotehost:0 RET
3. Minimise the original frame with C-z
4. On the remote system, M-x shell

The problem doesn't occur if step 3 is omitted.

However, I can't reproduce this with -vanilla. This appears to be
connected with the fact that my init files set shell-multiple-shells
to t and create two shells (so step 4 creates a third). If I kill
those first, the problem disappears.

BTW, the src/.gdbinit file doesn't work for me; it complains with:

	> pobj which_frames
	No symbol "Lisp_Type_Char" in current context.

Let me know if there are any other tests which might be useful.

Lisp backtrace:

  get-buffer-window(#<buffer "*shell*<3>"> visible)
  # bind (name limit on-frame not-this-window-p buffer)
  get-frame-for-buffer-noselect(#<buffer "*shell*<3>"> nil nil)
  # bind (shrink-to-fit on-frame not-this-window-p buffer)
  get-frame-for-buffer(#<buffer "*shell*<3>"> nil nil nil)
  # bind (window old-frame target-frame explicit-frame shrink-it)
  byte-code("..." [explicit-frame tem car target-frame buffer window nil last-nonminibuf-frame selected-frame get-buffer bufferp wrong-type-argument throw done buffer-dedicated-frame frame-live-p window-buffer selected-window display-buffer-1 buffer-name assoc switch-to-buffer string-match 0 get-buffer-window frame-selected-window set-window-buffer frame-property minibuffer only window-dedicated-p frame-root-window unsplittable get-largest-window visible t window-frame window-height window-width window-leftmost-p window-rightmost-p split-window get-lru-window window-parent window-previous-child window-next-child window-pixel-edges window-pixel-height enlarge-window 2 ((byte-code "Á!«¤Â!¨Á§" ... 2)) select-window record-buffer shrink-window-if-larger-than-buffer override-frame other not-this-window-p special-display-function upper old-frame shrink-it shrink-to-fit dedi split-height-threshold window-min-height split-width-threshold pre-display-buffer-function display-!
 buffer-function same-window-buffer-names pop-up-frames special-display-buffer-names pop-up-frame-function window-min-width same-window-regexps special-display-regexps pop-up-windows ssw34678] 8)
  # (catch done ...)
  # bind (shrink-to-fit override-frame not-this-window-p buffer)
  display-buffer(#<buffer "*shell*<3>"> nil nil)
  # bind (oldbuf buf window frame on-frame not-this-window-p bufname)
  pop-to-buffer(#<buffer "*shell*<3>">)
  # bind (buffer buffer-name)
  (let* ((buffer-name ...) (buffer ...)) (pop-to-buffer buffer) (cond (... ...)) buffer)
  # bind (buffer)
  (lambda (&optional buffer) "Run an inferior shell, with I/O through BUFFER (which defaults to `*shell*').\nInteractively, a prefix arg means to prompt for BUFFER.\nIf BUFFER exists but shell process is not running, make new shell.\nIf BUFFER exists and shell process is running, just switch to BUFFER.\nProgram used comes from variable `explicit-shell-file-name',\n or (if that is nil) from the ESHELL environment variable,\n or else from SHELL if there is no ESHELL,\n or if there is no SHELL then from variable `shell-file-name',\n or, if all of the above are nil, \"/bin/sh\" is used.\nIf a file `~/.emacs_SHELLNAME' exists, it is given as initial input\n (Note that this may lose due to a timing error if the shell\n  discards input when it starts up.)\nThe buffer is put in Shell mode, giving commands for sending input\nand controlling the subjobs of the shell.  See `shell-mode'.\nSee also the variable `shell-prompt-pattern'.\n\nTo specify a coding system for converting non-ASCI!
 I characters\nin the input and output to the shell, use \\[universal-coding-system-argument]\nbefore \\[shell].  You can also specify this with \\[set-buffer-process-coding-system]\nin the shell buffer, after you start the shell.\nThe default comes from `process-coding-system-alist' and\n`default-process-coding-system'.\n\nThe shell file name (sans directories) is used to make a symbol name\nsuch as `explicit-csh-args'.  If that symbol is a variable,\nits value is used as a list of arguments when invoking the shell.\nOtherwise, one argument `-i' is passed to the shell.\n\n(Type \\[describe-mode] in the shell buffer for a list of commands.)" (interactive (list ...)) (let* (... ...) (pop-to-buffer buffer) (cond ...) buffer))(nil)
  call-interactively(shell)
  command-execute(shell t)
  # bind (_execute_command_keys_ _execute_command_name_ prefix-arg)
  execute-extended-command(nil)
  # bind (command-debug-status)
  call-interactively(execute-extended-command)
  # (condition-case ... . error)
  # (catch top-level ...)

gdb backtrace:

#0  0xb79c8d51 in kill () from /lib/libc.so.6
#1  0x080b6ccd in fatal_error_signal (sig=6) at emacs.c:642
#2  <signal handler called>
#3  0xb79c8d51 in kill () from /lib/libc.so.6
#4  0xb79c8af5 in *__GI_raise (sig=6)
    at ../linuxthreads/sysdeps/unix/sysv/linux/raise.c:38
#5  0xb79ca180 in *__GI_abort () at abort.c:88
#6  0x080b722b in assert_failed (file=0x81ecf19 "window.c", line=6, 
    expr=0xb7abdff4 "|í\021") at emacs.c:3426
#7  0x081b3c82 in window_loop (type=GET_BUFFER_WINDOW, obj=153556912, mini=1, 
    which_frames=157681200, dedicated_too=1, which_devices=-1217200040)
    at window.c:2649
#8  0x081b413b in Fget_buffer_window (buffer=-1213472780, which_frames=0, 
    which_devices=0) at window.c:2960
#9  0x080be87f in Ffuncall (nargs=3, args=0x3) at eval.c:3536
#10 0x080984fa in execute_optimized_program (program=0x0, 
    stack_depth=-1213472780, constants_data=0xb77c3fa8) at bytecode.c:748
#11 0x0809a4c5 in funcall_compiled_function (fun=-1216168528, nargs=3, 
    args=0xbfd58f08) at bytecode.c:516
#12 0x080be713 in Ffuncall (nargs=4, args=0xbfd58f04) at eval.c:3572
#13 0x080984fa in execute_optimized_program (program=0x0, 
    stack_depth=-1213472780, constants_data=0xb77c4084) at bytecode.c:748
#14 0x0809a4c5 in funcall_compiled_function (fun=-1216168500, nargs=4, 
    args=0xbfd59068) at bytecode.c:516
#15 0x080be713 in Ffuncall (nargs=5, args=0xbfd59064) at eval.c:3572
#16 0x080984fa in execute_optimized_program (program=0x0, 
    stack_depth=-1213472780, constants_data=0xb77c4330) at bytecode.c:748
#17 0x0809a76b in Fbyte_code (instructions=6, constants=-1216593120, 
    stack_depth=0) at bytecode.c:2407
#18 0x080bde39 in Feval (form=-1216822064) at eval.c:3335
#19 0x080b981f in internal_catch (tag=0, func=0x80bd700 <Feval>, 
    arg=-1216822064, threw=0x0) at eval.c:1318
#20 0x080979f3 in execute_rare_opcode (stack_ptr=0xbfd59c08, 
    program_ptr=0x9319a75 "\031\211\030Â k¬\005Å\b!\210\t*\2079", 
    opcode=Bcatch) at bytecode.c:1254
#21 0x08097df3 in execute_optimized_program (program=0x0, 
    stack_depth=-1213472780, constants_data=0xb77c4474) at bytecode.c:658
#22 0x0809a4c5 in funcall_compiled_function (fun=-1216168164, nargs=3, 
    args=0xbfd59d68) at bytecode.c:516
#23 0x080be713 in Ffuncall (nargs=4, args=0xbfd59d64) at eval.c:3572
#24 0x080984fa in execute_optimized_program (program=0x0, 
    stack_depth=-1213472780, constants_data=0xb77c449c) at bytecode.c:748
#25 0x0809a4c5 in funcall_compiled_function (fun=-1216168136, nargs=1, 
    args=0xbfd59e40) at bytecode.c:516
#26 0x080bdf00 in Feval (form=153532292) at eval.c:3392
#27 0x080be2bb in Fprogn (args=153532316) at eval.c:775
#28 0x080bfb61 in FletX (args=0) at eval.c:875
#29 0x080be00d in Feval (form=153531908) at eval.c:3308
#30 0x080be2bb in Fprogn (args=153531764) at eval.c:775
#31 0x080be471 in funcall_lambda (fun=154051332, nargs=1, args=0xbfd5a28c)
    at eval.c:3863
#32 0x080be6c6 in Ffuncall (nargs=2, args=0xbfd5a288) at eval.c:3580
#33 0x080bf5be in Fapply (nargs=2, args=0xbfd5a288) at eval.c:3754
#34 0x080bf687 in apply1 (fn=154051332, arg=6) at eval.c:4164
#35 0x0809b9e8 in Fcall_interactively (function=-1217338184, 
    record_flag=-1217201696, keys=-1217200040) at callint.c:398
#36 0x080bfdc9 in Fcommand_execute (cmd=-1217338184, record_flag=0, keys=0)
    at eval.c:2974
#37 0x080be87f in Ffuncall (nargs=3, args=0x3) at eval.c:3536
#38 0x080984fa in execute_optimized_program (program=0x0, 
    stack_depth=-1213472780, constants_data=0xb77b58d4) at bytecode.c:748
#39 0x0809a4c5 in funcall_compiled_function (fun=-1216192496, nargs=1, 
    args=0xbfd5a644) at bytecode.c:516
#40 0x080be713 in Ffuncall (nargs=2, args=0xbfd5a640) at eval.c:3572
#41 0x0809bbd9 in Fcall_interactively (function=-1217321912, 
    record_flag=-1217200040, keys=-1217200040) at callint.c:941
#42 0x080bfdc9 in Fcommand_execute (cmd=-1217321912, record_flag=0, keys=0)
    at eval.c:2974
#43 0x080fa661 in execute_command_event (command_builder=0x95ea938, 
    event=146397560) at event-stream.c:3924
#44 0x080fa9fc in Fdispatch_event (event=146397560) at event-stream.c:4258
#45 0x080a21d6 in Fcommand_loop_1 () at cmdloop.c:583
#46 0x080bb9b5 in condition_case_1 (handlers=0, 
    bfun=0x80a2260 <command_loop_1>, barg=-1217200040, 
    hfun=0x80a1b20 <cmd_error>, harg=-1217200040) at eval.c:1652
#47 0x080a1d0c in command_loop_2 (dummy=-1217200040) at cmdloop.c:256
#48 0x080b981f in internal_catch (tag=0, func=0x80a1cd0 <command_loop_2>, 
    arg=-1217200040, threw=0x0) at eval.c:1318
#49 0x080a1e6e in initial_command_loop (load_me=0) at cmdloop.c:305
#50 0x080b877c in xemacs_21_4_21_i686_pc_linux (argc=1, argv=0xbfd5abf4, 
    envp=0xbfd5abfc, restart=0) at emacs.c:2460
#51 0x080b9347 in main (argc=0, argv=0x0, envp=0x0) at emacs.c:2892

================================================================

System Info to help track down your bug:
---------------------------------------

uname -a: Linux cerise 2.6.24.3 #2 SMP Thu Mar 27 10:43:06 GMT 2008 i686 Intel(R) Core(TM)2 Duo CPU E4500 @ 2.20GHz GenuineIntel GNU/Linux

./configure  '--with-widgets=athena' '--with-dialogs=athena' '--with-menubars=lucid' '--with-scrollbars=lucid' '--with-athena=xaw' '--with-tiff' '--with-png' '--with-jpeg' '--with-xface' '--with-mule' '--with-xim=no' '--with-canna' '--without-wnn' '--with-sound=native' '--with-database=gdbm,berkdb' '--with-gif' '--without-gpm' '--without-postgresql' '--without-ldap' '--with-file-coding' '--without-pop' '--prefix=/usr' '--with-ncurses' '--with-msw=no' '--mail-locking=flock' '--with-site-lisp=yes' '--with-site-modules=yes'


XEmacs 21.4.21 "Educational Television" configured for `i686-pc-linux'.


Compilation / Installation:
  Source code location:              /var/tmp/portage/app-editors/xemacs-21.4.21-r1/work/xemacs-21.4.21
  Installation prefix:               /usr
  Operating system description file: `s/linux.h'
  Machine description file:          `m/intel386.h'
  Compiler:                          gcc -g -O2 -mtune=pentium-m -pipe
  Compiler version:                  gcc (GCC) 3.4.6 (Gentoo 3.4.6-r2, ssp-3.4.6-1.0, pie-8.7.10)
  Compiler specs file:               /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/specs
  Relocating allocator for buffers:  no
  GNU version of malloc:             yes
    - Using Doug Lea's new malloc from the GNU C Library.
Need to guess glibc1/2/etc here

Window System:
  Compiling in support for the X window system:
    - X Windows headers location:                 /usr/X11R6/include
    - X Windows libraries location:               /usr/X11R6/lib
    - Handling WM_COMMAND properly.
  Compiling in support for the Athena widget set:
    - Athena headers location:                    X11/Xaw
    - Athena library to link:                     Xaw
  Using Lucid menubars.
  Using Lucid scrollbars.
  Using Athena dialog boxes.
  Using Athena native widgets.

TTY:
  Compiling in support for ncurses.

Images:
  Compiling in support for GIF  images (builtin).
  Compiling in support for XPM  images.
  Compiling in support for PNG  images.
  Compiling in support for JPEG images.
  Compiling in support for TIFF images.
  Compiling in support for X-Face message headers.

Sound:
  Compiling in support for sound (native).

Databases:
  Compiling in support for Berkeley database.
  Compiling in support for GNU DBM.

Internationalization:
  Compiling in support for Mule (multi-lingual Emacs).
  Compiling in support for file coding.
  Compiling in support for Canna on Mule.

Mail:
  Compiling in support for "flock" mail spool file locking method.

Other Features:
  Inhibiting IPv6 canonicalization at startup.
  Compiling in support for dynamic shared object modules.
  Using the new portable dumper.



Load-Path Lisp Shadows:
----------------------
(/home/glynn/src/elisp/snake
/usr/lib/xemacs/xemacs-packages/lisp/games/snake
/home/glynn/src/elisp/igrep
/usr/lib/xemacs/xemacs-packages/lisp/igrep/igrep
/home/glynn/src/elisp/pydoc
/usr/lib/xemacs/xemacs-packages/lisp/python-modes/pydoc
/home/glynn/src/elisp/image-mode
/usr/lib/xemacs/xemacs-packages/lisp/text-modes/image-mode
/home/glynn/src/elisp/shell
/usr/lib/xemacs/xemacs-packages/lisp/xemacs-base/shell
/home/glynn/src/elisp/comint
/usr/lib/xemacs/xemacs-packages/lisp/xemacs-base/comint
/home/glynn/src/elisp/comint-xemacs
/usr/lib/xemacs/xemacs-packages/lisp/xemacs-base/comint-xemacs
/home/glynn/src/elisp/mwheel /usr/lib/xemacs-21.4.21/lisp/mwheel)


Installed XEmacs Packages:
-------------------------
(xemacs-devel ver: 1.75 upstream: No-Upstream-Ver)
(xemacs-base ver: 2.08 upstream: No-Upstream-Ver)
(w3 ver: 1.33 upstream: 4.0pre47)
(vm ver: 7.22 upstream: 7.17)
(view-process ver: 1.13 upstream: 2.4)
(vc ver: 1.41 upstream: No-Upstream-Ver)
(tm ver: 1.38 upstream: No-Upstream-Ver)
(time ver: 1.14 upstream: 1.17)
(text-modes ver: 1.92 upstream: No-Upstream-Ver)
(supercite ver: 1.21 upstream: 3.55x3)
(speedbar ver: 1.28 upstream: 0.14beta4)
(sieve ver: 1.18 upstream: No-Upstream-Ver)
(sh-script ver: 1.21 upstream: 2.0f)
(sasl ver: 1.16 upstream: 1.14.4)
(rmail ver: 1.14 upstream: No-Upstream-Ver)
(python-modes ver: 1.08 upstream: No-Upstream-Ver)
(psgml-dtds ver: 1.03 upstream: No-Upstream-Ver)
(psgml ver: 1.44 upstream: 1.3.1)
(ps-print ver: 1.11 upstream: 6.5.6)
(prog-modes ver: 2.09 upstream: No-Upstream-Ver)
(pgg ver: 1.06 upstream: 0.1)
(pcl-cvs ver: 1.67 upstream: R-2_9_9)
(os-utils ver: 1.39 upstream: No-Upstream-Ver)
(net-utils ver: 1.49 upstream: N/A)
(mh-e ver: 1.29 upstream: 7.4.2)
(mew ver: 1.19 upstream: 1.94.2)
(mailcrypt ver: 2.14 upstream: 3.5.8)
(mail-lib ver: 1.79 upstream: No-Upstream-Ver)
(ispell ver: 1.32 upstream: 3.6)
(ilisp ver: 1.34 upstream: 5.12.0)
(igrep ver: 1.14 upstream: 2.111)
(haskell-mode ver: 1.1 upstream: 2.1)
(gnus ver: 1.91 upstream: 5.10.8)
(games ver: 1.17 upstream: 1.04)
(fsf-compat ver: 1.15 upstream: No-Upstream-Ver)
(eterm ver: 1.17 upstream: No-Upstream-Ver)
(eshell ver: 1.1 upstream: 2.4.1)
(emerge ver: 1.11 upstream: No-Upstream-Ver)
(elib ver: 1.11 upstream: 1.0)
(efs ver: 1.33 upstream: 1.23)
(edit-utils ver: 2.36 upstream: No-Upstream-Ver)
(ediff ver: 1.66 upstream: 2.75)
(edebug ver: 1.22 upstream: No-Upstream-Ver)
(ecrypto ver: 0.2 upstream: 2.0)
(dired ver: 1.17 upstream: 7.13)
(cookie ver: 1.15 upstream: No-Upstream-Ver)
(cc-mode ver: 1.45 upstream: 5.30.10)
(bbdb ver: 1.29 upstream: 2.34)
(apel ver: 1.32 upstream: 10.6)
(mule-ucs ver: 1.14 upstream: 0.84)
(mule-base ver: 1.49 upstream: No-Upstream-Ver)
(latin-euro-standards ver: 1.07 upstream: 1.07)
(edict ver: 1.16 upstream: 0.9.9)



Installed Modules:
-----------------


Features:
--------

(mail-abbrevs xemacsbug shadow hyper-apropos font disp-table efs-cu
env x-compose ansi-color jka-compr mwheel savehist time gnuserv edict
edict-japanese edict-english edict-morphology edict-edit dui-registry
dui popfix cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt man
advice advice-preload edmacro haskell-mode tcl sendmail rfc822
xrdb-mode winmgr-mode term ehelp electric shell comint ring un-define
latin-euro-standards latin-euro-latin10 latin-euro-latin9
latin-euro-latin8 latin-euro-latin7 mule-uni fast-lock font-lock
cus-face xemacs-devel-autoloads xemacs-base-autoloads w3-autoloads
vm-autoloads view-process-autoloads vc-autoloads tm-autoloads
time-autoloads text-modes-autoloads supercite-autoloads
speedbar-autoloads sieve-autoloads sh-script-autoloads sasl-autoloads
rmail-autoloads python-modes-autoloads psgml-dtds-autoloads
psgml-autoloads ps-print-autoloads prog-modes-autoloads pgg-autoloads
pcl-cvs-autoloads os-utils-autoloads net-utils-autoloads
mh-e-autoloads mew-autoloads mailcrypt-autoloads mail-lib-autoloads
ispell-autoloads ilisp-autoloads igrep-autoloads
haskell-mode-autoloads gnus-autoloads games-autoloads
fsf-compat-autoloads eterm-autoloads eshell-autoloads emerge-autoloads
elib-autoloads efs-autoloads edit-utils-autoloads ediff-autoloads
edebug-autoloads ecrypto-autoloads dired-autoloads cookie-autoloads
cc-mode-autoloads bbdb-autoloads apel-autoloads mule-ucs-autoloads
mule-base-autoloads latin-euro-standards-autoloads edict-autoloads
lisp-autoloads loadhist auto-show fontl-hooks x-iso8859-1 canna-leim
slovenian czech romanian ccl mule-help code-cmds gutter-items
menubar-items x-menubar mode-motion mouse itimer auto-save lisp-mode
easymenu iso8859-1 page buff-menu lib-complete cus-file derived frame
text-props obsolete cus-start custom widget cl-extra mini-cl cl cl-19
packages backquote very-early-lisp CANNA file-coding mule
lucid-scrollbars cut-buffer lucid-menubars athena-dialogs x
c-balloon-help tty-frames tty toolbar native-sound scrollbar
unix-processes multicast network-streams subprocesses modules
menu-accelerator-support menubar berkeley-db dbm md5 xemacs gutter
tiff png gif jpeg xface xpm xbm lisp-float-type linux dialog devices
window-system base64)


Recent keystrokes:
-----------------

up up RET C-TAB C-x C-f . x s e s TAB - e TAB RET C-end 
C-x k RET C-home C-end g d b C-up RET w h e r e RET 
C-home C-end C-c C-d C-home C-end M-x s u b TAB M-BS 
x e TAB b u TAB g TAB M-BS M-BS s e n d TAB C-g C-h 
a b u g RET C-s r e p o r t C-s C-s C-s C-s C-s C-s 
C-s C-s C-s C-a down down C-right C-left C-right C-right 
C-left C-SPC M-right M-w C-x k RET M-x C-y RET


Recent messages (most recent first):
-----------------------------------

Quit
Loading xemacsbug...done
Loading xemacsbug...
Loading hyper-apropos...done
Loading font...done
Loading font...
Loading hyper-apropos...
Quit
History item: 3
Loading efs-cu...done
Loading efs-cu...
~/ 
Loading env...done
Loading env...
~/ 
Fontifying *shell*<2>... done.
Loading ansi-color...done
Fontifying *shell*<2>...
Fontifying *scratch*... done.
Loading ansi-color...



More information about the XEmacs-Beta mailing list