From owner-freebsd-current@FreeBSD.ORG Fri Jul 31 18:50:49 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D556C106566B for ; Fri, 31 Jul 2009 18:50:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A55768FC08 for ; Fri, 31 Jul 2009 18:50:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 46FC146B53; Fri, 31 Jul 2009 14:50:49 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 801958A0A5; Fri, 31 Jul 2009 14:50:48 -0400 (EDT) From: John Baldwin To: Marcel Moolenaar Date: Fri, 31 Jul 2009 14:50:41 -0400 User-Agent: KMail/1.9.7 References: <4A6DB30B.20705@zedat.fu-berlin.de> <200907311325.54104.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200907311450.41829.jhb@freebsd.org> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 31 Jul 2009 14:50:48 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Anton Shterenlikht , freebsd-current@freebsd.org, Alexandre Sunny Kovalenko Subject: Re: FreeBSD 8.0-BETA2/amd64 crashes on SMP under load X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Jul 2009 18:50:50 -0000 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 core files. > 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. -- John Baldwin