Subject: Bug#3807: xboard dumps core at once

From: Rickard Westman <[email-masked]>
Date: Tue, 16 Jul 1996 19:24:42 +0200

Package: xboard
Version: 3.4.pl1-1

The symptom
===========
> xboard -ncp
Segmentation fault

> xboard
Segmentation fault

> xboard --help
Usage: xboard
        -timeControl (or -tc) minutes[:seconds]
        -movesPerSession (or -mps) number
        -timeIncrement (or -inc) seconds
        -clockMode (True | False), or -[x]clock
        -searchTime (or -st) minutes[:seconds]
        -searchDepth (or -sd) number
        -matchMode (True | False), or -[x]mm
        -internetChessServerMode (True | False), or -[x]ics
        -internetChessServerHost (or -icshost) host_name
        -loadGameFile (or -lgf) file_name
        -loadGameIndex (or -lgi) number
        -boardSize (or -size) (Large | Medium | Small | Tiny)
        -noChessProgram (True | False), or -[x]ncp
        -debugMode (True | False), or -[x]debug
See the man page for more options and information

Some extra digging
==================
> ls -l `which xboard`
-rwxr-xr-x   1 root     root       200172 May 30 19:58 /usr/games/xboard*

> sum `which xboard`
29772   196

> gdb xboard
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.15.1 (i486-linux), Copyright 1995 Free Software Foundation, Inc...
(no debugging symbols found)...
(gdb) run
Starting program: /usr/games/xboard 
warning: shared library handler failed to enable breakpoint

Program received signal SIGSEGV, Segmentation fault.
0x4007966b in __ctype_tolower ()
(gdb) where
#0  0x4007966b in __ctype_tolower ()
#1  0x0 in ?? ()
(gdb) The program is running.  Quit anyway (and kill it)? (y or n) y

> strace -f xboard |& tail -20
read(4, "", 4096)                       = 0
close(4)                                = 0
open("/usr/X11R6/lib/X11/locale/locale.dir", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=2019, ...}) = 0
read(4, "#\t$XConsortium: locale.dir,v 1."..., 4096) = 2019
lseek(4, -1796, SEEK_CUR)               = 223
close(4)                                = 0
access("/usr/X11R6/lib/X11/locale/C/XLC_LOCALE", R_OK) = 0
open("/usr/X11R6/lib/X11/locale/C/XLC_LOCALE", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=503, ...}) = 0
read(4, "#  $XConsortium: C,v 1.4 94/03/2"..., 4096) = 503
brk(0x8086000)                          = 0x8086000
read(4, "", 4096)                       = 0
close(4)                                = 0
access("/home/ricwe/XBoard", R_OK)      = -1 ERRNO_2 (No such file or directory)
access("/usr/X11R6/lib/X11/app-defaults/XBoard", R_OK) = -1 ERRNO_2 (No such file or directory)
readv(0x3, 0xbffffae0, 0x3)             = 52
read(3, "\1v\5\0\0\0\0\0\0\0\0\0x\373\377"..., 32) = 32
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

The configuration
=================
A fairly small installation of Debian Linux 1.1, so there may be
some hidden dependencies, which aren't checked by the package
mechanism.

> dpkg -s xboard
Package: xboard
Status: install ok installed
Priority: optional
Section: games
Maintainer: Brian Mays <[email-masked]>
Version: 3.4.pl1-1
Depends: X11R6, libc5
Description: An X Window System Chess Board.
 XBoard is a graphical chessboard that can serve as a user interface
 for GNU Chess, for the Internet Chess Server, or for electronic mail
 correspondence chess.  XBoard can also be used by itself.

> uname -a
Linux orec 2.0.0 #8 Tue Jun 11 09:53:39 PDT 1996 i486

> env
LOGNAME=ricwe
MAIL=/var/spool/mail/ricwe
MACHTYPE=i386
PAGER=less
TERM=xterm
HOSTTYPE=i486-linux
PATH=/usr/games:/home/ricwe/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11
HOME=/home/ricwe
SHELL=/usr/bin/tcsh
USER=ricwe
VENDOR=unknown
GROUP=ricwe
HOSTDISPLAY=orec:0.0
DISPLAY=:0.0
HOST=orec
OSTYPE=linux
PWD=/home/ricwe
_=/usr/bin/X11/fvwm
SHLVL=1
WINDOWID=29360141
TERMCAP=co#80:li#45:

