-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
Conversation
There was a problem hiding this 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.
Lib/test/test_opcache.py
Outdated
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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! |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
This skips the test added in python#105953 for threadless builds This fixes the wasm buildbots
No description provided.