Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
gh-132912: Use readline to synchronize between procs in remote pdb test#132949
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
pablogsal approved these changesApr 25, 2025
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 but please check with this for a while to ensure we don't have surprises:
$ ./python -m test test_remote_pdb -v --forever -j10 --timeout=60
I see no issues with a few hundred iterations. |
a1f4a6b
intopython:main 48 checks passed
Uh oh!
There was an error while loading.Please reload this page.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading.Please reload this page.
I think we can use stdout to do the synchronization. It's much simpler and we don't need to rely on
time.sleep()
which will surprise you all the time.This PR also get rid of the socket that is used to do synchronization. There's a downside to that - socket has a timeout which means if our
c
did not work properly, it will hang forever. However, we are already risking the hanging because we have_read_until_prompt
- that has areadline()
in it and if something goes way out of control it will hang. I don't think the extra protection gave us much - because it's not a test forcontinue
. If we need to consider the possibility that everything could go wrong, a lot of the existing tests need to be rewritten.I also changed the sleep value because that makes the test take 1s+ on a perfect computer and that's a bit too much. 0.2s is more in the range of the time it already needs to spawn the process and everything.