From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 76491395C846; Thu, 24 Sep 2020 21:46:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 76491395C846 From: "carlos at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/26275] abort(3) is not signal-safe Date: Thu, 24 Sep 2020 21:46:54 +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: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: carlos at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: 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 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2020 21:46:54 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26275 --- Comment #4 from Carlos O'Donell --- (In reply to hyd-dev from comment #3) > But what about the lock: > https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dstdlib/abort.c; > h=3Ddf98782dd7ea6c1476184a365bd9f3954f481a18;hb=3Drefs/heads/master#l54? > Holding that lock is not signal-safe, even it is recursive. For example, a > thread is calls abort(3) and acquires the lock. Then another thread fork(= 2), > and the child process calls abort(3) and tries to lock the lock, leading = to > deadlock. You are correct. I missed the local lock to make abort MT-safe. In this cas= e we to extend the lock to coordinate with fork like we do with malloc and the s= tdio locks. Let me test a quick fix. --=20 You are receiving this mail because: You are on the CC list for the bug.=