This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_create_server_ssl_over_ssl times out on some systems
Type: behavior Stage: resolved
Components: asyncio, Tests, Windows Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, paul.moore, steve.dower, tim.golden, yselivanov, zach.ware
Priority: normal Keywords: patch

Created on 2022-02-22 00:02 by steve.dower, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 31502 merged steve.dower, 2022-02-22 16:02
Messages (4)
msg413687 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2022-02-22 00:02
This causes a failure on one of my test machines where the firewall settings forbid it.

However, the test itself seems designed to only listen on localhost. Even tracing all call through socket, I don't see when or where it is attempting to listen on 0.0.0.0, and yet TCP Monitor (and my firewall) claim that it is.

This seems to be fairly recent, though I haven't done a bisect yet. Anyone have any ideas?
msg413711 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2022-02-22 15:54
Looks like my issue is actually related to the timeouts added in issue44011.

I'm guessing it's an SSL shutdown timeout, because those are notoriously weird on Windows/OpenSSL.

The timeout is now 30s, but the test aborts after 10s. If I increase the test timeout to 50s, it passes reliably.

However, if I pass ssl_shutdown_timeout to the protocol created in the test (which I think is the right place?), it fails with a timeout somewhere else.

So my guess is that my system (VM in a somewhat protected network) is legitimately taking that long to shut down the connection? And so the test timeout ought to be increased?
msg413712 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2022-02-22 15:58
In fact, I only have to increase the test timeout to 15s to get it to pass reliably.

I don't see any reason the test should time out quicker than the operations it's testing though, right? So set it to 30s?
msg413715 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2022-02-22 16:25
New changeset 77f31a91d55df2df79ac767690738081f27ad476 by Steve Dower in branch 'main':
bpo-46822: Increase timeout for test_create_server_ssl_over_ssl to match underlying timeouts (GH-31502)
https://github.com/python/cpython/commit/77f31a91d55df2df79ac767690738081f27ad476
History
Date User Action Args
2022-04-11 14:59:56adminsetgithub: 90978
2022-02-22 17:42:58steve.dowersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2022-02-22 16:25:15steve.dowersetmessages: + msg413715
2022-02-22 16:02:26steve.dowersetkeywords: + patch
stage: test needed -> patch review
pull_requests: + pull_request29630
2022-02-22 15:58:54steve.dowersetmessages: + msg413712
2022-02-22 15:54:45steve.dowersetmessages: + msg413711
title: test_create_server_ssl_over_ssl attempts to listen on 0.0.0.0 -> test_create_server_ssl_over_ssl times out on some systems
2022-02-22 00:02:05steve.dowercreate