From owner-freebsd-net@FreeBSD.ORG Wed Sep 26 21:28:10 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 33E621065686; Wed, 26 Sep 2012 21:28:10 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id C9A328FC18; Wed, 26 Sep 2012 21:28:09 +0000 (UTC) Received: by vbmv11 with SMTP id v11so1564866vbm.13 for ; Wed, 26 Sep 2012 14:28:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=R5kVv6axpEIqrg+Di42UAlAMzgvD0n9Zc+QLAFMTpgY=; b=lOVjUKTc++SIIAyY0VUcDL6kACftK96WMatVol7enciNeaJdU3opq2CuqaaUXz+vsn wh2Zo9bUh0tak52hNk5ZWVoGnVOIzzk7sa6hxosb08p3am7J1/Hbq6O/u71Y5tUJGPcq Znqc6uInnt3i7nggBB1GsJCwPz9XDSZFofyfK2TD1tW+51HnGpvpiJsZeg+T9DnO3VXi pq4eH1VxJrzd8l1KwIxSZ3LNGfWU44tv//9B8AA/rOEbcv0Nzr2UERu0TorrG61/P45m p48BclbIh7bv8bbqM4o4KwP2sv2Wy09Xe3bIkayyLaDy4fdjsLmm1ZGGeqKfoLJdhNYb +CVg== MIME-Version: 1.0 Received: by 10.52.69.242 with SMTP id h18mr847296vdu.54.1348694889160; Wed, 26 Sep 2012 14:28:09 -0700 (PDT) Received: by 10.58.207.114 with HTTP; Wed, 26 Sep 2012 14:28:09 -0700 (PDT) In-Reply-To: <201209261538.11588.jhb@freebsd.org> References: <201209260955.14417.jhb@freebsd.org> <201209261538.11588.jhb@freebsd.org> Date: Wed, 26 Sep 2012 17:28:09 -0400 Message-ID: From: Ryan Stone To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org, Jack Vogel , Vijay Singh Subject: Re: ixgbe rx & tx locks X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Sep 2012 21:28:10 -0000 On Wed, Sep 26, 2012 at 3:38 PM, John Baldwin wrote: >> ix:rx -> udp -> udpinp -> in_multi_mtx -> ix:core -> ix:rx > > Hmm, I'm not sure where the 'in_multi_mtx -> ix:core' bit comes from. > I think that is the broken part of this. The SIOCADDMULTI and SIOCDELMULTI > ioctls are invoked without any stack locks held, so it shouldn't come from > there. I gave the backtrace for this part. in_joingroup_locked is called with the in_multi_mtx held, which calls if_addmulti, which calls the ioctl handler. lock order reversal: 1st 0xffffffff80ae2440 in_multi_mtx (in_multi_mtx) @ src/sys/netinet/in_mcast.c:1095 2nd 0xffffff8001539400 ixgbe0 (IXGBE Core Lock) @ src/sys/dev/ixgbe/ixgbe.c:1725 KDB: stack backtrace: db_trace_self_wrapper() at 0xffffffff801dd5aa = db_trace_self_wrapper+0x2a _witness_debugger() at 0xffffffff8044411e = _witness_debugger+0x2e witness_checkorder() at 0xffffffff804453c7 = witness_checkorder+0x807 _mtx_lock_flags() at 0xffffffff803ec3ba = _mtx_lock_flags+0x8a ixgbe_ioctl() at 0xffffffff802e07ae = ixgbe_ioctl+0x60e if_addmulti() at 0xffffffff804a9f7b = if_addmulti+0x19b in_joingroup_locked() at 0xffffffff804db8ec = in_joingroup_locked+0x1bc in_joingroup() at 0xffffffff804dd5a2 = in_joingroup+0x52 in_control() at 0xffffffff804d7a70 = in_control+0x1160 ifioctl() at 0xffffffff804adec6 = ifioctl+0x5b6 nfs_mountroot() at 0xffffffff80567244 = nfs_mountroot+0x94 nfs_mount() at 0xffffffff80567b7b = nfs_mount+0x4db vfs_donmount() at 0xffffffff8048919e = vfs_donmount+0xcde kernel_mount() at 0xffffffff80489a71 = kernel_mount+0xa1 vfs_mountroot_try() at 0xffffffff80489f9d = vfs_mountroot_try+0x17d vfs_mountroot() at 0xffffffff8048ab7d = vfs_mountroot+0x4fd start_init() at 0xffffffff803b2932 = start_init+0x62 fork_exit() at 0xffffffff803d1fba = fork_exit+0x12a fork_trampoline() at 0xffffffff805f582e = fork_trampoline+0xe --- trap 0, rip = 0, rsp = 0xffffff8000042d00, rbp = 0 ---