From owner-freebsd-questions@FreeBSD.ORG Fri Dec 28 11:24:27 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E373F16A41A for ; Fri, 28 Dec 2007 11:24:27 +0000 (UTC) (envelope-from b_oshea@yahoo.com) Received: from web39510.mail.mud.yahoo.com (web39510.mail.mud.yahoo.com [209.191.106.94]) by mx1.freebsd.org (Postfix) with SMTP id AEE7813C4CE for ; Fri, 28 Dec 2007 11:24:27 +0000 (UTC) (envelope-from b_oshea@yahoo.com) Received: (qmail 22094 invoked by uid 60001); 28 Dec 2007 10:57:47 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=dFYTxnEbF6x+PktA3Nq6ANfhTyvNIC0mDAhuu2nn5064SP9KM0LDbm3j03yA4NOvRgl1+qr3wcf1/g9IF/ahqua8eyh3vL+YxUxTn4AqOdb1n7XPH4237OcDtrFx7izq/bWDwng6V3xeOOpHoBFCDtuxZlcuIcSAuF6p/7R2ClM=; X-YMail-OSG: Fm8iCMIVM1ks2dMkrD.RY9Q8y8Alv5WipdfslW3lwfRYdEiDlD0AgO5OBNKnge5a8Z_SGFCsa89x5TxonpUzRal0eULdcMy6XJ.SrBaTlwJykutODSIOX6Rib6_H4w-- Received: from [67.170.228.141] by web39510.mail.mud.yahoo.com via HTTP; Fri, 28 Dec 2007 02:57:47 PST Date: Fri, 28 Dec 2007 02:57:47 -0800 (PST) From: Brian O'Shea To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <276958.21567.qm@web39510.mail.mud.yahoo.com> Subject: buildkernel with INVARIANTS, WITNESS, DEBUG_LOCKS, etc. fails X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Dec 2007 11:24:28 -0000 Hello FreeBSD developers, Building a FreeBSD 6.2-RELEASE kernel on an Intel Pentium 4 with the following config options causes buildkernel to fail with undefined references to stack_save, stack_zero, and stack_print functions: makeoptions DEBUG=-g options INVARIANTS options INVARIANT_SUPPORT options WITNESS options DEBUG_LOCKS options DEBUG_VFS_LOCKS options DIAGNOSTIC Am I just omitting an option that causes this code to be linked correctly, or alternatively is there a workaround for this? I followed the instructions from the following developers handbook page on debugging deadlocks: http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-deadlocks.html Below I have included as much information as I can think of that would be relevant to this problem. Please let me know if you would like me to provide any more information. Regards, -brian Output from uname -a : FreeBSD apsara.hsd1.ca.comcast.net. 6.2-RELEASE FreeBSD 6.2-RELEASE #1: Fri Nov 9 00:08:34 PST 2007 root@apsara.hsd1.ca.comcast.net.:/usr/obj/usr/src/sys/APSARA i386 CPU information from dmesg: CPU: Intel(R) Pentium(R) 4 CPU 1.80GHz (1796.95-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf24 Stepping = 4 Features=0x3febfbff Relevant (non-comment) diffs between a kernel config that bulids (APSARA) and one that doesn't (APSARA-DEBUG) included below: 23c22 < ident APSARA --- > ident APSARA-DEBUG 28c27,38 < #makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols --- > makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols > # > # The following options have been set in an attempt to track down the > # problem with the snd_cmi driver, which causes the system to hang if > # it is used to play audio content: > # > options INVARIANTS > options INVARIANT_SUPPORT > options WITNESS > options DEBUG_LOCKS > options DEBUG_VFS_LOCKS > options DIAGNOSTIC Relevant error messages from make buildkernel (with KERNCONF set to APSARA-DEBUG) included below: linking kernel.debug kern_lock.o(.text+0x15d): In function `lockmgr': /usr/src/sys/kern/kern_lock.c:176: undefined reference to `stack_save' kern_lock.o(.text+0x26c):/usr/src/sys/kern/kern_lock.c:223: undefined reference to `stack_save' kern_lock.o(.text+0x4c4):/usr/src/sys/kern/kern_lock.c:306: undefined reference to `stack_save' kern_lock.o(.text+0x5f9):/usr/src/sys/kern/kern_lock.c:365: undefined reference to `stack_save' kern_lock.o(.text+0x737):/usr/src/sys/kern/kern_lock.c:410: undefined reference to `stack_save' kern_lock.o(.text+0x95d): In function `lockinit': /usr/src/sys/kern/kern_lock.c:504: undefined reference to `stack_zero' kern_lock.o(.text+0xae3): In function `lockmgr_printinfo': /usr/src/sys/kern/kern_lock.c:596: undefined reference to `stack_print' *** Error code 1 Stop in /usr/obj/usr/src/sys/APSARA-DEBUG. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping