Subject: X server crashes - need help to diagnose
To: None <tech-x11@NetBSD.org>
From: Martin Husemann <martin@duskware.de>
List: tech-x11
Date: 06/07/2004 08:24:38
Folks, 

I'm starting to get a bit desperate. X stopped working on one of my machines
(works fine on others). Since it happened after a kernel and userland update,
but no X changes, I innitially filed a PR as kern/25758. The machine is a SMP
machine and I suspected signal delivery to be the problem. But it does not
look like that now. So this should probably be moved to some other category,
once the problem is analyzed.

This machine uses the tdfx driver. While trying to debug the problem, I
tried all of X build from xsrc as well as from src/x11. Both show the
same problem.

A static server (which would be debuggable) does not show the problem.

As soon as I do anything serious on the X server or a core from it, gdb
dumps core.

From the bits of printf debugging I did, it looks like:

 - wsconsPreInit gets called with a InputInfoPtr that has "private" point
     to a proper MouseDevPtr record, which has "buffer" set to NULL
 - something (tm) calls XisbNew() to allocate a buffer, the return value
     from XisbNew() is a proper pointer. I have been unable to identify
     the caller - all possible suspects from "gid XisbNew" either are not
     hit (according to some printfs) or do look very unlikely to me.
 - wsconsReadInput is called on first mouse movement. It is passed a 
     InputInfoPtr whose "private" is the same as in wsconsPreInit
     (no surprise here), but the MouseDevPtr's "buffer" has been changed
     to 0x10 - not the return value from XisbNew(), as I would expect

Now, of course, dereferencing 0x10 as a pointer imediately kills the server.

I'm lost. Any help apreciated!

Martin