Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for gc being invoked in a thread finalizer #365

Merged

Conversation

dagardner-nv
Copy link
Contributor

@dagardner-nv dagardner-nv commented Aug 18, 2023

Description

Note:

  • This bug requires the code in question to be run in a thread created by C++.

fixes #362

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@dagardner-nv dagardner-nv requested a review from a team as a code owner August 18, 2023 18:59
@dagardner-nv dagardner-nv self-assigned this Aug 18, 2023
@dagardner-nv dagardner-nv added bug Something isn't working non-breaking Non-breaking change 3 - Ready for Review labels Aug 18, 2023
@dagardner-nv dagardner-nv requested a review from a team as a code owner August 18, 2023 20:11
Copy link
Contributor

@mdemoret-nv mdemoret-nv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets simplify this to just use the C++ destructor which tries to grab the GIL. Remove all GC stuff since thats not related

python/mrc/tests/utils.cpp Outdated Show resolved Hide resolved
python/tests/test_gil_tls.py Outdated Show resolved Hide resolved
python/tests/test_gil_tls.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Merging #365 (30b16f9) into branch-23.11 (079e371) will increase coverage by 0.02%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##           branch-23.11     #365      +/-   ##
================================================
+ Coverage         73.60%   73.62%   +0.02%     
================================================
  Files               385      385              
  Lines             13614    13614              
  Branches           1029     1028       -1     
================================================
+ Hits              10020    10023       +3     
+ Misses             3594     3591       -3     
Flag Coverage Δ
cpp 69.70% <ø> (+0.03%) ⬆️
py 42.09% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 079e371...30b16f9. Read the comment docs.

@dagardner-nv
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 8b20469 into nv-morpheus:branch-23.11 Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG]: Python thread finalizer can cause thread-local storage to be cleared prematurely in some situations
3 participants