buildkernel with INVARIANTS, WITNESS, DEBUG_LOCKS, etc. fails
Brian O'Shea
b_oshea at yahoo.com
Fri Dec 28 03:24:28 PST 2007
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 at 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<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,C
MOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM>
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
More information about the freebsd-questions
mailing list