NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/50700: dtrace module(s) cannot be loaded
>Number: 50700
>Category: kern
>Synopsis: dtrace module cannot be loaded - missing symbols
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 24 08:55:00 +0000 2016
>Originator: Paul Goyette
>Release: NetBSD 7.99.25
>Organization:
+------------------+--------------------------+------------------------+
| Paul Goyette | PGP Key fingerprint: | E-mail addresses: |
| (Retired) | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+
>Environment:
System: NetBSD pokey.whooppee.com 7.99.25 NetBSD 7.99.25 (POKEY 2015-12-23 05:05:48) #9: Wed Dec 23 15:10:44 PHT 2015 paul%pokey.whooppee.com@localhost:/build/netbsd-local/obj/amd64/sys/arch/amd64/compile/POKEY amd64
Architecture: x86_64
Machine: amd64
>Description:
The loadable dtrace.kmod module cannot be loaded. When the dtrace module
is not built-in, and you attempt to use modload(8) to load dtrace, you get
several undefined symbols which the in-kernel linker cannot resolve:
dtrace_invop_calltrap_addr
dtrace_invop_jump_addr
dtrace_trap_func
These seem to be referenced in source files
$OSNETDIR/dev/dtrace/{amd64,i386}/dtrace_asm.S
Note that this does not appear to be a simple module-dependency error, as
these symbols do not appear to be defined in any module. The first two
symbols appear to be defined in object file vector.o in the generic kernel
(which includes DTRACE as a built-in module), and the third symbol is
defined in trap.o. But these symbols are not defined in kernels which do
not include a built-in version of dtrace.
As a result, the loadable-module version of dtrace cannot currently be used.
>How-To-Repeat:
build a kernel witihout built-in dtrace (ie, no 'options KDTRACE_HOOKS),
and try to 'modload dtrace'
>Fix:
It seems that these three symbols simply define indirect function pointers
for dtrace. Thus, the definition (and assignment of a NULL value) could be
made unconditional, rather than depending on the presence of the 'options
KTRACE_HOOKS'. (This would impose a small penalty for each trap, having
to save a little extra context on the stack, and checking if dtrace has
registered its callbacks.)
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index