kern/159013: kldunload dtraceall crashing if userland dtrace provider is in use

Alex Samorukov samm at os2.kiev.ua
Mon Jul 18 17:20:15 UTC 2011


>Number:         159013
>Category:       kern
>Synopsis:       kldunload dtraceall crashing if userland dtrace provider is in use
>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:   Mon Jul 18 17:20:14 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Alex Samorukov
>Release:        FreeBSD-STABLE
>Organization:
netart
>Environment:
FreeBSD bsd.home 8.2-STABLE FreeBSD 8.2-STABLE #3: Fri Jul 15 21:22:54 UTC 2011     root at bsd.home:/usr/obj/usr/src/sys/DTRACE  amd64

>Description:
I found that kldunload dtracell causing kernel crash if userland providers are in use.
>How-To-Repeat:
1) Compile kernel with DTRACE support on -STABLE.
2) Run program acting as userland provider. I am using mod_php + apache for this, see ports/158983 for the source. 
3) Load module (kldload dtraceall)
4) start the web server to initialize the provider. 
5) Do kldunload dtraceall. System will panic. 

bsd# head -n 31 core.txt.0
bsd.home dumped core - see /var/crash/vmcore.0

Mon Jul 18 22:10:40 UTC 2011

FreeBSD bsd.home 8.2-STABLE FreeBSD 8.2-STABLE #3: Fri Jul 15 21:22:54 UTC 2011     root at bsd.home:/usr/obj/usr/src/sys/DTRACE  amd64

panic: double fault

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...

Unread portion of the kernel message buffer:

Fatal double fault
rip = 0xffffffff808f2cf8
rsp = 0xffffff8126aa8f60
rbp = 0xffffff8126aa90e0
cpuid = 0; apic id = 00
panic: double fault
cpuid = 0
KDB: stack backtrace:
#0 0xffffffff8062d78e at kdb_backtrace+0x5e
#1 0xffffffff805f8d17 at panic+0x187
#2 0xffffffff808f2494 at dblfault_handler+0xa4
#3 0xffffffff808daced at Xdblfault+0xad
Uptime: 2m18s

6) if i`m unloading httpd before kldunload everything is fine. 

I think this bug is not critical, but needs to be fixed. 

>Fix:


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


More information about the freebsd-bugs mailing list