> dpkg -l
Desired=Unknown/Install/Remove/Purge
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name            Version        Description
+++-===============-==============-============================================
hi  adduser         1.99-1         Utilities to add users and groups to the sys
hi  ae              962-7          Anthony's Editor -- a tiny full-screen edito
ii  autoconf        2.10-3         automatic configure script builder.
hi  base            1.1.0-13       Debian Base System Miscellaneous Files
hi  bash            1.14.6-4       The GNU Bourne-Again SHell.
ii  bc              1.03-10        An arbitrary precision calculator language.
hi  bdflush         1.5-3          bdflush (update)
rc  bind            4.9.3-P1-3     An Internet domain name server.
ii  binutils        2.6-2          The GNU assembler and binary utilities (ELF 
hi  bsdutils        3.0-2          Basic utilities from 4.4BSD-Lite.
hi  debianutils     1.2-3          Miscellaneous utilities specific to Debian.
hi  dialog          0.9a-2         cdialog - a utility for adding dialog boxes 
hi  diff            2.7-10         File comparison utilities
ii  doc-debian      1.0-2          Debian Manual, FAQ and other documents
ii  doc-linux       96.06-0        Linux FAQ, HOWTOs and mini-HOWTOs.
ii  dpkg            1.2.11elf      Package maintenance system for Debian Linux
ii  dpkg-ftp        1.4.2          Ftp method for dpkg
hi  e2fsprogs       1.02-1         The EXT2 file system utilities.
ii  emacs           19.31-2        The GNU Emacs editor.
hi  fdflush         1.0.0-2        A band-aid for floppy drives with bad disk-c
hi  fileutils       3.12-4         The GNU file management utilities.
hi  findutils       4.1-11         GNU find, xargs and locate.
ii  flex            2.5.2-6        A fast lexical analyzer generator.
ii  fvwm            1.24r-24       F(?) Virtual Window Manager.
ii  fvwm2           2.0.42-BETA-0  F(?) Virtual Window Manager, version 2.
hi  gawk            3.0.0-2        GNU awk, a pattern scanning and processing l
ii  gcc             2.7.2-8        The GNU C compiler (ELF version).
ii  gdb             4.15.1-1       The GNU debugger (ELF and a.out version).
hi  getty           1.0-5          agetty, an alternative Linux getty.
ii  glibcdoc        0.06-1         GNU C library Info documentation.
ii  gnuchess        4.0.pl75-2     Plays a game of chess, either against the us
ii  gpm             1.06-1         A mouse event server for the Linux console
hi  grep            2.0-5          GNU grep, egrep and fgrep.
ii  groff           1.09-11        GNU RunOFF text-formatting system. 
hi  gzip            1.2.4-10       The GNU compression utility.
hi  hostname        1.9-1          A utility to set/show the hostname or DNS do
iU  iamerican       3.1.18-3       An American English dictionary for ispell.
hi  kbd             0.91-2         Linux console font and keytable utilities.
ii  kermit          190-7          C-Kermit communications software for unix
ii  kernel-headers- 2.0.0-0        Linux kernel headers.
ii  kernel-source-2 2.0.0-0        Linux kernel source.
hi  ldso            1.7.14-4       The Linux dynamic linker, library and utilit
ii  less            290-8          A file pager program, similar to more(1)
ii  libc4           4.6.27-15      The Linux C library version 4 (run-time libr
hi  libc5           5.2.18-9       The Linux C library version 5 (run-time libr
ii  libc5-dev       5.2.18-9       The Linux C library version 5 (development f
hi  libdb1          1.85.2-8       the Berkeley database routines (runtime vers
ii  libdb1-dev      1.85.2-8       the Berkeley database routines (development 
hi  libgdbm1        1.7.3-11       GNU dbm database routines (runtime version).
hi  libreadline2    2.0-15         GNU readline and history libraries, runtime 
hi  lilo            17-2           LInux LOader - Loads Linux from the hard dis
hi  login           1.0-5          sign on to the system
ii  m4              1.4-2          GNU m4 - a macro processing language
ii  make            3.74-12        GNU Make.
ii  man             2.3.10-11      Display the on-line manual.
ii  manpages        1.11-4         Section 2, 3, 4, 5, 7, and 9 manpages
hi  mbr             1.0.0-2        Master Boot Record for IBM-PC compatible com
hi  modconf         0.1.0-4        Module configuration program.
hi  modules         1.3.69k-3      Linux module utilities.
hi  mount           2.5j-1         Tools for mounting and manipulating filesyst
hi  ncurses-base    1.9.9e-1       Video terminal manipulation: Minimum set of 
hi  ncurses-bin     1.9.9e-1       Video terminal manipulation: associated prog
hi  ncurses3.0      1.9.9e-1       Video terminal manipulation: shared librarie
ii  netbase         2.04-1         Basic TCP/IP networking binaries
iU  netscape        3.0-beta4-1    Popular World-Wide-Web browser software
ii  netstd          2.05-1         Networking binaries and daemons for Linux
hi  passwd          1.0-5          Change password data.
ii  patch           2.1-9          Apply a diff file to an original
ii  perl            5.003-2        Larry Wall's Practical Extracting and Report
iU  perl-suid       5.002-10       Runs setuid perl scripts.
ii  ppp             2.2.0f-2       Point-to-Point Protocol (PPP) daemon.
hi  procps          0.99-3         The /proc file system utilities.
ii  rcs             5.7-2          The GNU Revision Control System
hi  sed             2.05-6         The GNU sed stream editor.
hi  setserial       2.10-8         Configures serial ports.
hi  shellutils      1.12-5         The GNU shell programming utilities.
ii  strace          3.0-5          A system call tracer
hi  sysklogd        1.3-6          Kernel and system logging daemons.
hi  syslinux        1.20-0         Boot disk creator.
hi  sysvinit        2.62-1         System-V like init.
hi  tar             1.11.8-5       GNU tar.
ii  tcpdump         3.0.4-1        A powerful tool for network monitoring and d
hi  tcsh            6.06-3         An enhanced version of the Berkeley C shell.
hi  textutils       1.11-4         The GNU text file processing utilities.
hi  timezone        7.48-3         Timezone utilities and data files.
hi  util-linux      2.5-4          Miscellaneous system utilities.
ii  wg15-locale     1-1            collection of locale definition files.
ii  xbase           3.1.2-9        XFree86 3.1.2 base distribution.
ii  xboard          3.4.pl1-1      An X Window System Chess Board.
ii  xcontrib        3.1.2-1        XFree86 3.1.2 contributed clients
ii  xfntbase        3.1.2-4        XFree86 3.1.2 base fonts
ii  xlib            3.1.2-7        XFree86 3.1.2 shared libraries
ii  xpm4.7          3.4g-5         XPM runtime libraries.
iU  xpm4.7-dev      3.4g-5         XPM library developer's files.
ii  xserver-svga    3.1.2-5        XFree86 3.1.2 SVGA server

Untested
========
I haven't tried to rebuild it from source yet.

/RiW