Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 May 2010 00:55:35 -0400 (EDT)
From:      Benjamin Kaduk <kaduk@MIT.EDU>
To:        alc@freebsd.org, attilio@freebsd.org, freebsd-current@freebsd.org
Subject:   kgdb unuseable with cores on current (for some people)
Message-ID:  <alpine.GSO.1.10.1005140013260.29136@multics.mit.edu>

next in thread | raw e-mail | index | archive | help
Hi all,

As was revealed in a recent thread here [1], several people have been 
unable to use kgdb on coredumps for the past few months (but possibly not 
everyone).

I am one of those affected, and have narrowed the breakage with a binary 
search to between SVN revisions 202883 and 202954 (that is, Jan 23 1200h 
and Jan 25 0000h).  Looking at the changes, alc's revision 202897 and 
attilio's revision 202933 look to be the most plausible culprits in terms 
of what they touched.  I will continue with my bisection, but with only 36 
revisions in play, it is probably worth looking for the bug in parallel 
with the bisection.

To recall, this manifests itself as kgdb printing the following on 
startup:
Cannot access memory at address 0xffffff0127ffffe0

'bt' seems to think that it is on a NULL stack pointer (and fails), and 
attempting to set a different current process/thread using the 'proc' or 
'thread' commands errors with "invalid [p|t]id".  However, I can walk the 
process list starting from allproc ....

Looking at kgdb/kthr.c , the kgdb troubles would seem to stem from 
static struct kthr *first failing to get properly initialized, as the 
'proc' command searches starting from that pointer.  It's not immediately 
clear to me where in kgdb_thr_init() it is failing, though --- I see none 
of the warning messages from its error cases.

If no one has thoughts on a possible cause, I guess I can start 
instrumenting kgdb to locate its failure, but help would be appreciated.

Since this may be machine- and/or configuration-dependent, I have posted a 
dmesg and pciconf output here [2]; it's an amd64 machine with a Core2 Duo 
(T9400).


Thanks,

Ben Kaduk


[1] 
http://lists.freebsd.org/pipermail/freebsd-current/2010-May/017195.html

[2] http://stuff.mit.edu/afs/sipb.mit.edu/user/kaduk/freebsd/glossolalia/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.GSO.1.10.1005140013260.29136>