From nobody Thu Apr 27 15:58:53 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q6gQX6Fgkz47Lrx for ; Thu, 27 Apr 2023 15:59:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q6gQP0SHKz3Jlc for ; Thu, 27 Apr 2023 15:58:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682611133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nL1fWUVrkXMA1z/A74HxLlYIjdeNwF1AvAIoyo0parM=; b=ach3Rh5QxPAZ+OjkkCf6lWd9IaTci0crcQcXuynohUQ4oxefdDygdXGqsqN//X+TLnCVHO AZCjiZfz0oCv8YfQzYiUCZ8GmcRltBODgp5+cdHADUC+tk0VmTXdVbaUrz+C3SvHfAIjOH rn0hwXb6+v6RKKQ3rs3i/M8rLS1XJaBJ5l7QJwVOrFw+uD/YNysUITGoGaOne2vIFrxH3u 3wk2bFEQcCU/twWK71P+17J0ICZNytXNkMj3UmteAuZ9QVVTjAYsvmr/bCBoxVlcjj5ufx yaXbrPkS3HJ8nNtyGTWPLhWw6P1sLN+rTDBccLkyS+AyThhgcESUslACBIkdjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682611133; a=rsa-sha256; cv=none; b=QMAcvqriIWPzZ6bS+T3Q0mbonsybbjcSAXpuyuaJot530k24faRFWZArCAwJ0OPoJV1JQX iCgDFrhG/Qu9PHrFavvww2mjY81/IwiDPHeVCd/9vgWXpWNJ5oDBvQRIRDJGlnTj0OZFH2 RZMTd004PAUcdBYAdb63Qrm7ymj90CEvGQiQ8EQmR8fsYZfLQyDBWvBokUXod7O4DGmqb1 BcSBBMa9Lf1E9w4H+qHnOpiD9+AkOnqrN27gJtZPZgFDIv3IIOjjNJf7k+Rb/MO7BzR2U8 UhnFTWIGMxErk9F57Tu7QQPFZ9XOi+wZUgQwZNsoTTTTtzXrps06AteLVYGSwg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q6gQN6TlJzNwZ for ; Thu, 27 Apr 2023 15:58:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 33RFwqVA006341 for ; Thu, 27 Apr 2023 15:58:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 33RFwqGF006340 for bugs@FreeBSD.org; Thu, 27 Apr 2023 15:58:52 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: bugs@FreeBSD.org Subject: [Bug 271101] cxgbe(4): panic due to lock recursion while creating tracing interface Date: Thu, 27 Apr 2023 15:58:53 +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: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: np@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: 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 List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271101 Bug ID: 271101 Summary: cxgbe(4): panic due to lock recursion while creating tracing interface Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: np@FreeBSD.org cxgbe registers an ifnet cloner with the kernel so that a pseudo ifnet can = be created for use with tracing filters. This code seems to panic after the recent netlink changes. These are the steps to reproduce (T6 or T5): # ifconfig cc0 up # ifconfig t6nex0 create # ifconfig cxl0 up # ifconfig t5nex0 create The reason for the panic is that the new code calls the driver ioctl (tracer_ioctl) during the creation of the interface (ether_ifattach). This pseudo-ifnet driver has always used the same lock in both routines. #2 0xffffffff810e7a29 in vpanic (fmt=3D0xffffffff81b56047 "_sx_xlock_hard: recursed on non-recursive sx %s @ %s:%d\n", ap=3D0xfffffe0094b2e3b0) at /root/ws/t7/sys/kern/kern_shutdown.c:972 #3 0xffffffff810e726e in panic (fmt=3D0xffffffff81b56047 "_sx_xlock_hard: recursed on non-recursive sx %s @ %s:%d\n") at /root/ws/t7/sys/kern/kern_shutdown.c:896 #4 0xffffffff810f8b81 in _sx_xlock_hard (sx=3D0xffffffff833c9698 , x=3D18446735277694109504, opts=3D0, file=3D0xffffffff833a8= 09d "/root/ws/t7/sys/dev/cxgbe/t4_tracer.c", line=3D487) at /root/ws/t7/sys/kern/kern_sx.c:628 #5 0xffffffff810f884b in _sx_xlock (sx=3D0xffffffff833c9698 , opts=3D0, file=3D0xffffffff833a809d "/root/ws/t7/sys/dev/cxgbe/t4_tracer.c", line=3D487) at /root/ws/t7/sys/kern/kern_sx.c:332 #6 0xffffffff8338fde0 in tracer_ioctl (ifp=3D0xfffff80001935800, cmd=3D322= 4398136, data=3D0xfffffe0094b2e698 "") at /root/ws/t7/sys/dev/cxgbe/t4_tracer.c:487 #7 0xffffffff814a20e7 in get_operstate_ether (ifp=3D0xfffff80001935800, pstate=3D0xfffffe0094b2e728) at /root/ws/t7/sys/netlink/route/iface.c:125 #8 0xffffffff814a1a2b in get_operstate (ifp=3D0xfffff80001935800, pstate=3D0xfffffe0094b2e728) at /root/ws/t7/sys/netlink/route/iface.c:182 #9 0xffffffff814a166d in dump_iface (nw=3D0xfffffe0094b2e770, ifp=3D0xfffff80001935800, hdr=3D0xfffffe0094b2e7b0, if_flags_mask=3D0) at /root/ws/t7/sys/netlink/route/iface.c:269 #10 0xffffffff814a0f5d in rtnl_handle_ifevent (ifp=3D0xfffff80001935800, nlmsg_type=3D16, if_flags_mask=3D0) at /root/ws/t7/sys/netlink/route/iface.= c:952 #11 0xffffffff814a1212 in rtnl_handle_ifattach (arg=3D0x0, ifp=3D0xfffff80001935800) at /root/ws/t7/sys/netlink/route/iface.c:960 #12 0xffffffff812a6def in if_attach_internal (ifp=3D0xfffff80001935800, vmove=3Dfalse) at /root/ws/t7/sys/net/if.c:958 #13 0xffffffff812a67b9 in if_attach (ifp=3D0xfffff80001935800) at /root/ws/t7/sys/net/if.c:773 #14 0xffffffff812b9a0d in ether_ifattach (ifp=3D0xfffff80001935800, lla=3D0xfffffe0094b2e908 "") at /root/ws/t7/sys/net/if_ethersubr.c:1002 #15 0xffffffff8338ef92 in t4_cloner_create (ifc=3D0xfffff800014a2600, name=3D0xfffffe0094b2ea50 "t6nex0", len=3D16, params=3D0x0) at /root/ws/t7/sys/dev/cxgbe/t4_tracer.c:196 #16 0xffffffff812b6f0a in ifc_advanced_create_wrapper (ifc=3D0xfffff800014a= 2600, name=3D0xfffffe0094b2ea50 "t6nex0", maxlen=3D16, ifc_data=3D0xfffffe0094b2e= aa0, ifpp=3D0xfffffe0094b2ea20) at /root/ws/t7/sys/net/if_clone.c:468 #17 0xffffffff812b5894 in if_clone_createif (ifc=3D0xfffff800014a2600, name=3D0xfffffe0094b2ea50 "t6nex0", len=3D16, ifd=3D0xfffffe0094b2eaa0, ifpp=3D0xfffffe0094b2ea20) at /root/ws/t7/sys/net/if_clone.c:323 #18 0xffffffff812b56e7 in ifc_create_ifp (name=3D0xfffffe0094b2ed98 "t6nex0= ", ifd=3D0xfffffe0094b2eaa0, ifpp=3D0xfffffe0094b2ea98) at /root/ws/t7/sys/net/if_clone.c:205 #19 0xffffffff812b5983 in if_clone_create (name=3D0xfffffe0094b2ed98 "t6nex= 0", len=3D16, params=3D0x0) at /root/ws/t7/sys/net/if_clone.c:218 #20 0xffffffff812ae6ae in ifioctl (so=3D0xfffff800040dc000, cmd=3D322334962= 8, data=3D0xfffffe0094b2ed98 "t6nex0", td=3D0xfffff800049fc740) at /root/ws/t7/sys/net/if.c:3100 --=20 You are receiving this mail because: You are the assignee for the bug.=