Skip to content

Test specialization's thread-safety #105953

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 3 commits into from
Jun 22, 2023
Merged

Conversation

brandtbucher
Copy link
Member

No description provided.

Copy link
Member

@markshannon markshannon left a comment

Choose a reason for hiding this comment

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

LGTM.
A couple of comments, but nothing showstopping.

class TestRacesDoNotCrash(unittest.TestCase):
# Careful with these. Bigger numbers have a higher chance of catching bugs,
# but you can also burn through a *ton* of type/dict/function versions:
ITEMS = 1 << 10
Copy link
Member

Choose a reason for hiding this comment

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

Any reason why these need to be powers of 2? If not, maybe use 1000 instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

It was useful when I was trying to dial in a good value while being aware of exactly how many versions I was using. I can change them, though.

# Run:
for writer in writers:
writer.start()
read(items) # BOOM!
Copy link
Member

Choose a reason for hiding this comment

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

Would increasing the number of reader threads allow us to burn through fewer versions by increasing the chance of failure per version change?

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't see a significant impact on crashiness when dialing the thread count up to moderate levels, and beyond that it just took forever to run.

@brandtbucher brandtbucher enabled auto-merge (squash) June 22, 2023 21:36
@brandtbucher brandtbucher merged commit 403a574 into python:main Jun 22, 2023
hoodmane added a commit to hoodmane/cpython that referenced this pull request Jun 28, 2023
This skips the test added in python#105953 for threadless builds
This fixes the  wasm buildbots
brettcannon pushed a commit that referenced this pull request Jun 28, 2023
…platforms (GH-106166)

This skips the test added in GH-105953 on threadless builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip issue skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants