DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 538EwHKJ2124088
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 538EwHKJ2124088
Authentication-Results: delorie.com;
	dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=pAFCkBmg
X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E3EE3857013
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1744124295;
	bh=4C9xp4PvV62PEuFdaqpLXf91Rry8qq/8N9gc1o65z3Y=;
	h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
	 From;
	b=pAFCkBmgkwyp45CiKHVBKDiymJcBJbMIfl4FR6Zi2Ex/nSMml/xYo8j4kuv8tjwtl
	 iHRbiawP+thNI3uAJfhCJlWE+/+E5L8x1xGo+jFH2IsbBcfaS9WVSc6sKfh3qG3PRd
	 8Px1aWI8TZLMRsfH0s+SDhg0hyAlzGVN/T9BriMg=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9FA003858D35
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9FA003858D35
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1744124270; cv=none;
 b=I9om5vhyD18DUdUO+Cgoxskolmjc5PDqPXSHbyfE4ZssnGcEW6EuEIbOUQw6rXjiAKo4SHe/TQ9ZwU6FOjGg8RMCvwQ4PkUVhXtZPaWeKLXx2BYm4rFs7sl+TLyJyot3QjdpZUTb3KC3hcVC83oOgNOvK6IVk8z+xXoyvJZ0vcw=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
 t=1744124270; c=relaxed/simple;
 bh=Yja1DLEX9WlwQVZkCtI61uRAgWtmzumqjPOwZB2c16k=;
 h=Date:From:To:Subject:Message-Id:Mime-Version:DKIM-Signature;
 b=MOfoQkH6H4LCaOGAu0Bpkxpda56/MJO2Knjv40tMGw7iKSdDR2U7xO91L8qIrgX/bc9NxV3Uf4Nlupbev1anITffgmx8ms0jULJ62u/DQhwgJFGCi2VHKOc7biYzaaZy52kBSYCVSTLNk9V0vmyJTPrYqh1JH//Ge4JAvcEg/wY=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9FA003858D35
Date: Tue, 8 Apr 2025 23:57:47 +0900
To: cygwin@cygwin.com
Subject: Re: Deadlock when calling pthread_key_create in the destructor of a
 pthread_key
Message-Id: <20250408235747.fcae7b1a340830f3d445c1c8@nifty.ne.jp>
In-Reply-To: <TYCPR01MB1092618CD4D65CA5AA26F73FAF8A52@TYCPR01MB10926.jpnprd01.prod.outlook.com>
References: <TYCPR01MB1092618CD4D65CA5AA26F73FAF8A52@TYCPR01MB10926.jpnprd01.prod.outlook.com>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Takashi Yano via Cygwin <cygwin@cygwin.com>
Reply-To: Takashi Yano <takashi.yano@nifty.ne.jp>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cygwin-bounces~archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie.com@cygwin.com>

On Sun, 23 Mar 2025 20:32:44 +0800
Yuyi Wang wrote:
> It's a bug when I tried to run tests of Rust std lib. The standard
> library of Rust tries to create a new pthread_key in the destructor of a
> key created previously. Unfortunately, List::for_each locked the mutex
> before, so List_insert method cannot lock the mutex again.
> 
> I have searched though the POSIX docs and didn't find any words that one
> should not call pthread_key_create in the destructor of a pthread_key. I
> think it should be a bug of cygwin.

Fixed. Please try cygwin-3.7.0-0.49.g42df80dad079.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
