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

gh-110167: Fix test_socket deadlock in doCleanups() #110416

Merged
merged 1 commit into from
Oct 5, 2023

Commits on Oct 5, 2023

  1. pythongh-110167: Fix test_socket deadlock in doCleanups()

    Fix a deadlock in test_socket when server fails with a timeout but
    the client is still running in its thread. Don't hold a lock to call
    cleanup functions in doCleanups(). One of the cleanup function waits
    until the client completes, whereas the client could deadlock if it
    called addCleanup() in such situation.
    
    doCleanups() is called when the server completed, but the client can
    still be running in its thread especially if the server failed with a
    timeout. Don't put a lock on doCleanups() to prevent deadlock between
    addCleanup() called in the client and doCleanups() waiting for
    self.done.wait of ThreadableTest._setUp().
    vstinner committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    98ac898 View commit details
    Browse the repository at this point in the history