From nobody Thu May 1 13:55:36 2025 X-Original-To: threads@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 4ZpFtw5kZCz5vCx4 for ; Thu, 01 May 2025 13:55:36 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZpFtw56Wlz3gWY for ; Thu, 01 May 2025 13:55:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746107736; 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=4a1uy9ZxV2C5eJi9H/ffztpdgWEFvYcJ23wei+sTTac=; b=hbQSobT4pt+zTmWu110DE25kgSlmNuKTAYanoC6RipFNCVRt4GG6YpnDNmH31ETsPkBCO5 WQBKtFTkMfaRaavIdAwYdO5KnV2bG1Y/sGZ9ZhTWyO05+zbNqZx2wwaZEuDPu6zs/JYo6r eAl8UGy0pK0c+FXNwQbjgM/0bFCE0tU5Hb8osxg0sjd9Bw7MmXD4RixT/U5SVy+UzSBQUL bRBmHM16wNsI/3h5v8i0WLAwInggKc+JuuevaP1Qi2+fMJDkwbq6WRO/5N1XiwqPFIXRdY 1/TM94jV7vZndEUJCn6dQTs7+VkSoeKINqhyFjfURpVvcLRBf/3EkxqOTAZ/yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746107736; 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=4a1uy9ZxV2C5eJi9H/ffztpdgWEFvYcJ23wei+sTTac=; b=Sz024HMMrjHnaFjXDBhweuM+C4mHmLSK1u+CY1u2cfSavufP6V9OZRhbxg//MGzZ9cSXYL cyFCGU0UW8OknyDSckndvadvb8z/V40mnxahkozuM3hR4MvLNJy8NBFrKWH0dWSRPaqeqh gOEHugyMHgWjhhswpG2UbPKwzXi0HXXnjgdhR1a35cQ124/fNXOVyodlnLyrwxP4Dx7VgA 5QSGNDoBPIEe3y1rxOduHtTFukeXvvt38bSnZmSAYJAKwzF3wuHL8aY8nT0rshm/w78WyR Ae+nZoqXQ8jyq953NE/D1MhRkbminvPNDS/RGjCS6XaLkHOOByglERxoh0zMGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746107736; a=rsa-sha256; cv=none; b=xjn3D1uaYTWsw1VDIrZb9orwsvEXpua0J5u1pssljn7xBw4ZB6i4O0tVxb47XYzP1ix6h2 uTUZBggwUm3zoXqh9ld3821y3cUTtXthtA6kUrh30Y1J/c3qwCl6d40DKg1PwL8X/iixOQ w4qo3dwDeSFhwLHDomXAlDNztX62+hrInaTzd5y5/TUeTb8B69cFqEgG5+uJSPvo3V1g8/ tV4zwTduEclIWLIyCggWAd2dDdT3vmTlm62N2oytzfyAxIQ+V9vf+wquMriGFZm/hfLUi+ Vjq70ippfLrYbQMcY6/Nzd1UJCpNfJ1XKdhFBjX3WcdYQXqto+2FJ6sTX1P8yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZpFtw4bYDzVjt for ; Thu, 01 May 2025 13:55:36 +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 541DtaLx061418 for ; Thu, 1 May 2025 13:55:36 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 541DtaPU061417 for threads@FreeBSD.org; Thu, 1 May 2025 13:55:36 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: threads@FreeBSD.org Subject: [Bug 286502] RTLD deadlocks during IFUNC resolution Date: Thu, 01 May 2025 13:55:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: dapeng.gao@cl.cam.ac.uk X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@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 cc Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D286502 Bug ID: 286502 Summary: RTLD deadlocks during IFUNC resolution Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: threads Assignee: threads@FreeBSD.org Reporter: dapeng.gao@cl.cam.ac.uk CC: kib@FreeBSD.org Steps to reproduce the problem: 1. _rtld_bind upgrades to a wlock to load filtees. 2. Call an ifunc resolver. 3. ifunc resolver re-enters _rtld_bind, causing deadlock. Notes: 1. libthr must be linked to reproduce this. 2. RTLD's own single-threaded locks fail silently under this situation, whi= ch is probably also a bug. Commands to run: cc filter.c -shared -o filter.so cc foo.c filter.so -shared -Wl,--auxiliary=3Dfilter.so -o foo.so -Wl,-rpath= =3D. cc main.c foo.so -lthr -o main -Wl,-rpath=3D. ./main Reproducer: $ cat main.c void foo(); int main() { foo(); } $ cat foo.c static void foo_impl() { } static void *foo_resolver() { bar(); return &foo_impl; } void foo() __attribute__((ifunc("foo_resolver"))); $ cat filter.c void bar() { } --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Thu May 1 14:56:46 2025 X-Original-To: threads@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 4ZpHFW50X4z5vH9D for ; Thu, 01 May 2025 14:56:47 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZpHFW4WY5z3GQt for ; Thu, 01 May 2025 14:56:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746111407; 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: in-reply-to:in-reply-to:references:references; bh=UMgFjhLPwpq3OJIOiCRzO0Lw0T/SCIKt8jl/+gjVD64=; b=Q44byCLjmFDWrB08Eft/EonYis3JeIZlYeRbhVgs05UchnE/L5tVO3SDBi8YuVMMVLhKSJ naiHCR+OATMbaGK+LybXoxyMkATu2IlU05xJ1YD/7G3mlk8bACAnBlyGtisU3ipk5M6umP KpYdz/k20/kFeRiO7zLgeLcRLda6a24jcdo4k2GzVDmonGYEuLtvSwIF7F/SoWZphikpPg Xupmdl66pQKAFqoW3kZ5IMIaro+PDZ2mvmJSbp2lv5uuFSMdlZEo3/nIdLwgq91jzB/Rjp SpdnVa04aY0HdDdU4dYPfbvyZjkgdtzw0dI9rOTMU6aCR7LAN8PubbN52SOVSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746111407; 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: in-reply-to:in-reply-to:references:references; bh=UMgFjhLPwpq3OJIOiCRzO0Lw0T/SCIKt8jl/+gjVD64=; b=xGufUiNtNwB4gprJiE8xmLCCO2Nmgj93N9QXTB723ydKHDOZqIUhwRnQfzMltwZN/3wZ8R 8VzsRwVHq7+r86CbmccDfZmYCOeCnsfNwDmFzxFYMfIz7v7545ER32dR1FO5gY7xKlxwDU V5WONr19TJ6l2c6w3j4mxPRvMynxWRBOvO7KSa0NZJWERQ+SyJz4rYnGy5V1KKDR2P0XBJ BWgwk15HxXTNtwGUS+YHGbZmPTfEP6c29R+GU0k/sGF3Wy9lHY5z+vqSX2vQ2XUOsjKwYj xKz7eecZEXxMWQCnPhExl3D55vcONXuYwiyPgQOJp4vYUtCr5nKWUrMp0GjUCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746111407; a=rsa-sha256; cv=none; b=mkOlk7k7npk/KDIiIlKrLMMSNofb1FD0+LOqNZEM+fJolQ139qoCCMlVBMNj+m0kTLDf4C J1R2A+vGcmjNzHicgmARCt+TjrQw8TBA6/E2z7SGYMl9rN4D2snC3Z0RGquor699MJCznA c5aTpk5AYL4GqKZmjEZJuMm1I9uWrwE0Oh1Z/bz6ZNlSRauaMFRY92DHnQktFDinCyKpre +yTqkcR14Kot5N7uNCQ5MBN21TlVHu2H4KTnoBD8uKZR1Iij3/ghb97Hd9moMAx3HeHZWC aqzMOOa/KasqREETgCmTw8CtLkC5T6r6MSYtTh0U2znUd/DtDVxcUXKC3vkuEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZpHFW3nmbzYm5 for ; Thu, 01 May 2025 14:56:47 +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 541EulWj068665 for ; Thu, 1 May 2025 14:56:47 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 541EuljT068664 for threads@FreeBSD.org; Thu, 1 May 2025 14:56:47 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: threads@FreeBSD.org Subject: [Bug 286502] RTLD deadlocks during IFUNC resolution Date: Thu, 01 May 2025 14:56:46 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: kib@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D286502 --- Comment #1 from Konstantin Belousov --- Yes. Do not do this. Ifunc resolvers are supposed to be trivial. Like, checking for CPU feature flag and selecting specific function symbol. --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Thu May 1 15:22:52 2025 X-Original-To: threads@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 4ZpHqc2sDmz5vK49 for ; Thu, 01 May 2025 15:22:52 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZpHqc2CYwz3VWS for ; Thu, 01 May 2025 15:22:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746112972; 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: in-reply-to:in-reply-to:references:references; bh=ytKS/uQ7GRv+svYXJkZoTrDg6aOEaORDMCMUTYlekLk=; b=xUmN5dYSyA/SJUWOTNcYYtpWhtHWGp8MGtUcm4AC7n0rmlNWfJI4hayCOlF1vB8dPBL1Nh 4Nd5dz8V5Jw9x1FEJtgoFZrPhql4onc9MpXmWNYnPa3nF9Z2JGbLFPBkwMZNUeqnmj4lV6 OumLWn4LJZpDlv5XcfDpMmMftOKoPXHridrZgoGux2QfyZ65M5OrT6GdMwMoR2YTrZETn7 yKrKG9pSDeLbd7thaU3b3rcorMpuSJguS/3XPjSDbtsRl6MeodRuR+TqIl2J89FrTZeCOd BD/04rPhuKJ6keylo8HVSBVKbcW/nVRddyK9I/8xbT9qNhklJotVExmUzmmpWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746112972; 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: in-reply-to:in-reply-to:references:references; bh=ytKS/uQ7GRv+svYXJkZoTrDg6aOEaORDMCMUTYlekLk=; b=oFNssNcdhcLX15ssZC2TPVViLbq+nL68ffwf8SFx7Ubd//jGufNeacU3T8QQyYgkHd2OSG iW7NqStrzom9F/zPMvlGxoSpPC5N+TSasmWvtltROkIg+B/UT3wZ+HtP2S2qb1Tng2qU5A jG+wD5y4KnFqKiQ3HDdQ/otGzraRNHhEbsnQk7RsQfj/n+CvQ1Okk91rnAj08+K+g/8nfh 2Tv2d5T8FDVD5erGKY5Y36W+BUvGgo74Uwsff4763Sb8XTzzpaAJ4wZgPG/DCrC0uSoW9B Mi7cW3C7qA6GKeDmvXGXgna3G9w5Ga+X947IKkICAZTl4ExeXS9gdqO3Ij29Hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746112972; a=rsa-sha256; cv=none; b=y1eA/oPNdoCvdk3kxehrTZB58gars1miGc6Hd2dGi7PuQKyC7QAnYoOCHqQ0exPDSNEm6T duJ6HZCHTVmobL+IWbH4uhgohUUj5wA6PmHBNBMDl8EsA/Nv4oIZ5SEncszBVIiK9fcoZ6 NgjnfbRl780EkVzof2+cGhm+ZMxdVLJi6GjvifSjbJB63ev1e+rsn3UDLVeUGnQob/u4wC pAjQqyoVdzC/Gj6p/FeeAe4Fzsuq+9l9cqH6DxzCKtkiPTjzxScczyMsSdWjI+HBXjaJ1u +vBdbKbkG5K2if9il7C8sSOROzj8AzZF/BGljQeISn8cutXC52VgMpu1IbJOpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZpHqc1d9DzYnL for ; Thu, 01 May 2025 15:22: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 541FMq08016900 for ; Thu, 1 May 2025 15:22:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 541FMqVp016899 for threads@FreeBSD.org; Thu, 1 May 2025 15:22: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: threads@FreeBSD.org Subject: [Bug 286502] RTLD deadlocks during IFUNC resolution Date: Thu, 01 May 2025 15:22:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: dapeng.gao@cl.cam.ac.uk X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D286502 --- Comment #2 from Dapeng Gao --- (In reply to Konstantin Belousov from comment #1) Thanks for the clarification. I was under the impression that ifunc resolve= rs are allowed to enter _rtld_bind based on one of your own commits (https://github.com/freebsd/freebsd-src/commit/5734c46c68e4f5b4edfc00921d02= d8b8c973e51c). Would you agree then that it is in principle OK to revert that commit, and = in particular to remove the lock_release/wlock_acquire pairs around the calls = to ifunc resolvers? --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Thu May 1 15:25:49 2025 X-Original-To: threads@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 4ZpHv2252Pz5vKWx for ; Thu, 01 May 2025 15:25:50 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZpHv16l34z3WbP for ; Thu, 01 May 2025 15:25:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746113149; 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: in-reply-to:in-reply-to:references:references; bh=nfuYp2bxQTs0ws7GkY4PFBifiqBvKtANL3KJljdI9RE=; b=RYKI1KJgcB6AHFFbwWPeLcayu2Gz0AgQImdPJetA44XqRGisLQ1zJ/EBZflhj8HWs1i1Tf CDGk2FafHzB8fFo8ftA67edw0/m9abSwaWOPS+e1yavf761/Nr5RMU/7eTUFgPZceiy+0F hdh/Jx7JuUyJ4mRI2cJl2sqBVb8cNT1pGHai0XUrdF/G8mWrFpYNz4cvSfsZaL5eeuQb3J Pe+f+ZoLeZvc3/E1HX/ic8zqNNlzpnT5q3/J9l8LJJ2IIWrsfg2cJ3MfoogdTA5eOMJDc9 NV5jGMYboEtFvM+5yxRuDKcnnswQjBr7QyhtFTMiJcHfc3on7jHYz/IBcRPgfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746113149; 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: in-reply-to:in-reply-to:references:references; bh=nfuYp2bxQTs0ws7GkY4PFBifiqBvKtANL3KJljdI9RE=; b=iutTc9JFGc6A0JtClwaPzHwLuD9xWFuVkkfScix6zHBU+VwkhyCyMxcC4lEhFh5M1oRWgH mfBQdYwKxEwwn66H6ol5DyWgQZNu8p3Rb0YYWAjDypDWiqDVhM/p1bn+CPBSSxQpss6Z9g f8LA4tL+c40kWKtV9L4+GQH3gFHAKVGsJ4rekj/HH6fIrxeQEjSzrTdJz/qTxEoSnvMrwr 0v4A2uCFiQHh51tJP1tdsDLAakUPZ7v5XaoeB03DdGPN4Y50oV0NAwJm39oo2EYHFun8v0 92qHO9HVuqObyfr0HtPStUlkHgXOpR+k/ZmXODsiWMlPU1POjKQExx/nImK7Ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746113149; a=rsa-sha256; cv=none; b=Y3BmNhQQQSp0vz4yojLlAFmiorcuiIpd1md3u2EXQAoRkxP/yge+Q5kMNxzt3EVZCux0Ph VQoYDHmmo+DXZsfiQCzKZtRgErOMAaua8q8+udp9D6S4+61BC+NtE8r8cJ8ABILx7PKAXs hkO2s9MjT0AS8JpQ+jdHf0kUjOxu9tyJubRx0d61UFAjYJJ8GL1Y0M5WBV53FJfT7/H0kk LwjC2VgjseGPprmmZ4zOgenZgnWrGfzsDUx+6OCLE5v9P4ZFW1Fhkj/YD0xWRclgzBpJzU 2mAwu61caG3iBBExHVJxijy6NTlKb/ZK3xVHLBL6FLEyA4T6ecEU5Vl/P+9Hrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZpHv15w2dzZWZ for ; Thu, 01 May 2025 15:25:49 +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 541FPnmB019396 for ; Thu, 1 May 2025 15:25:49 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 541FPnkx019395 for threads@FreeBSD.org; Thu, 1 May 2025 15:25:49 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: threads@FreeBSD.org Subject: [Bug 286502] RTLD deadlocks during IFUNC resolution Date: Thu, 01 May 2025 15:25:49 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: kib@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D286502 --- Comment #3 from Konstantin Belousov --- (In reply to Dapeng Gao from comment #2) No. Resolvers might need to bind symbols, just that the complex ops like filter loading (or dlopen or thread spawn or whatever) cannot be done from that context. --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Thu May 1 15:45:54 2025 X-Original-To: threads@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 4ZpJLC1G1Kz5vLfw for ; Thu, 01 May 2025 15:45:55 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZpJLC0ft2z3g8Y for ; Thu, 01 May 2025 15:45:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746114355; 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: in-reply-to:in-reply-to:references:references; bh=OJ9l6UnX2Fd1H9bgXWp5eD7tx5+9ujXkM68qYKQ3X/c=; b=FeGT/CR6f4aZMwm3Xq+m0uVSID0vYDcYWhkSNWMGiWEYTeS3cNnFOuXK+sxmskKvI8NHhD m9WYA+ct11ovJUwkzKva1Ii+/R/EuWIDPuyS/LDDy5amLcYQL/8ItCMtaozQvuSiXDhVBw P6ggSTJqfsvDohDsZJ4mkLmNPJlDEi2Nd47vYIIRwqqHjdcyj1CePo9kkaTBOdwdiwMbUP bDIxuTItObWGBOui01O/h+BqIe/Q3VZYEwJIOOaUz5d9W1gv4o/HieuAJh3HlAsDG0RZCn +SCuegM3dllPdmEuHFlajBQoX7gNquCXBPxYr+MSJ0uZn1gLqegn3ZXX2EZfQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746114355; 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: in-reply-to:in-reply-to:references:references; bh=OJ9l6UnX2Fd1H9bgXWp5eD7tx5+9ujXkM68qYKQ3X/c=; b=EY06fQc3q+OCf5PfkWsK6IuQs45t/Bofk9jvQkLua6f4HmXEyo7zYFNiF0tWoZim78fvTg L1w0YEygcMQ9Rmp71bgK8hENBDSSUWcsOklo/NRJEZm/hX3r6/0iGMAJ2yewW4rwac8O8K 4g6DaWOFOC//QvI6inet9pfMi1q/emLoOa/IOCgA+8XYs2ppUCFHz2k3IiUj0EgYoCjVwG X9M6kU4mPbWyPnXI6fVRhcWvp/UfdwIE2UTwdy1f+IYwfJ/H/8V8WNMR3EKIuaxRIAXRlX 1lBw8VOcgI6YKlO96ynSWD2wp4NmmmHEv/F0dkSK7I25/aageciQQ5DVJY/dvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746114355; a=rsa-sha256; cv=none; b=mIu0o9l64zltWUrN0ZRXo2161HpWrT1FhysAnrKxakTYI3+OTGtznvNvdma9W4sIu4iigm 7DG76cN0CE5DPJBbx1NUdGH2ybouIpjFulk/aho6uF9j0FKQXmrhEqxKKtm9ZFl58QgFnp Qf4SRgmuBHQz3XEkZxpzsVbHZcALYnuBvMrlUBhIGg58FQp9qfKxA/MsKz3cyn/34yMaqN uYVfwHj7j6jDwTxph92Ddh5NqXXmVS0D12IpeW0NaX7Aj+/GvydBRU73vn2Ve2O7cSUIgT su5cS72UTPxYy/KfszGHH2lclitwWX0YllXYCGS/6gFedIRaSVDEJdbuzw0nwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZpJLB6fBVzZ3J for ; Thu, 01 May 2025 15:45:54 +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 541Fjs1V050085 for ; Thu, 1 May 2025 15:45:54 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 541Fjsvl050084 for threads@FreeBSD.org; Thu, 1 May 2025 15:45:54 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: threads@FreeBSD.org Subject: [Bug 286502] RTLD deadlocks during IFUNC resolution Date: Thu, 01 May 2025 15:45:54 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: dapeng.gao@cl.cam.ac.uk X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D286502 --- Comment #4 from Dapeng Gao --- (In reply to Konstantin Belousov from comment #3) I'm a little confused. If the first symbol in foo.so to be resolved by _rtld_bind were just a regu= lar STT_FUNC, filter loading would happen there and no deadlock would occur when the ifunc is resolved in the future. So, the resolver does not inherently cause the filter loading, and deadlock= may or may not happen depending on whether the resolver is the first resolved symbol. This seems rather undesirable. --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Thu May 1 15:52:43 2025 X-Original-To: threads@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 4ZpJV41srlz5vLlR for ; Thu, 01 May 2025 15:52:44 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZpJV364wGz3lWc for ; Thu, 01 May 2025 15:52:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746114763; 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: in-reply-to:in-reply-to:references:references; bh=ULX+wa7OHKCKQtfYIjzjQOSXkrjW8cUdC6G7hkGNiKo=; b=QUatUv0a5g9FUe0zDOcGZRRfgIaqlyhkJrcyzv5OneUeFCfBbfmHBA3qdswgFYESbIKA82 UN0SBb6kmoJlb8yYdGWZ77rADZ6VhqAs1whfQGLEgzqZzh9Ig63NC7sHUZJVRAwoI6CM5i Erv+vN76bQEqiur9HsIjtsM7EUGOo3Mn/0p/HkDScyGp03TVQlqv1F0WLgGUu23jfsIm9i vRrsyiNrvgW3PXec9u/K5wciYtHgVI7rFYlyZDqihClgAKzlcsjqx//1Lz2uxrqhxv+I+Z qpgbhqQ3a/IMBSC84Ac8RP9Y5xOv82OOpUoVuMKwGfd6m01LNsqUOP6zi05ULQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746114763; 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: in-reply-to:in-reply-to:references:references; bh=ULX+wa7OHKCKQtfYIjzjQOSXkrjW8cUdC6G7hkGNiKo=; b=igbwENlCkkW10FsCzylqD/Y7zqs2uWXrHGFjOnes3YMtuEK9Z4ZWWJrSMyvKbgRmOnQJUe fsIkzjmXTkhOPYjVo3Abdf82AGbmr+6A3Zl6XfeAmIRX6gei2QMR5jP7o5xOBPhUcRWrXx +9WSi80FlM1m6J+bEgslhlQQVviRvUen+TWjngkKdeQlFfSh6N+2S9Td1sTajqltgoAQor ep0UaeKiw6i0I4x/2/PaZDJ93GwPSN/eLYKkhYfWXHPMTtp8geYc+U0g5WX/pkKOicD8NX GY1bsYKrKVN72w1zxioaMBTSNWbsJF08VFMXldX8O1As5Y2Zkt4T+INfUKzQkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746114763; a=rsa-sha256; cv=none; b=sY1RPCDrHTslJ/AZU4NPYtfyQCXfCaapc4ZsYWFJRioFfScjrTmUQM/Fye76US9j6AAOso rpmoWW2s0kEHTExkg+hJx4s8/lr6m0iF125Jj7mjVFjNf8fMUqk5p7Ja03qXCp26MIUn+i NfYZEGKsySIwhMGkziFBT4OlbrgYTOGcQssfWC3da+gSBEcmlFHovv2oqc35bQu9FpDZyB VIsxwGczmzkDEBwKWM7xl1heVJ595wmq9vSNfqzqCVu8qaR7IrqAJZoq3gA2u+eaafIOa/ TktGKnORN0lN85gAEPmSsAsQ8//Votyo8N+Vxdm+1aBGjR6cf7LSQ9q07ydY3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZpJV35J97zbCG for ; Thu, 01 May 2025 15:52:43 +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 541Fqh62065160 for ; Thu, 1 May 2025 15:52:43 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 541Fqhmv065159 for threads@FreeBSD.org; Thu, 1 May 2025 15:52:43 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: threads@FreeBSD.org Subject: [Bug 286502] RTLD deadlocks during IFUNC resolution Date: Thu, 01 May 2025 15:52:43 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: kib@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D286502 --- Comment #5 from Konstantin Belousov --- (In reply to Dapeng Gao from comment #4) Whether complex rtld op works in ifunc context is a dice. It cannot be relied upon. Anyway, I attached the patch that makes your specific test work. --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Thu May 1 15:53:11 2025 X-Original-To: threads@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 4ZpJVc4X5zz5vLxq for ; Thu, 01 May 2025 15:53:12 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZpJVb69hcz3lmG for ; Thu, 01 May 2025 15:53:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746114791; 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: in-reply-to:in-reply-to:references:references; bh=JmcNRfgNSDQnxa3l5hgtzr3GFglexgFiNDG56LvAgPo=; b=RdytRq5khElAt9wtvWjoWpbx5m5Eu4DKKBDaSBohwl/LJHKt0BjAmT4K1EapzBNJwcd7LW Pn3CKy9KLgTkLkrZBQlmlIyEr1yyg33cI1yFD040oBwuzCuTx+ve0chidJEIXt+iewO63u /q5oVW74ZFTaGtX+L5eDGEoQPLKtsMvq729Sxn/U37JeHyAbO50V5Aje6TqQo5XR9tA2j3 70IYUsIp48Zvl2apl88CMOSBRUS+7ufJe+3kq+j8XgypMeyh0cXYBVatLrIAq8YpNEHRLY 8aQdk7U938f9TOwCov2LHHBsM0xWYLdZ6RklCOpOZ8iwxWyL8E7K7Zeqk3Mj+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746114791; 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: in-reply-to:in-reply-to:references:references; bh=JmcNRfgNSDQnxa3l5hgtzr3GFglexgFiNDG56LvAgPo=; b=EbKtBncAXpBSuFEKdix8GWkU5U2YMhkJsXJ9hlfThIEny8m8Fv/UxspgYCSWyEiENC+IOg XPGdtRz+w8cxD+2KZccPzo1r4SeAUZoh5oQgX7y5fMSgynOgWC2ADz+unARnGKjx8Rv5A7 ocEC/vyViCOaqMgElh/e0Sb1Oj6qBr0+dkrG2/MCbsg4aD1dGA7noOaK3jUATslE2sWKvX m/evQIoz8z6X7pSFflCfjeJhqfpvPZT1bBe0H7IJMjxswExgMqOiHNWNpuR3S3B3+u84Mr Nw54AA4FR5h0C5GtGLXRkjlCN/NkZuU8ROermA2XZ7fLw3qkmoUEqEpd3NV9cQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746114791; a=rsa-sha256; cv=none; b=kDIxFAGmKQz4HJs6CBJxhzA97/pbU7T9qn+Y8ANpiOC7dG/fvdBBoqTkFxFBfsUYRN+I/D vb3rAfv27PemABW40Os7yBRyYWdMYUCdTimloW5yp7VNsuN/mE7oUMXap4n19OQu8RhN0I +12qdvO1HCC1DEgy/DNsQN85silg7Jpz8JsKgMJNRxLrYtdNwoVu5HVjsIwLaboiHapqmC mWRwP+bPPFMho6udtor2RoW1v9Y2ViJcK07FljaA/jPXzYt3H8gf1bbYd3vFW6O9EfU03P xmGF9rTf+gqUbkYlSroRyDCQ6lVi1B9en8h6EeRZdkUhdapNzFwDVIku1qjk8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZpJVb5jKfzbF2 for ; Thu, 01 May 2025 15:53:11 +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 541FrBYj065528 for ; Thu, 1 May 2025 15:53:11 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 541FrBkk065527 for threads@FreeBSD.org; Thu, 1 May 2025 15:53:11 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: threads@FreeBSD.org Subject: [Bug 286502] RTLD deadlocks during IFUNC resolution Date: Thu, 01 May 2025 15:53:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: kib@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D286502 --- Comment #6 from Konstantin Belousov --- Created attachment 260057 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D260057&action= =3Dedit Downgrade the bind lock after filter is loaded --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Thu May 1 16:46:11 2025 X-Original-To: threads@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 4ZpKgl5pgNz5vQ8k for ; Thu, 01 May 2025 16:46:11 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZpKgl570Zz3FTR for ; Thu, 01 May 2025 16:46:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746117971; 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=O1qLdcCajFxvJ41oA7CpvoYgRQDY8iefkpo1HTE/DC8=; b=bC6yjcUGq1qHwId+Wu8QmJ1U+W9s+6Mfi1akO+6U3ZB7/VAr6nzpJc1ml+Z267wQopxabX wvfU+LBzx/MwnOXkJ1ADyZqWl/in0ZTxJr/JAmo0s5S+R5kvMi2IV97V7YEKza+i1LF9Rm 4v4Y4HN+H0QOPbjUncT2iELo/sUFg3OajrrXmOn6CQhpAHuHAfdHmdXPum5+NSsS8g4F3D BGBU3QfrcwMj8hpEm/wDKb8mVXa6sjbDQtGjCwpdRgHLqUrWBhru/nsdWwJjhD5JZVS7ry 7kde4pKyO84qSW4f29Qd1pm/O2crNBMyoxexbI1k0ghtNbmD4DHonxQGmEEfdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746117971; 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=O1qLdcCajFxvJ41oA7CpvoYgRQDY8iefkpo1HTE/DC8=; b=wDXDyI0KXaL8/nZXLxwkoEtIsI0Isu2qFyfYd5c6g9GbtXK16gq+8q7Sq+3E502fSJSAEu fJFhUyAYTKezzJvQODE96r/5jAcl44yMV8nGFOQ93OB2HMWURFzJExQQSwX2h+fLHAoGRz 6ch2B5dv+Z+st4yIWp6zMk+ccl2xVxeteiu/BemZZp0GH0U2H2riUQLI52fEP2he7aGUif D5Y57eSEgaBE/m1iqD56/ptBfYemYh0xIRSQedW/FRTocAmMxCi7/hzP8QCmr3bE+Zbyrq d9ZofYP/NX2q5qnH9brjgsymsoY4AjMGYEuUijhgfGi9vUgVgvguoOWVSorf5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746117971; a=rsa-sha256; cv=none; b=SLww4ghGVkO7tSApVjy4rm4Z+uILcc1H1TyhPlhlsKaKM/F2MlvvUG48KLH6/HaXVbzmpr bqf5n7GXsXV3E00jx6EdPxpBHsho5zG6r+TZwzmUq1z9MNl5cj/67Af7AueTjhn8q/veLm /x2ZvhVHhK5Dt//1aDR6g8zQ5YYgx4aV9REy7G+EWNLyMw7rdCL87i1Kzww26Ecxo25BKY WSEMZry+sN343LzKZ3rihLYeoZa1/VNvkgD1Juzeen4EkTNxW+JDT8vygiN07Ja5O+bfys eAFxlHD6oXrdoSjUYFsSUmxvZ60PVZkaOpzEm+CmwNfeRrZSCF2EuO2d0z10fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZpKgl4JvwzcJt for ; Thu, 01 May 2025 16:46:11 +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 541GkBcw054784 for ; Thu, 1 May 2025 16:46:11 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 541GkBJJ054783 for threads@FreeBSD.org; Thu, 1 May 2025 16:46:11 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: threads@FreeBSD.org Subject: [Bug 286505] dlopen deadlocks when target library contains IFUNC Date: Thu, 01 May 2025 16:46:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dapeng.gao@cl.cam.ac.uk X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@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 cc Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D286505 Bug ID: 286505 Summary: dlopen deadlocks when target library contains IFUNC Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: threads Assignee: threads@FreeBSD.org Reporter: dapeng.gao@cl.cam.ac.uk CC: kib@FreeBSD.org An ifunc resolver enters _rtld_bind, which attempts to acquire _rtld_bind_l= ock. But since we are in the middle of dlopen, the lock has been acquired alread= y, hence deadlocking. This is similar to bug #286502 but does not involve filter libraries. Tested on AArch64 but should be reproducible on AMD64. pthread required. Commands: cc main.c -lthr -Wl,-rpath=3D. -o main cc foo.c -shared -o foo.so ./main Setup: $ cat main.c #include int main() { dlopen("foo.so", RTLD_LAZY); } $ cat foo.c #include static void foo_impl() { } static void *foo_resolver() { puts("foo_resolver()"); return &foo_impl; } void foo() __attribute__((ifunc("foo_resolver"))); void (*foo_ptr)() =3D &foo; --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Thu May 1 18:08:30 2025 X-Original-To: threads@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 4ZpMVm034fz5vWkR for ; Thu, 01 May 2025 18:08:32 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZpMVl3SFnz4HCG for ; Thu, 01 May 2025 18:08:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746122911; 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: in-reply-to:in-reply-to:references:references; bh=V+Vg+GIGEMspESzv1c+T7MdlLX9+fvPPs0td4/EEJUI=; b=TZBifn6LGB29P4/6l18JZ8rqyI9C8EkaHBcOiFgkr5KCN1loxpdPyXKQd8/IR5WHrs+eGT NY7lr+Ej5d1Eule5znvlqq7oi4PZ1egb+fHSb/ja2/mPVZidtWuxYCUVXuTo2YaG2mhWLv Q0bfHpIeXdPj0TlVNBukdfX98/FqHCUry5UYSbCQFmZ1LWsugfKbLsoZoEwWCBAi1W7XX1 Y5bhhs0g7HOUFaNxB4V3YC2cK2EcRunK/dlzSo1/dYQE9akU8ex9YSqg2Z/9cDVivjyW/k yqzrSXjO9txw3bx1gP9q0yhMtAJnCh6Fd1rIGHWm6hWgCpy1q+tQ0QNMewSHrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746122911; 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: in-reply-to:in-reply-to:references:references; bh=V+Vg+GIGEMspESzv1c+T7MdlLX9+fvPPs0td4/EEJUI=; b=ZCDRJwqhDe6+AbuTLZTb9S4+/ur6QuGZ3qUgwWGPJhllrw746s2rmcFnbFGxKwKkSj4vZt baALzbFeyyHh9NjECl6Iua7Kyv1KGqyvMo32VN6jpGh12p0FJtkFILbiOwj9Fpq0sycZA9 9Fl7CjAfP46lrQpkygDqUmXd/31NzoOlTylkigszBYEZMIyoUq1QVmPqcFskbID2hmbAJv K5GqTnQ0+OmKgMYNMCrH0i/JrmwImYMfz3r1/end01iBdkZYrb5buwgjIcGstGRxnyxCL2 KN5KCQILUJsDle77GdDxmzaK9rrmjTuyCR/RkjjazB9713dV7gcSxt1zghYP/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746122911; a=rsa-sha256; cv=none; b=gX0pHPOJ5hlbMgd/CKbWtk4HFMHc+kMAukBCu6lkOalpO6PWdY1wPcwYglxYB1VmfKaLKx MV26+sWbyhxG+pEad8bKiBH9hIL9tsW86TAVpU0EqgNTXIKEUDGWVlPtAxifqJB4tBmDHg /qaxudblfnY6wUwnwNrD0oGfqehdn1QXLZESMlQ/GIq6Qw3LpvsSgKKzaeeYk5LB7f+O19 TaecpLBFojYZy6oIxpUevGNsPC+LmRG0ylJKSdGGh8hKw8XPOmeF8djRJZ7mRMB4+sxptZ FSMfZ23MCqfvMOFdxpWAI2+F+MeVxFcF/S7WZXfvnoiK2+TX8P7/X5Q6TI7mxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZpMVl2VDlzfD6 for ; Thu, 01 May 2025 18:08:31 +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 541I8VL0090347 for ; Thu, 1 May 2025 18:08:31 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 541I8V6F090346 for threads@FreeBSD.org; Thu, 1 May 2025 18:08:31 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: threads@FreeBSD.org Subject: [Bug 286505] dlopen deadlocks when target library contains IFUNC Date: Thu, 01 May 2025 18:08:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kib@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D286505 --- Comment #1 from Konstantin Belousov --- Created attachment 260061 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D260061&action= =3Dedit libthr: implement mask for rtld locks --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Thu May 1 21:03:47 2025 X-Original-To: threads@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 4ZpRNz6BYWz5vjxJ for ; Thu, 01 May 2025 21:03:47 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZpRNz5g1Nz3CwQ for ; Thu, 01 May 2025 21:03:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746133427; 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: in-reply-to:in-reply-to:references:references; bh=r+x/YSFiuoWZvyZgmCSd0LZV8QBBogBZR4BI2Daz6U8=; b=ftrrByDgMYYSRG+qCMS/mpLPh58hhpQ3lKG9yDeWmLd39cpAcfKZOHBvqIQk6/NC6HTBS/ 3+SV0VUVOd6wfYWdkUJhsGmp3B78xwpv2jGcG+vQulAMwH+xyf+drs2Hk2X+/s8P1i3NOE 7VG/qyqZmQWIjT2siAj4981SoK7nRpTArB1BxXGTUtIHJ2DPO+K95nJTWtVoNjQt8mxSNG +hTXzDFWk94YOYaB+VNQHb14ZkXjAfAWRWPP7I9EZ0LH14FtUXyA5dgQJXSvuT8HuvpB98 B++JoXyjAiZlYn5+2OhfsZR3u2sChwnE5jQIZ9+OlfCgP+Oc7hCEdbOk7v3TnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746133427; 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: in-reply-to:in-reply-to:references:references; bh=r+x/YSFiuoWZvyZgmCSd0LZV8QBBogBZR4BI2Daz6U8=; b=L0Py0uEL1CGFUj+d0oDIcpjY9RVoU5Wuz9mPeQ0++OkB5/FyELv/KZU5nHlTXwvEzqoooP Gpu7OMp3V5H7hg2nQdaQpfBbTaU6EtihvxGKCtD1XnpwQB4KqM0xEykmp6jm4QrDJnl2Hl QrMXWRC7HjMPJloGiHEdF3RZzn1LbIgzdbD9zRq1JhYR5iY1Zs6p12WR+esftQjdYV33hc WTL+ahAp/yJqQJOKcOuo+NyUpTTmLv37OacXScpBqg4k5yqKFdSmw11d5T5KQPI0i/9pmt aIZwT7wUPbqMSPQesg4qWTkGD1l+YNNtJvvUIKNXF2d2b9ny5nJG5+ZZvVuz2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746133427; a=rsa-sha256; cv=none; b=QDwSsOGGqxV87EjZDSvJpZzdbZduqXi7ovUoj6WMcr85w5g0LRcz3i0ASOOodVDvqUjzJe ymJuaQY+4xrk5yV3mJl6JvEC6L6sLW1Yjd9ssiaF10nrB8v7M33P5EhnpO7R6zg6c5ee8g 1QQ9lc9zew7FYAMybjj7HWTR9ZlmylazXaCJH9Pa9/G3/coH8UmzxGVulJ7if48RsPsR0/ H6Enrk2irrxD+8bObP3buxnZ26uAUMrGDs0o2yPxM3Upd8rjCl6CSO7j8A0GTYqe4nPRg6 Ydui+NY2UIclecJ2w1f8H/jppbSTzeACkIT9nS7p95dr8uJiHDIcBbKStlv3yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZpRNz5BKHzlCN for ; Thu, 01 May 2025 21:03:47 +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 541L3l4B087940 for ; Thu, 1 May 2025 21:03:47 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 541L3lwD087939 for threads@FreeBSD.org; Thu, 1 May 2025 21:03:47 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: threads@FreeBSD.org Subject: [Bug 286505] dlopen deadlocks when target library contains IFUNC Date: Thu, 01 May 2025 21:03:47 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dapeng.gao@cl.cam.ac.uk X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D286505 --- Comment #2 from Dapeng Gao --- (In reply to Konstantin Belousov from comment #1) Thanks. Just for my own understanding, does the patch essentially permit a thread to take the same lock more than once? If so, would it still be neces= sary to have the lock_release/wlock_acquire pair around rtld_resolve_ifunc in reloc_gnu_ifunc_plt? --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Fri May 2 07:39:22 2025 X-Original-To: threads@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 4ZpjVL64Xlz5vHb8 for ; Fri, 02 May 2025 07:39:22 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZpjVL5TcXz3v0C for ; Fri, 02 May 2025 07:39:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746171562; 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: in-reply-to:in-reply-to:references:references; bh=nTz7ia/O7aAAZA5mtlqpNSq2hEp749m2V6rTw3611Hw=; b=aVRyu37CxmY+WLsBI8qLyUQVzKVQ32w5oiKVtdDuo6R5bG4CQaTWId+mNUaQqs0yPNqD6b tK+P5/DVBrM2iABopcd5uk2LeOk5D18Va871e/GLrAcuMaYM/4RVrysuT1W/HK6tZMO804 fKIT5IFrf+6fOYylF+6nWpr02Giu07ouD2SveD/LTCwvwste2hd3Ktmmgm8gEdtp0scvF+ GC7OM3j/y+ZhjCVmmdJVHagIQQClKBnYCCkhlFlyCd61N1m0tWtmy4d5Oe4ZqG55deMmfB eAet19M9ZKoVC8bdynIKwZ8Jhxv4Ca6IEZposch6VhR8lqcJH6ktTt2rCsWe3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746171562; 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: in-reply-to:in-reply-to:references:references; bh=nTz7ia/O7aAAZA5mtlqpNSq2hEp749m2V6rTw3611Hw=; b=bYIVk0wMQp429ztxJa+LscXuC1zHQso4h63mGETI+IRubyCsdHQYgM7guGuTVHulTihtTs c7BkJTKL+NFhreKLbUD86ZwsGz9ngD578vxBFc9BV9h18r+QyaebQSrzlj+G4NEd9WO1Ou YtSmD3pw88Ib5JT5N8iDkxj3Sg1vJ8q/R95JGY4TE5CSN8BCI4qd2t8HXfIvVqAKLgzmk1 TqoXo2p063dPpjcoLRV3HGbNtV8P9v4EE0J0g5Rvq5NlBwHHEFkN2RsGnyOsKoKG1MNtIz uDlJYMU7N430/ApCIoWR1l7k5bmSnn7QzPLhzIRoQ82nlxn/tdm3j1pTE/1zTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746171562; a=rsa-sha256; cv=none; b=uylTSrXX28tV4Oi+S0QNg6H5YTY+4W4dcqthGzeXmcuFdqO3364yFfyV40DmpvSuxI5AFk bgeJMhnx4YjmeqqfIeGqHxJozeCYKiZyCf7m8GwlEp9myjsq+HItiafgalW/yxqqhVlMzP j+F0VlurqMC6y3OREaXi0FA8IXu5Br3e/czjYbxjX8S08xNSSjtkIQ3m1uvPVONdmbz3go 9a7DFG8mJPiLLACSHOiq5TrY0UN2r09s7qWjq5S5WQTHTeMXHU6UDWxZUoW6Q5Mj58MLfJ DSQLwbP83YVUcEMFr3pSoQGDXc4LyDvkZpI2v/Jn6Drm5sC/p4XraFv4UoV+Zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZpjVL4pxgz13Hb for ; Fri, 02 May 2025 07:39:22 +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 5427dM0C017107 for ; Fri, 2 May 2025 07:39:22 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 5427dMXT017106 for threads@FreeBSD.org; Fri, 2 May 2025 07:39:22 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: threads@FreeBSD.org Subject: [Bug 286505] dlopen deadlocks when target library contains IFUNC Date: Fri, 02 May 2025 07:39:22 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kib@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D286505 --- Comment #3 from Konstantin Belousov --- (In reply to Dapeng Gao from comment #2) In some sense, yes. We already recurse on read locks (as any r/w lock allo= ws). Being able to rlock when wlock is already owned is also not a crime, just t= hat most current r/w locks implementations optimizations do not allow that. But dropping rtld locks around calls into the user code is generally good, since it avoids lot of problems besides rtld own locking. So yes, my intent is to keep that unlocks. Unfortunately, it is not easy to do for the ifunc resolvers in dlopen_object(). --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Fri May 2 15:40:49 2025 X-Original-To: threads@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 4Zpw9v3pJpz5td1T for ; Fri, 02 May 2025 15:40:51 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zpw9v34H7z3htp for ; Fri, 02 May 2025 15:40:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746200451; 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: in-reply-to:in-reply-to:references:references; bh=nP/OD0OW9ENRx4Ne29s3Ekpb2hekS5KgZAJp3K1Hopg=; b=jyeoyzlCFeySXTao2jbidU7mdXahhW541m1FoqCtDc+DgKYRG5EPG0s/DNYXRq073Z46uN Lkr32kzEIPHjB1/7LwVlGwmbD/gEbVwIOH8VN3S7T0h408gwWF5YSsYgmZhT0xsFvzykTh dxIAiezRUFPHf2rJn+DCL28o1SXgM4/cqmnUCrRwUW/Gv/VNVLLoVtSm6dz5F4Dkh00tVr mpGCizBuLuWvCNE8MK/PTzGEGb2OijREZQNssXllYtTdpTRW9VB19BGx8vTAwnqUSbOpmr lNBrNrzUvm+XYip7Du75C98vmNpjKL5ovrPNZ7wroKTuM07xXSrS4kAN1i/IeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746200451; 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: in-reply-to:in-reply-to:references:references; bh=nP/OD0OW9ENRx4Ne29s3Ekpb2hekS5KgZAJp3K1Hopg=; b=dO1DHebsrlsIFXaImdQcdWuWmJLXYMj2NQMYkEOr4CegopCl8UCMEvMPyspnL2H/tlv2JE uiWkocb0FMUY/WhJ90kB6NKVp5R9KhEgATTvzTBuqoDIlHEWKm5EHsWSFL7eoBb5rO94qk MsGqneeOmw8jXYvGuagRBPQ+Pp/upvDaLCR9qkq3aRGQSyrYWEvWJoqF+736MeS2duNOeZ 9LwauDScX8FkwZ3/D/ec73ScdYnAsJ+M5sCoECfgHSM6/gg3wUVbZAwV0EySVN/Ns0wHAJ ePNYfiW00gJgXzcb1Ab23F6Vfa98Fzkgoqy+MaRvHat62KsUz/oBtNYUBuMZyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746200451; a=rsa-sha256; cv=none; b=lmkh/opgHG02n1tOM6kY79ChHBz8qBWWF4BMcrdWv7il1t2IU5Znd14r2npOB/DU7pfcTq DCIY6iI7ms1tXLTPorphZWSKRFKQPLWZr1O3SXeVdL/GXovi0i634JDYS/6fOCQzdoAKiR k4AtUJTsyfEDLv7GntLqcpQtg0e4WUFJmpxzaf2W9/SN8VUWHRPMJe+p/LtpDey5WLVPTl 6BtauNdPsZBHoL3VuVOoMiOxVlKWI1sl7yfcdcnrSU0/R+hFvvXDhzqzVnEFLiGLExf34z /EkCV/NH+uZvPPHN6nsH2Qtyc5Wb6BysnY0bCM4pl6RWXrkHE1ELCRv3ded+VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4Zpw9t2MLnz1H4J for ; Fri, 02 May 2025 15:40:50 +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 542FeoQn098052 for ; Fri, 2 May 2025 15:40:50 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 542FeovY098051 for threads@FreeBSD.org; Fri, 2 May 2025 15:40:50 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: threads@FreeBSD.org Subject: [Bug 286505] dlopen deadlocks when target library contains IFUNC Date: Fri, 02 May 2025 15:40:49 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kib@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D286505 --- Comment #4 from Konstantin Belousov --- So I concluded that the approach is too flawed to try to make it work prope= rly. Instead I decided to fix the thr_rtld locks implementation to allow reader locks while owning the lock for write. This passed the libthr tests. https://reviews.freebsd.org/D50117 --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Fri May 2 18:08:34 2025 X-Original-To: threads@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 4ZpzSM1zmKz5tq5T for ; Fri, 02 May 2025 18:08:35 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZpzSL4Rdwz3rKY for ; Fri, 02 May 2025 18:08:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746209314; 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: in-reply-to:in-reply-to:references:references; bh=dvG3EUoOEZSbeHt1Is+hfu4xpTo9VCx73FbAdjb7LKk=; b=Nf8xdP3TOrWXrS2qdQM34oyB77RsNkKUGTe0GCjAWvqrGX4YLHujHr6PfIUcXarafprhcK 5S+OgAQpI+v0h6PQB8+docIhSEcMKyEitp25rrzryHLvmJxe5K8V+F4uWUiEAqb/hV5iUO O7Xb8yJYV0Y6CVbSZ3Ny3zigwGlQ+u94Bm4tkBKFcwoRcZe3/4px2wgAIYIWXRl62tbMeh MtYOoOR7IuUmAcW/ADwyl86DZg+SVLl4kqL315OLEnJ5GVuuTsPOP8dBVjYKi5PERPhCnh gYztTNxkIVKOXOZRZLN4nRCSIRnukPw7oGKgqPr6bBKDcXNDGILsx/81hm+5cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746209314; 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: in-reply-to:in-reply-to:references:references; bh=dvG3EUoOEZSbeHt1Is+hfu4xpTo9VCx73FbAdjb7LKk=; b=CKY3eWaQhm1atGcc3ebUYZaomaYDjMaV7gyL2RaNB81iACTB8CstOxsrwWwZYqg51poURQ retvenjFTIumwmN2BK5gipHq3MLY8KzQSnscO8PRts0faasSGcb9Y/K41Q0IvetlJK/7m0 8yO41TxE1sS3JC7hWIhg92fTeXZaOMRa/UwcvIlI9EX33zlYvv/j3eDWv5XrYZsBigJrsS 0ZEbCFD90YqyC0WnXQo97Tm2Mw+rVVAOxnhHVdFLK/kFUMgEK9PNmw34suSYUYjWiC9wJZ 6TL8yXpZCrgfL6iRxEEBPxJioMaAWLkMIGCNbuF6hghF5iI6umVEHMdc/d3YDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746209314; a=rsa-sha256; cv=none; b=Wzh5Vqaxydcoj1f7rXnWb/+3yDhXMm0JY152ZQWNgQiKRhlH1pOm0BHHRys9ZaM8v+1k0E EJdUOO9nXmpbmCgdVXKU79dVX2baKW25pnI9jvhbaYjaBbEon30nm8fe7D7OEL/5x5SiLQ I+iAIoFZu+UXfO3Cq4b0z9IreolAKSZ+RDJEOpngIwmI4gtGsQLC0LyLX05M9vxv9bI413 1JoiVtFpCdOvIy1T05mvHGtDl0KrtKLjTsIONy1nsO864W4Q2uhyMeTs2hJNZzeXe6RIwe J7FqOfin42D4Mf/K2xWB5r1dUR2p8Z8uwlg/OKMn9VdK82sgCoDd2wtaYxdCag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZpzSL3chpz1MYb for ; Fri, 02 May 2025 18:08:34 +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 542I8YsI042071 for ; Fri, 2 May 2025 18:08:34 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 542I8Y5d042070 for threads@FreeBSD.org; Fri, 2 May 2025 18:08:34 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: threads@FreeBSD.org Subject: [Bug 286502] RTLD deadlocks during IFUNC resolution Date: Fri, 02 May 2025 18:08:34 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D286502 --- Comment #7 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc66c0a8479e62f3e3e085252839cddace= 4d4bbf5 commit c66c0a8479e62f3e3e085252839cddace4d4bbf5 Author: Konstantin Belousov AuthorDate: 2025-05-01 15:44:12 +0000 Commit: Konstantin Belousov CommitDate: 2025-05-02 18:08:09 +0000 rtld: do not call into ifunc resolvers with the bind lock write-locked If filter needs to be loader, we restart after the lock upgrade. But possible binds in the resolver itself would try to recurse on the lock, which can be only done for the read locks. PR: 286502 Sponsored by: The FreeBSD Foundation MFC after: 1 week libexec/rtld-elf/rtld.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Fri May 2 18:08:36 2025 X-Original-To: threads@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 4ZpzSN6jGFz5tq22 for ; Fri, 02 May 2025 18:08:36 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZpzSN0PtBz3rKt for ; Fri, 02 May 2025 18:08:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746209316; 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: in-reply-to:in-reply-to:references:references; bh=/Rlr24qqI80CFteA78+ajpTB2D9oh0f6Eu52DTXhPg8=; b=R2Qs4+zMdZ7jfPaCKXxeVU0bQZT1SwdjZBoPQfRX0RaAg3VHg/M1QBuhTHWsE+/UAD6LDZ BMHYiCnM1ypnshzm1bL5mE/yTip2rysCefa61LVODxfR59RdVTa/1vD3Y24butwCk/1lvO tzNq4bsVl8+SAhQEZ6VZGnXCOJh2fnmj5IOlQbbRAWHGV7z63SQYIJUOAK/qDOaXZA1Beo Ux8cu52SPoDZNrE6wCeo0hgxHOJvVWyMvBuy0n4gQXv/eCYKMBmkkZPuRj4HoWj5eGYeRl A1o1gJue/uY8AcsSb/RAbS89X3Ph+tJ/5zM3nejWtZq6EeLdqVE23BqLg4js4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746209316; 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: in-reply-to:in-reply-to:references:references; bh=/Rlr24qqI80CFteA78+ajpTB2D9oh0f6Eu52DTXhPg8=; b=HINULZTO7KytUF0Pu0yRSi0xyCxFHs6ZINOAh66X4B6PUv8f073hygYjbkSIJ5cwTxXYqb M/EsAzTs3g9FUenrg+l/2OVW5tim7X+rd6uRWKrKB3fDQWulfecZMH1d3+oL3gsfZ0nrBX /TQPCUZ4IpbOpapR1apjOoEeNdk3JDJkEY3Jp5OGkYcp/k8JFLvwgwYVgEEG5KuAtjRPYB HFwavK8kKjkEXNJ5pJalpGtovFGbSU4Wum/fuOp3TmdNG7SYRBGLHOrA6pSmIKAjmxYZwm my+xxHBErPhCS+RFZ4WhhUJ8vO0CFSLvdVzjVEpIVdjc1rMnxizK5WpeSOhsMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746209316; a=rsa-sha256; cv=none; b=aLg55Sdr1Dp75/7kZljQVWLTK/7KRWS4DDzkyzPyOmRGGaOC6cLIaMVy5KddpNjXRReuyd 1rUhOrJaogWn3KWo1LY7CaMaZlV3aQLtWJbRW/mLjm5QaKZip2++3ll/ecCIoACTzxowbI 2ipLO19Ip95so/PgkZM05rj0XEkLwDNDiF42fI/52fjEyfYKe4oTYDFuqi7QI5fY6bzELI oDg51nfvSLQmMbVzZZI07gBeug6+6LMEbKwDlj2KdQECAE9N3J8ZGgkpb/DltnGBVlKNs7 LIfpbJqUWj4Sts7PHKrXd8YrjqOtelrAbcnKB3DGKRMMk+zIdRTdgk17SiF/cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZpzSM72gbz1MFR for ; Fri, 02 May 2025 18:08:35 +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 542I8Zx7042099 for ; Fri, 2 May 2025 18:08:35 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 542I8ZKB042098 for threads@FreeBSD.org; Fri, 2 May 2025 18:08:35 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: threads@FreeBSD.org Subject: [Bug 286505] dlopen deadlocks when target library contains IFUNC Date: Fri, 02 May 2025 18:08:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D286505 --- Comment #5 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D812c4bf3f17024f192980bbb8a781676c= b9cf6b6 commit 812c4bf3f17024f192980bbb8a781676cb9cf6b6 Author: Konstantin Belousov AuthorDate: 2025-05-02 15:09:46 +0000 Commit: Konstantin Belousov CommitDate: 2025-05-02 18:08:09 +0000 thr_rtld: accept read lock requests while owning the lock for write PR: 286505 Reviewed by: olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D50117 lib/libthr/thread/thr_rtld.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=