From nobody@FreeBSD.org  Fri Feb 27 14:35:42 2009
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 E8B52106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 27 Feb 2009 14:35:42 +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 D7DBF8FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 27 Feb 2009 14:35:42 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n1REZfCw032234
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 27 Feb 2009 14:35:41 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n1REZfNP032233;
	Fri, 27 Feb 2009 14:35:41 GMT
	(envelope-from nobody)
Message-Id: <200902271435.n1REZfNP032233@www.freebsd.org>
Date: Fri, 27 Feb 2009 14:35:41 GMT
From: Matthew West <freebsd@r.zeeb.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: LOR slock and uart_hwmtx
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         132165
>Category:       kern
>Synopsis:       [uart] [lor] LOR slock and uart_hwmtx
>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 Feb 27 14:40:03 UTC 2009
>Closed-Date:    
>Last-Modified:  Fri Feb 27 17:40:02 UTC 2009
>Originator:     Matthew West
>Release:        FreeBSD 8.0-CURRENT amd64
>Organization:
>Environment:
FreeBSD foo.internal 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Fri Feb 27 12:43:45 GMT 2009 mwest@foo.internal:/usr/obj/usr/src/sys/DEBUGLOCK amd64
>Description:
A -CURRENT system built with sources from yesterday, GENERIC kernel except with some extra VFS deadlock debugging enabled.  Serial console attached.  After a few hours with the system being mostly idle, a LOR was displayed.  The system didn't crash, and the serial console continues to work as expected.  I couldn't find another report for this, so here you we go:

lock order reversal:
1st 0xffffff0004776020 process slock (process slock) @ /usr/src/sys/kern/kern_proc.c:788
2nd 0xffffff000444a238 uart_hwmtx (uart_hwmtx) @ /usr/src/sys/dev/uart/uart_cpu.h:92
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
_witness_debugger() at _witness_debugger+0x2e
witness_checkorder() at witness_checkorder+0x81e
_mtx_lock_spin_flags() at _mtx_lock_spin_flags+0x94
uart_cnputc() at uart_cnputc+0x40
cnputc() at cnputc+0x49
putchar() at putchar+0x6a
kvprintf() at kvprintf+0x81
printf() at printf+0xa4
calcru1() at calcru1+0x1a0
calcru() at calcru+0xda
fill_kinfo_proc() at fill_kinfo_proc+0x5f8
sysctl_out_proc() at sysctl_out_proc+0x7d
sysctl_kern_proc() at sysctl_kern_proc+0x228
sysctl_root() at sysctl_root+0xe3
userland_sysctl() at userland_sysctl+0x11c
__sysctl() at __sysctl+0xaa
syscall() at syscall+0x1e7
Xfast_syscall() at Xfast_syscall+0xab
--- syscall (202, FreeBSD ELF64, __sysctl), rip = 0x8009431fc, rsp = 0x7fffffffda08, rbp = 0xffffdb01 ---

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: "Bjoern A. Zeeb" <bzeeb+freebsd+lor@zabbadoz.net>
To: Matthew West <freebsd@r.zeeb.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/132165: [uart] [lor] LOR slock and uart_hwmtx
Date: Fri, 27 Feb 2009 17:34:35 +0000 (UTC)

 On Fri, 27 Feb 2009, Matthew West wrote:
 
 > lock order reversal:
 > 1st 0xffffff0004776020 process slock (process slock) @ /usr/src/sys/kern/kern_proc.c:788
 > 2nd 0xffffff000444a238 uart_hwmtx (uart_hwmtx) @ /usr/src/sys/dev/uart/uart_cpu.h:92
 
 Assigned LOR #287.
 
 See http://sources.zabbadoz.net/freebsd/lor.html#287 after the next
 update.
 
 -- 
 Bjoern A. Zeeb                      The greatest risk is not taking one.
>Unformatted:
