From owner-freebsd-amd64@FreeBSD.ORG Sun Jul 18 15:20:11 2004 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BE6B616A5A9; Sun, 18 Jul 2004 15:20:11 +0000 (GMT) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C24243D39; Sun, 18 Jul 2004 15:20:10 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id 0B39C1FF9A6; Sun, 18 Jul 2004 17:20:09 +0200 (CEST) Received: by transport.cksoft.de (Postfix, from userid 66) id 1596C1FF90C; Sun, 18 Jul 2004 17:20:07 +0200 (CEST) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id B6742155DD; Sun, 18 Jul 2004 15:11:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id B38D11539E; Sun, 18 Jul 2004 15:11:22 +0000 (UTC) Date: Sun, 18 Jul 2004 15:11:22 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: FreeBSD current mailing list Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de cc: FreeBSD amd64 mailing list Subject: kldunload if_sk -> LOR & panic X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2004 15:20:11 -0000 Hi, tried to unload if_sk for testing the newly built module with dwhite's locking patch (will be loaded after reset now :( ). resulted in this on my amd64: --- cut --- noc# kldunload if_sk e1000phy0: detached miibus0: detached lock order reversal 1st 0xffffff0030ac7870 skc0 (network driver) @ sys/pci/if_sk.c:2604 2nd 0xffffff0000b91af0 radix node head (radix node head) @ sys/netinet/in_rmx.c:391 Stack backtrace: witness_checkorder() at witness_checkorder+0x4a6 _mtx_lock_flags() at _mtx_lock_flags+0x39 in_ifadown() at in_ifadown+0x5b in_control() at in_control+0x81c if_detach() at if_detach+0x50b ether_ifdetach() at ether_ifdetach+0x25 sk_detach() at sk_detach+0x6d (null)() at 0 null_method() at null_method Fatal trap 9: general protection fault while in kernel mode cpuid = 0; apic id = 00 instruction pointer = 0x8:0xffffffff802450c6 stack pointer = 0x10:0xffffffffa7c1c9b0 frame pointer = 0x10:0xffffffffa7c1c9d0 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 1897 (kldunload) kernel: type 9 trap, code=0 Stopped at device_delete_child+0xa: decl %eax db> where device_delete_child() at device_delete_child+0xa device_delete_child() at device_delete_child+0x20 sk_detach() at sk_detach+0x89 (null)() at 0 null_method() at null_method --- cut --- kernel is from Sat Jul 10 20:16:23 UTC 2004 thus before MOD_QUIESCE etc. --- cut --- bz@noc:/usr/obj/u1/src/HEAD/src/sys/AMD64-20040710-01> nm kernel.debug | grep ffffffff802450 ffffffff80245010 T device_add_child ffffffff80245024 T device_add_child_ordered ffffffff802450bc T device_delete_child bz@noc:/usr/obj/u1/src/HEAD/src/sys/AMD64-20040710-01> addr2line -e kernel.debug 0xffffffff802450c6 /u1/src/HEAD/src/sys/kern/subr_bus.c:1222 bz@noc:/usr/obj/u1/src/HEAD/src/sys/AMD64-20040710-01> head -n 1230 /u1/src/HEAD/src/sys/kern/subr_bus.c | tail -18 int device_delete_child(device_t dev, device_t child) { int error; device_t grandchild; PDEBUG(("%s from %s", DEVICENAME(child), DEVICENAME(dev))); /* remove children first */ while ( (grandchild = TAILQ_FIRST(&child->children)) ) { error = device_delete_child(child, grandchild); if (error) return (error); } if ((error = device_detach(child)) != 0) return (error); if (child->devclass) --- cut --- -- Greetings Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT