FreeBSD 8.0-BETA2/amd64 crashes on SMP under load
jhb at freebsd.org
Fri Jul 31 18:50:50 UTC 2009
On Friday 31 July 2009 2:01:49 pm Marcel Moolenaar wrote:
> On Jul 31, 2009, at 10:25 AM, John Baldwin wrote:
> >> In other words: kgdb was designed to hide FreeBSD specifics from the
> >> core GDB
> >> code, because core GDB doesn't know how to deal with all FreeBSD
> >> details.
> >> Revision 178670 created a stronger dependency on core GDB and as such
> >> broke
> >> architectures that core GDB doesn't support for FreeBSD.
> > So gdb doesn't work for core dumps on regular processes under ia64?
> It does, but kernel core files aren't matched, because the OSABI
> is standalone. Also, GDB doesn't have libkvm support for ia64,
> which is probably what makes it work on i386/amd64.
Regular gdb doesn't support libkvm on i386/amd64 either.
> > Still,
> > kgdb doesn't actually use the regular core target at all, it uses
> > its own
> > target that uses libkvm to service the actual memory I/O that
> > normally goes
> > to the core target.
> That's maybe the problom: is the kgdb target used at all?
> If it were, then why did ia64 break?
> Maybe we have a simple resolution problem where GDB just
> happens to pick the wrong core_stratum target on ia64...
Hmm, so kgdb actually forces its own core_stratum target always via
initalize_kgdb_target(). It overrides the "base" core_target that uses
libbfd, etc. Thus, kgdb will always use libkvm and not libbfd for handling
> I haven't had the time for root cause hunting, so from here
> on things should be taken with plenty of salt. I can check
> PowerPC for example...
I do believe it has been used on sparc64 at least since my changes.
> > The previous code was very hacky and didn't allow you
> > to use the 'file' and 'core' commands as a result.
> Actually it was by design.
Well, that wasn't very intuitive to folks used to regular gdb. I think it now
functions more like gdb in that you can switch executables or core images and
modules show up as shared libraries, etc. IIRC, it was also a lot harder to
add KLD/module support in the previous arrangement since I needed to override
the thread_stratum for kld handling independent of having either a remote
target or a vmcore target. That is probably the main reason I changed it
from thread_stratum to core_stratum actually.
More information about the freebsd-current