From owner-freebsd-bugs@FreeBSD.ORG Mon Jul 18 17:20:15 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CE981065673 for ; Mon, 18 Jul 2011 17:20:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3968B8FC15 for ; Mon, 18 Jul 2011 17:20:15 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p6IHKFB5091355 for ; Mon, 18 Jul 2011 17:20:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p6IHKF5J091353; Mon, 18 Jul 2011 17:20:15 GMT (envelope-from gnats) Resent-Date: Mon, 18 Jul 2011 17:20:15 GMT Resent-Message-Id: <201107181720.p6IHKF5J091353@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alex Samorukov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F1EA106564A for ; Mon, 18 Jul 2011 17:18:26 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 3DD328FC16 for ; Mon, 18 Jul 2011 17:18:26 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p6IHIPS8025227 for ; Mon, 18 Jul 2011 17:18:25 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p6IHIPlU025224; Mon, 18 Jul 2011 17:18:25 GMT (envelope-from nobody) Message-Id: <201107181718.p6IHIPlU025224@red.freebsd.org> Date: Mon, 18 Jul 2011 17:18:25 GMT From: Alex Samorukov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/159013: kldunload dtraceall crashing if userland dtrace provider is in use X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2011 17:20:15 -0000 >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@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@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: