Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Apr 2012 21:43:37 GMT
From:      Ryan Stone <rstone@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/166928: fbt provider does not destroy probes when module unloaded
Message-ID:  <201204132143.q3DLhb78083629@red.freebsd.org>
Resent-Message-ID: <201204132150.q3DLoA8W075284@freefall.freebsd.org>

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

>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:



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