8000 gh-128002: add test_asyncio.test_free_threading to tsan tests by kumaraditya303 · Pull Request #131106 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-128002: add test_asyncio.test_free_threading to tsan tests #131106

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

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

kumaraditya303
Copy link
Contributor
@kumaraditya303 kumaraditya303 commented Mar 11, 2025

@bedevere-app bedevere-app bot mentioned this pull request Mar 11, 2025
9 tasks
@kumaraditya303 kumaraditya303 changed the title gh-128002: add test_asyncio.test_free_threading to tsan CI gh-128002: add test_asyncio.test_free_threading to tsan tests Mar 11, 2025
Copy link
Contributor
@colesbury colesbury left a comment

Choose a reason for hiding this comment

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

Do you have time to look at the other TSAN reported races in test_asyncio?

@kumaraditya303
Copy link
Contributor Author

Do you have time to look at the other TSAN reported races in test_asyncio?

What are the other TSAN races?

@colesbury
Copy link
Contributor

If you run the test_asyncio tests under TSAN you'll see a bunch of races. Here are the ones I've seen when running it:

https://gist.github.com/colesbury/210e1e1c60d38dbfd92e5226d7848b38

There are also a few additional ones when run with the GIL enabled, because it doesn't use some of the atomic operations that we use in the free threading build.

I wouldn't worry about the frame_clear race for now, but I think the other ones, including the file descriptor races can be fixed.

@kumaraditya303
Copy link
Contributor Author

If you run the test_asyncio tests under TSAN you'll see a bunch of races. Here are the ones I've seen when running it:

https://gist.github.com/colesbury/210e1e1c60d38dbfd92e5226d7848b38

There are also a few additional ones when run with the GIL enabled, because it doesn't use some of the atomic operations that we use in the free threading build.

Thanks! I will look into it.

@kumaraditya303 kumaraditya303 merged commit 2407049 into python:main Mar 11, 2025
58 checks passed
@kumaraditya303 kumaraditya303 deleted the asyncio branch March 11, 2025 20:03
@colesbury
Copy link
Contributor

To follow up on my previous comment: I think that fixing the file descriptor races might involve changing the test code to avoid concurrent close() operations with operations that use the sockets, but I'm not entirely sure.

seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0