kern/166928: fbt provider does not destroy probes when module unloaded

Ryan Stone rstone at FreeBSD.org
Fri Apr 13 21:50:11 UTC 2012


>Number:         166928
>Category:       kern
>Synopsis:       fbt provider does not destroy probes when module unloaded
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 13 21:50:10 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Ryan Stone
>Release:        8.2-RELEASE
>Organization:
>Environment:
>Description:
# kldload dtraceall
# kldload hwpmc
# dtrace -n 'fbt:hwpmc::'
# kldunload hwpmc
# dtrace -n 'fbt:hwpmc::'
* kernel panic *

The first invocation of dtrace(1) creates the fbt probes for the hwpmc module, and they are not destroyed when hwpmc is unloaded.

In Solaris and its derivatives this is done by dtrace_module_unloaded in dtrace.c.  The implementation of dtrace_module_unloaded() is a bit hackish though and could incur collateral damage -- it looks like if I unload foo.ko, all probes matching *:foo:*:* will be destroyed, not just fbt:foo:*:*.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list