Deadlock when calling pthread_key_create in the destructor of a pthread_key
Brian Inglis
Brian.Inglis@SystematicSW.ab.ca
Sun Mar 23 15:47:07 GMT 2025
On 2025-03-23 06:32, Yuyi Wang via Cygwin 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.
Rust does not support Cygwin, and gcc-rs is not yet available on Cygwin: what
tools and libraries were used to build this library and utilities?
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher but when there is no more to cut
-- Antoine de Saint-Exupéry
More information about the Cygwin
mailing list