google / googletest

GoogleTest - Google Testing and Mocking Framework
https://google.github.io/googletest/
BSD 3-Clause "New" or "Revised" License
33.7k stars 9.98k forks source link

Fixed a race condition between the Watcher thread and the main thread during program exit. #4494

Closed cgyrling closed 3 months ago

cgyrling commented 3 months ago

A race condition exist between the Watcher thread and main(). A case was found where the Watcher thread does not get execution time before the main function returns and calls atexit(). At that point the Watcher thread started runing tls_init() code while the main thread was shutting down. This resulted in rare crashes and deadlocks.

This fixes the following issue: (https://github.com/google/googletest/issues/4493)

google-cla[bot] commented 3 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

derekmauro commented 3 months ago

We can't get started on this without the CLA. Please sign the CLA and report back.

cgyrling commented 3 months ago

It shows me as part of this Corporate Contract Google Corporate CLA | Facebook, Inc. | Apr 29, 2016 12:42 PDT.

I double-checked all the emails used and I believe I should be good to go. No individual CLA needed to be signed

derekmauro commented 3 months ago

The CLA check is still failing. There is nothing I can do about that. Please figure out why.

If you would like to close this pull request I am happy to fix this myself (I would do it in a slightly different way anyway).

cgyrling commented 3 months ago

Hi Derek. I'm fine with you fixing the issue. I'm having CLA issues on my end that is holding me up.