From owner-freebsd-net@FreeBSD.ORG Sat Dec 5 21:40:03 2009 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 503BA106566C for ; Sat, 5 Dec 2009 21:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3EEC18FC0C for ; Sat, 5 Dec 2009 21:40:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nB5Le3AK048934 for ; Sat, 5 Dec 2009 21:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nB5Le3FR048933; Sat, 5 Dec 2009 21:40:03 GMT (envelope-from gnats) Date: Sat, 5 Dec 2009 21:40:03 GMT Message-Id: <200912052140.nB5Le3FR048933@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Benjamin Kaduk Cc: Subject: Re: kern/140036: [iwn] [lor] lock order reversal with iwn0_com_lock and iwn0 softc lock X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Benjamin Kaduk List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2009 21:40:03 -0000 The following reply was made to PR kern/140036; it has been noted by GNATS. From: Benjamin Kaduk To: Bernhard Schmidt Cc: bug-followup@freebsd.org Subject: Re: kern/140036: [iwn] [lor] lock order reversal with iwn0_com_lock and iwn0 softc lock Date: Sat, 5 Dec 2009 16:30:35 -0500 (EST) On Sat, 5 Dec 2009, Benjamin Kaduk wrote: > > I'll update and revert my change to net80211/ieee80211_proto.c and > see what changes. Okay, now I only get a LOR on beacon miss (no panic): lock order reversal: 1st 0xffffff8000309010 iwn0 (network driver) @ /usr/devel/iwn/freebsd/sys/modules/iwn/../../dev/iwn/if_iwn.c:2655 2nd 0xffffff800033d018 iwn0_com_lock (iwn0_com_lock) @ /usr/src/sys/net80211/ieee80211_proto.c:1365 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_flags() at _mtx_lock_flags+0x78 ieee80211_beacon_miss() at ieee80211_beacon_miss+0x2e iwn_notif_intr() at iwn_notif_intr+0x33a iwn_intr() at iwn_intr+0x334 intr_event_execute_handlers() at intr_event_execute_handlers+0x66 ithread_loop() at ithread_loop+0xb2 fork_exit() at fork_exit+0x12a fork_trampoline() at fork_trampoline+0xe --- trap 0, rip = 0, rsp = 0xffffff803a97ed30, rbp = 0 --- I kind of expect that it's a bad idea to drop the softc lock around the call to ieee80211_beacom_miss() from iwn_notif_intr(), but don't see an easy alternative. More concerning, though, is the firmware error that was logged some twenty seconds after the beacon miss, leaving networking in an unuseable state: firmware error log: error type = "SYSASSERT" (0x00000005) program counter = 0x00001E28 source line = 0x00000696 error data = 0x0000000100000696 branch link = 0x000008FA000008FA interrupt link = 0x000008B200000000 time = 2190683577 driver status: tx ring 0: qid=0 cur=99 queued=0 tx ring 1: qid=1 cur=0 queued=0 tx ring 2: qid=2 cur=0 queued=0 tx ring 3: qid=3 cur=7 queued=0 tx ring 4: qid=4 cur=186 queued=0 tx ring 5: qid=5 cur=0 queued=0 tx ring 6: qid=6 cur=0 queued=0 tx ring 7: qid=7 cur=0 queued=0 tx ring 8: qid=8 cur=0 queued=0 tx ring 9: qid=9 cur=0 queued=0 tx ring 10: qid=10 cur=0 queued=0 tx ring 11: qid=11 cur=0 queued=0 tx ring 12: qid=12 cur=0 queued=0 tx ring 13: qid=13 cur=0 queued=0 tx ring 14: qid=14 cur=0 queued=0 tx ring 15: qid=15 cur=0 queued=0 tx ring 16: qid=16 cur=0 queued=0 tx ring 17: qid=17 cur=0 queued=0 tx ring 18: qid=18 cur=0 queued=0 tx ring 19: qid=19 cur=0 queued=0 rx ring: cur=26 Hm, maybe I should move this to not-this-ticket ... -Ben