Subject: Re: XFree86 Crash in current/amd64
To: Gary Duzan <gary@duzan.org>
From: Andrew Doran <ad@netbsd.org>
List: current-users
Date: 10/10/2007 13:26:22
Hi Gary,

On Mon, Oct 08, 2007 at 10:36:06PM -0400, Gary Duzan wrote:

>    Since around this weekend, my XFree86 server won't start, dying
> fairly early with a seg fault/core. Here is a gdb run against a
> DBG="-g -fno-inline" binary:
> 
> ===========================================================================
> capo { /usr/src/x11/Xserver } # gdb --args Xserver/XFree86/obj.amd64/XFree86 vt05 -nolisten tcp
> GNU gdb 6.5
> Copyright (C) 2006 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or 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.
> This GDB was configured as "x86_64--netbsd"...
> (gdb) run
> Starting program: /usr/obj/x11/Xserver/Xserver/XFree86.amd64/XFree86 vt05 -nolisten tcp
> 
> XFree86 Version 4.5.0
> Release Date: 16 March 2005
> X Protocol Version 11, Revision 0
> Build Operating System:NetBSD/amd64 4.99.32 - The NetBSD Foundation, Inc.
> Current Operating System: NetBSD capo 4.99.32 NetBSD 4.99.32 (CAPO64) #4: Mon Oct  8 18:56:32 EDT 2007  root@capo:/usr/obj/sys/arch/amd64/compile.amd64/CAPO64 amd64
> Build Date: 8 October 2007
>         Before reporting problems, check http://www.XFree86.Org/
>         to make sure that you have the latest version.
> Module Loader present
> Command line: /usr/obj/x11/Xserver/Xserver/XFree86.amd64/XFree86 vt05 -nolisten tcp
> Markers: (--) probed, (**) from config file, (==) default setting,
>         (++) from command line, (!!) notice, (EE) error, (WW) warning,
>         (II) informational, (NI) not implemented, (??) unknown.
> (==) Log file: "/var/log/XFree86.0.log", Time: Mon Oct  8 22:32:47 2007
> (==) Using config file: "/etc/X11/XF86Config".
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007f8000495aef in ?? ()
> (gdb) where
> #0  0x00007f8000495aef in ?? ()
> #1  0x00007f7ffcb05f55 in ?? ()
> #2  0x00007f7fffffe550 in ?? ()
> #3  0x000000000048c300 in LoadModule (module=0x7f7ffcb0b938 "bitmap",
>     path=0x0, subdirlist=0x0, patternlist=0x0, options=0x0, modreq=0x0,
>     errmaj=0x7f7fffffe59c, errmin=0x7f7fffffe598)
>     at /usr/xsrc/xfree/xc/programs/Xserver/hw/xfree86/loader/loadmod.c:1043
> #4  0x0000000000432a61 in xf86LoadModules (list=0x7f7ffcb3a330, optlist=0x0)
>     at /usr/xsrc/xfree/xc/programs/Xserver/hw/xfree86/common/xf86Init.c:2186
> #5  0x000000000042e7e1 in InitOutput (pScreenInfo=0x7a6620, argc=4,
>     argv=0x7f7fffffe778)
>     at /usr/xsrc/xfree/xc/programs/Xserver/hw/xfree86/common/xf86Init.c:550
> #6  0x00000000004bbb3a in main (argc=4, argv=0x7f7fffffe778,
>     envp=0x7f7fffffe7a0) at /usr/xsrc/xfree/xc/programs/Xserver/dix/main.c:355
> (gdb) frame 3
> #3  0x000000000048c300 in LoadModule (module=0x7f7ffcb0b938 "bitmap",
>     path=0x0, subdirlist=0x0, patternlist=0x0, options=0x0, modreq=0x0,
>     errmaj=0x7f7fffffe59c, errmin=0x7f7fffffe598)
>     at /usr/xsrc/xfree/xc/programs/Xserver/hw/xfree86/loader/loadmod.c:1043
> 1043            ret->TearDownData = ret->SetupProc(ret, options, errmaj, errmin);
> (gdb) print *ret
> $1 = {child = 0x0, sib = 0x0, parent = 0x0, demand_next = 0x0,
>   name = 0x7f7ffcb0b978 "bitmap",
>   filename = 0x7f7ffcb6e910 "/usr/X11R6/lib/modules/fonts/libbitmap.a",
>   identifier = 0x0, client_id = 0, in_use = 0, handle = 2,
>   SetupProc = 0x7f7ffcb05f40, TearDownProc = 0, TearDownData = 0x0,
>   path = 0x0, VersionInfo = 0x7f7ffcb71220}
> (gdb)
> ===========================================================================
> 
>    It was fine with a new kernel, but the new userland seems to
> have broken it. Fallout from the new malloc, perhaps?

Thanks for all the info. I think it's likely this is due to the allocator
changing. I'll see if I can reproduce it.

Andrew