NetBSD Problem Report #59123
From www@netbsd.org Mon Mar 3 15:51:12 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id B8D721A923A
for <gnats-bugs@gnats.NetBSD.org>; Mon, 3 Mar 2025 15:51:11 +0000 (UTC)
Message-Id: <20250303155110.94D381A923D@mollari.NetBSD.org>
Date: Mon, 3 Mar 2025 15:51:10 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: pthread_atfork in a pthread_atfork handler goes awry
X-Send-Pr-Version: www-1.0
>Number: 59123
>Category: lib
>Synopsis: pthread_atfork in a pthread_atfork handler goes awry
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Mar 03 15:55:00 +0000 2025
>Originator: Taylor R Campbell
>Release: current, 10, 9, ...
>Organization:
The Pthread_Atfork Pthread_Atforkation
>Environment:
>Description:
If a pthread_atfork handler tries to call pthread_atfork, libc will be unhappy.
>How-To-Repeat:
Register a pthread_atfork handler that calls pthread_atfork, and then fork.
>Fix:
extra bookkeeping and synchronization, probably not really that costly at runtime because fork likely dominates it anyway, just mildly annoying to write
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.