Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Feb 2008 17:05:47 -0500 (EST)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        Andrew Pogrebennyk <andrew.pogrebennyk@portaone.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: DTrace/FreeBSD source snapshot
Message-ID:  <18339.38866.485161.843117@grasshopper.cs.duke.edu>
In-Reply-To: <47A3920B.4010504@portaone.com>
References:  <20080201093538.GA83169@what-creek.com> <18339.35979.765504.132672@grasshopper.cs.duke.edu> <47A3920B.4010504@portaone.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Andrew Pogrebennyk writes:
 > Andrew,
 > 
 > I had to do "make world" first so that all OpenSolaris tools like 
 > ctfconvert would be installed. The world installed cleanly for me. But 
 > note that for there is -Werror defined in /usr/src/sys/conf/kmod.mk, all 
 > warnings are considered as errors and this potentially leads to troubles 
 > during kernel compilation.
 > 
 > First error during kernel module compilation that I came across was 
 > about wrong format specifier:
 > In function 'dtrace_ioctl':
 > /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/dtrace_ioctl.c:294:
 > warning: format '%zd' expects type 'signed size_t', but argument 4 has
 > type 'uint64_t'
 > *** Error code 1

I'm on amd64, so I did not see these warnings :)

BTW, if you forget options KTDTRACE_HOOKS, and try to
preload dtraceall, things explode rather spectacularly:

OK load dtraceall
/boot/kernel/dtraceall.ko size 0x2370 at 0xbcd000
loading required module 'cyclic'
/boot/kernel/cyclic.ko size 0x94c8 at 0xbd0000
<....>
OK boot
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2008 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993,
1994
        The Regents of the University of California. All rights
reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.0-CURRENT #0: Fri Feb  1 13:35:34 PST 2008
    root@diablo2:/usr/obj/var/tmp/dtrace/src/sys/DIABLO
link_elf_obj: symbol lapic_cyclic_clock_func undefined
KLD file cyclic.ko - could not finalize loading
kernel trap 12 with interrupts disabled


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x10
fault code              = supervisor read data, page not present
instruction pointer     = 0x8:0xffffffff8047e9b0
stack pointer           = 0x10:0xffffffff80d14c80
frame pointer           = 0x10:0xffffffff80d14d10
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = resume, IOPL = 0
current process         = 0 ()
trap number             = 12
panic: page fault
cpuid = 0
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
panic() at panic+0x17d
trap_fatal() at trap_fatal+0x29b
trap_pfault() at trap_pfault+0x294
trap() at trap+0x2f9
calltrap() at calltrap+0x8
--- trap 0xc, rip = 0xffffffff8047e9b0, rsp = 0xffffffff80d14c80, rbp
= 0xffffffff80d14d10 ---
linker_preload() at linker_preload+0x3f0
mi_startup() at mi_startup+0x59
btext() at btext+0x2c
kernel trap 12 with interrupts disabled

       <repeating traps forever>


I then rebuilt with KDTRACE_HOOKS.  This time, I had
another missing symbol (syscallnames).  I'm about out of time
for today..

Drew





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