From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 97F4E3858D35; Tue, 23 May 2023 23:41:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 97F4E3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1684885281; bh=ww0gPddRRiVXyIEOvz0K/QGODh83DVwvrLLEpQOVQBQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VicbM84qPzhE/hL3ynmmmFyjGl1lG+07hKwgJYD8BSUDUas6L7zrJxFSt46zlr6YJ S0pstdxAGGFXvPGWfFsEWQ1vx8fAefA4FY6k4CHvJ09+CY2qfgVMHE9nLjmXzMbMEz k1wGquUz6LXFlaXfL3QXKHHtk156gYx6t0cQK7/I= From: "cvs-commit at gcc dot gnu.org" To: glibc-bugs@sourceware.org Subject: [Bug libc/20975] Deferred cancellation triggers in __check_pf and looses lock leading to deadlock. Date: Tue, 23 May 2023 23:41:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.25 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D20975 --- Comment #8 from cvs-commit at gcc dot gnu.org --- The release/2.33/master branch has been updated by H.J. Lu : https://sourceware.org/git/gitweb.cgi?p=3Dglibc.git;h=3D24302748fcf85023fd6= 4630de241973ec17f2dc1 commit 24302748fcf85023fd64630de241973ec17f2dc1 Author: H.J. Lu Date: Thu Apr 27 13:06:15 2023 -0700 __check_pf: Add a cancellation cleanup handler [BZ #20975] There are reports for hang in __check_pf: https://github.com/JoeDog/siege/issues/4 It is reproducible only under specific configurations: 1. Large number of cores (>=3D 64) and large number of threads (> 3X of the number of cores) with long lived socket connection. 2. Low power (frequency) mode. 3. Power management is enabled. While holding lock, __check_pf calls make_request which calls __sendto and __recvmsg. Since __sendto and __recvmsg are cancellation points, lock held by __check_pf won't be released and can cause deadlock when thread cancellation happens in __sendto or __recvmsg. Add a cancellati= on cleanup handler for __check_pf to unlock the lock when cancelled by another thread. This fixes BZ #20975 and the siege hang issue. (cherry picked from commit a443bd3fb233186038b8b483959ecb7978d1abea) --=20 You are receiving this mail because: You are on the CC list for the bug.=