From nobody@FreeBSD.org  Wed Jun 11 10:05:47 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E614B106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 Jun 2008 10:05:47 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id D862A8FC24
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 Jun 2008 10:05:47 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m5BA5las070976
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 Jun 2008 10:05:47 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m5BA5lGe070975;
	Wed, 11 Jun 2008 10:05:47 GMT
	(envelope-from nobody)
Message-Id: <200806111005.m5BA5lGe070975@www.freebsd.org>
Date: Wed, 11 Jun 2008 10:05:47 GMT
From: kevin <kevinxlinuz@163.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: lock order reversal on kldload/kldunload dtraceall
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         124471
>Category:       kern
>Synopsis:       [lor] lock order reversal on kldload/kldunload dtraceall
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 11 10:10:01 UTC 2008
>Closed-Date:    Sun Feb 07 20:05:32 UTC 2010
>Last-Modified:  Sun Feb 07 20:05:32 UTC 2010
>Originator:     kevin
>Release:        8.0current
>Organization:
163.org
>Environment:
FreeBSD xxx-laptop.people.163.org 8.0-CURRENT FreeBSD 8.0-CURRENT #7: Wed Jun 11 14:49:40 CST 2008     root@xxx-laptop.people.163.org:/usr/obj/usr/src/sys/G8laptop  amd64

>Description:
lock order reversal:
 1st 0xffffff001be3c448 ufs (ufs) @ /usr/src/sys/kern/vfs_subr.c:2044
 2nd 0xffffffff806cd120 kernel linker (kernel linker) @ /usr/src/sys/kern/kern_linker.c:693
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
witness_checkorder() at witness_checkorder+0x5f3
_sx_xlock() at _sx_xlock+0x41
linker_file_lookup_set() at linker_file_lookup_set+0xcf
linker_file_register_sysctls() at linker_file_register_sysctls+0x20
linker_load_module() at linker_load_module+0x963
linker_load_dependencies() at linker_load_dependencies+0x1b4
link_elf_load_file() at link_elf_load_file+0x9ca
linker_load_module() at linker_load_module+0x919
linker_load_dependencies() at linker_load_dependencies+0x1b4
link_elf_load_file() at link_elf_load_file+0x9ca
linker_load_module() at linker_load_module+0x919
kern_kldload() at kern_kldload+0x92
kldload() at kldload+0x7a
syscall() at syscall+0x1dd
Xfast_syscall() at Xfast_syscall+0xab
--- syscall (304, FreeBSD ELF64, kldload), rip = 0x8006810cc, rsp = 0x7fffffffeaf8, rbp = 0 ---

lock order reversal:
 1st 0xffffffff806cd120 kernel linker (kernel linker) @ /usr/src/sys/kern/kern_linker.c:1024
 2nd 0xffffffffd7d788e0 dtrace_provider_lock (dtrace_provider_lock) @ /usr/src/sys/modules/dtrace/dtrace/../../../cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c:7450
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
witness_checkorder() at witness_checkorder+0x5f3
_sx_xlock() at _sx_xlock+0x41
dtrace_unregister() at dtrace_unregister+0x3b2
profile_unload() at profile_unload+0x15
linker_file_unload() at linker_file_unload+0x366
linker_file_unload() at linker_file_unload+0x1f9
kern_kldunload() at kern_kldunload+0xcc
syscall() at syscall+0x1dd
Xfast_syscall() at Xfast_syscall+0xab
--- syscall (444, FreeBSD ELF64, kldunloadf), rip = 0x8006803ac, rsp = 0x7fffffffe368, rbp = 0x12 ---

>How-To-Repeat:
kldload dtraceall after bootup, then kldunload dtraceall
>Fix:


>Release-Note:
>Audit-Trail:

From: Mateusz Guzik <mjguzik@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/124471: [lor] lock order reversal on kldload/kldunload
	dtraceall
Date: Wed, 7 Jan 2009 03:53:04 +0100

 Hi,
 
 this seems to be fixed - I can't reproduce this lor on FreeBSD 7.1 nor
 8.0 (built today).
 
 -- 
 Mateusz Guzik <mjguzik at gmail.com>
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Thu Jan 8 08:33:52 UTC 2009 
State-Changed-Why:  
To submitter: can you confirm that this problem is fixed? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=124471 
State-Changed-From-To: feedback->closed 
State-Changed-By: gavin 
State-Changed-When: Sun Feb 7 20:04:36 UTC 2010 
State-Changed-Why:  
Feedback timeout (1 year), and we have a report from somebody else that 
this is now fixed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=124471 
>Unformatted:
