kern/116886: Lock Order Reversal on Current for kbd and zyd
John Merryweather Cooper
j.m.cooper at borgsdemons.com
Tue Oct 9 10:50:02 PDT 2007
The following reply was made to PR kern/116886; it has been noted by GNATS.
From: John Merryweather Cooper <j.m.cooper at borgsdemons.com>
To: Weongyo Jeong <weongyo.jeong at gmail.com>
Cc: FreeBSD-gnats-submit at 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 at 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
More information about the freebsd-bugs
mailing list