From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A33973858436; Fri, 28 Apr 2023 21:55:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A33973858436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1682718921; bh=t0r+7BUfWhbATu2r+NB/M1xu8vuPo52kO6CdUzxkons=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fCgUgc8Mo+sR3exSzoBDMYvsSPJYDxgqIcV056ssTL+LKsEUMLlXXDSA5EID07ZZD xqc2E5KP48VT3cmOFf+OJrltgxhAIL2AFUaxC8FotTYgNeCznZerVVA0Z1ecNkOP3z K7DXNZON0aTgY/5E7Qh+gzvVn5XO7at95wVOkEh0= 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: Fri, 28 Apr 2023 21:55: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 #3 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by H.J. Lu : https://sourceware.org/git/gitweb.cgi?p=3Dglibc.git;h=3Da443bd3fb233186038b= 8b483959ecb7978d1abea commit a443bd3fb233186038b8b483959ecb7978d1abea 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. --=20 You are receiving this mail because: You are on the CC list for the bug.=