From owner-freebsd-bugs@freebsd.org Thu Mar 29 14:01:09 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF9E2F78A2F for ; Thu, 29 Mar 2018 14:01:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E60A6F831 for ; Thu, 29 Mar 2018 14:01:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id C173123B22 for ; Thu, 29 Mar 2018 14:01:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w2TE17kN074761 for ; Thu, 29 Mar 2018 14:01:07 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w2TE17u8074759 for freebsd-bugs@FreeBSD.org; Thu, 29 Mar 2018 14:01:07 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 227065] Lock order reversal for if_addr_lock <-> ifnet_rw and if_addr_lock <-> re0 Date: Thu, 29 Mar 2018 14:01:07 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: dom@itsallbroken.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2018 14:01:09 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227065 Bug ID: 227065 Summary: Lock order reversal for if_addr_lock <-> ifnet_rw and if_addr_lock <-> re0 Product: Base System Version: 11.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: dom@itsallbroken.com After booting a GENERIC kernel with the addition of WITNESS+INVARIANTS+INVARIANTS_SUPPORT the following LRO is observed shortly after every boot: Mar 29 12:27:37 box kernel: lock order reversal: Mar 29 12:27:37 box kernel: 1st 0xfffff8000474d190 if_addr_lock (if_addr_lo= ck) @ /usr/src/sys/netinet/igmp.c:1708 Mar 29 12:27:37 box kernel: 2nd 0xffffffff81e68d60 ifnet_rw (ifnet_rw) @ /usr/src/sys/net/if.c:258 Mar 29 12:27:37 box kernel: stack backtrace: Mar 29 12:27:37 box kernel: #0 0xffffffff80aa0010 at witness_debugger+0x70 Mar 29 12:27:37 box kernel: #1 0xffffffff80a9ff03 at witness_checkorder+0xe= 23 Mar 29 12:27:37 box kernel: #2 0xffffffff80a3df3d at __rw_rlock+0x8d Mar 29 12:27:37 box kernel: #3 0xffffffff80b28210 at ifnet_byindex+0x20 Mar 29 12:27:37 box kernel: #4 0xffffffff80b99a1d at igmp_intr+0x1d Mar 29 12:27:37 box kernel: #5 0xffffffff80b48a60 at netisr_dispatch_src+0x= 80 Mar 29 12:27:37 box kernel: #6 0xffffffff80b99826 at igmp_v1v2_queue_report+0x1c6 Mar 29 12:27:37 box kernel: #7 0xffffffff80b9774d at igmp_fasttimo+0x50d Mar 29 12:27:37 box kernel: #8 0xffffffff80ac2f94 at pffasttimo+0x54 Mar 29 12:27:37 box kernel: #9 0xffffffff80a59048 at softclock_call_cc+0x158 Mar 29 12:27:37 box kernel: #10 0xffffffff80a5942c at softclock+0x7c Mar 29 12:27:37 box kernel: #11 0xffffffff80a07e99 at intr_event_execute_handlers+0x99 Mar 29 12:27:37 box kernel: #12 0xffffffff80a08186 at ithread_loop+0xb6 Mar 29 12:27:37 box kernel: #13 0xffffffff80a05584 at fork_exit+0x84 Mar 29 12:27:37 box kernel: #14 0xffffffff80e9052e at fork_trampoline+0xe Mar 29 12:27:37 box kernel: lock order reversal: Mar 29 12:27:37 box kernel: 1st 0xfffff8000474d190 if_addr_lock (if_addr_lo= ck) @ /usr/src/sys/netinet/igmp.c:1708 Mar 29 12:27:37 box kernel: 2nd 0xfffffe0000edb218 re0 (network driver) @ /usr/src/sys/dev/re/if_re.c:2912 Mar 29 12:27:37 box kernel: stack backtrace: Mar 29 12:27:37 box kernel: #0 0xffffffff80aa0010 at witness_debugger+0x70 Mar 29 12:27:37 box kernel: #1 0xffffffff80a9ff03 at witness_checkorder+0xe= 23 Mar 29 12:27:37 box kernel: #2 0xffffffff80a21add at __mtx_lock_flags+0x9d Mar 29 12:27:37 box kernel: #3 0xffffffff8078d9e9 at re_start+0x29 Mar 29 12:27:37 box kernel: #4 0xffffffff80b2f72d at if_transmit+0x10d Mar 29 12:27:37 box kernel: #5 0xffffffff80b317e0 at ether_output+0x750 Mar 29 12:27:37 box kernel: #6 0xffffffff80bac229 at ip_output+0x1439 Mar 29 12:27:37 box kernel: #7 0xffffffff80b99c7d at igmp_intr+0x27d Mar 29 12:27:37 box kernel: #8 0xffffffff80b48a60 at netisr_dispatch_src+0x= 80 Mar 29 12:27:37 box kernel: #9 0xffffffff80b99826 at igmp_v1v2_queue_report+0x1c6 Mar 29 12:27:37 box kernel: #10 0xffffffff80b9774d at igmp_fasttimo+0x50d Mar 29 12:27:37 box kernel: #11 0xffffffff80ac2f94 at pffasttimo+0x54 Mar 29 12:27:37 box kernel: #12 0xffffffff80a59048 at softclock_call_cc+0x1= 58 Mar 29 12:27:37 box kernel: #13 0xffffffff80a5942c at softclock+0x7c Mar 29 12:27:37 box kernel: #14 0xffffffff80a07e99 at intr_event_execute_handlers+0x99 Mar 29 12:27:37 box kernel: #15 0xffffffff80a08186 at ithread_loop+0xb6 Mar 29 12:27:37 box kernel: #16 0xffffffff80a05584 at fork_exit+0x84 Mar 29 12:27:37 box kernel: #17 0xffffffff80e9052e at fork_trampoline+0xe There's seemingly no system impact - everything (including the network) wor= ks fine. Tested on FreeBSD 11.1-RELEASE-p8 running on amd64. --=20 You are receiving this mail because: You are the assignee for the bug.=