From owner-freebsd-bugs@FreeBSD.ORG Tue Oct 9 17:50:07 2007 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 7A4D416A418 for ; Tue, 9 Oct 2007 17:50:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from nosedive.freebsd.org (nosedive.freebsd.org [IPv6:2001:4f8:fff6::44]) by mx1.freebsd.org (Postfix) with ESMTP id 3668613C468 for ; Tue, 9 Oct 2007 17:50:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from nosedive.freebsd.org (gnats@localhost [127.0.0.1]) by nosedive.freebsd.org (8.14.1/8.14.1) with ESMTP id l99Ho738028060 for ; Tue, 9 Oct 2007 17:50:07 GMT (envelope-from gnats@nosedive.freebsd.org) Received: (from gnats@localhost) by nosedive.freebsd.org (8.14.1/8.14.1/Submit) id l99Ho7kG028059; Tue, 9 Oct 2007 17:50:07 GMT (envelope-from gnats) Date: Tue, 9 Oct 2007 17:50:07 GMT Message-Id: <200710091750.l99Ho7kG028059@nosedive.freebsd.org> To: freebsd-bugs@FreeBSD.org From: John Merryweather Cooper Cc: Subject: Re: kern/116886: Lock Order Reversal on Current for kbd and zyd X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John Merryweather Cooper List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2007 17:50:07 -0000 The following reply was made to PR kern/116886; it has been noted by GNATS. From: John Merryweather Cooper To: Weongyo Jeong Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: kern/116886: Lock Order Reversal on Current for kbd and zyd Date: Tue, 09 Oct 2007 10:17:45 -0700 Weongyo Jeong wrote: > On Wed, Oct 03, 2007 at 07:56:46PM -0700, John Merryweather Cooper wrote: > >>> Number: 116886 >>> Category: kern >>> Synopsis: Lock Order Reversal on Current for kbd and zyd >>> 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: Thu Oct 04 05:20:03 GMT 2007 >>> Closed-Date: >>> Last-Modified: >>> Originator: John Merryweather Cooper >>> Release: FreeBSD 7.0-CURRENT amd64 >>> Organization: >>> Environment: >>> >> System: FreeBSD borgdemon3.temp.wsu.edu 7.0-CURRENT FreeBSD 7.0-CURRENT #8: Mon Oct 1 12:32:21 PDT 2007 root@borgdemon3.temp.wsu.edu:/usr/obj/usr/src/sys/TURION amd64 >> >> >> >> >>> Description: >>> >> When the zyd0 interface first takes a DHCP IP (or when it roams), >> it usually (but not always) throws the attach lock order reversal. >> Rarely, the machine will lock up as a result. >> >>> How-To-Repeat: >>> >> When interface takes a DHCP IP address or roams. >> >>> Fix: >>> >> unknown >> >> --- lock-order-reversal begins here --- >> Oct 3 19:27:26 borgdemon3 kernel: lock order reversal: (Giant after non-sleepable) >> Oct 3 19:27:26 borgdemon3 kernel: 1st 0xffffff0001674cf0 inp (udpinp) @ /usr/src/sys/netinet/in_mcast.c:670 >> Oct 3 19:27:26 borgdemon3 kernel: 2nd 0xffffffff8078e3c0 Giant (Giant) @ /usr/src/sys/netinet/in_mcast.c:317 >> Oct 3 19:27:26 borgdemon3 kernel: KDB: stack backtrace: >> Oct 3 19:27:26 borgdemon3 kernel: db_trace_self_wrapper() at db_trace_self_wrapper+0x2a >> Oct 3 19:27:26 borgdemon3 kernel: witness_checkorder() at witness_checkorder+0x64b >> Oct 3 19:27:26 borgdemon3 kernel: _mtx_lock_flags() at _mtx_lock_flags+0x75 >> Oct 3 19:27:26 borgdemon3 kernel: in_addmulti() at in_addmulti+0x1e3 >> Oct 3 19:27:26 borgdemon3 kernel: inp_setmoptions() at inp_setmoptions+0x111c >> Oct 3 19:27:26 borgdemon3 kernel: ip_ctloutput() at ip_ctloutput+0x16f >> Oct 3 19:27:26 borgdemon3 kernel: sosetopt() at sosetopt+0x3b >> Oct 3 19:27:26 borgdemon3 kernel: kern_setsockopt() at kern_setsockopt+0xa2 >> Oct 3 19:27:26 borgdemon3 kernel: setsockopt() at setsockopt+0x22 >> Oct 3 19:27:26 borgdemon3 kernel: syscall() at syscall+0x1ca >> Oct 3 19:27:26 borgdemon3 kernel: Xfast_syscall() at >> Oct 3 19:27:26 borgdemon3 kernel: Xfast_syscall+0xab >> Oct 3 19:27:26 borgdemon3 kernel: --- syscall (105, FreeBSD ELF64, setsockopt), rip = 0x800eb8ebc, rsp = 0x7fffffffeb18, rbp = 0x7fffffffeb90 --- >> --- lock-order-reversal ends here --- >> > > It seems that this LOR isn't occured in the zyd module only when I review > the LOR message you sent. > > LOR is happened in in_addmulti(). > > Regards, > Weongyo Jeong Hmm, yes, it looks like the multicast code is the culprit. jmc