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

A patch that fixes OSError "[WinError 64] The specified network name is no longer available" #7926

Merged

Conversation

kozlovsky
Copy link
Contributor

@kozlovsky kozlovsky commented Mar 8, 2024

This PR fixes #7759 by applying a monkey patch for the BaseProactorEventLoop._start_serving method on the win32 platform, as shown in https://github.com/python/cpython/issues/93821.

The accompanying tests cover the primary patched function that replaces BaseProactorEventLoop._start_serving, but the second function, IocpProactor.accept, is not covered as writing a full coverage test for it is a bit unpractical and unnecessary.

@kozlovsky kozlovsky requested a review from xoriole March 8, 2024 08:06
@kozlovsky kozlovsky force-pushed the fix/proactor_finish_accept_patch branch from 26e42a2 to 9f98caf Compare March 8, 2024 08:15
@kozlovsky kozlovsky force-pushed the fix/proactor_finish_accept_patch branch from 2453a58 to 5dbb55c Compare March 8, 2024 08:43
@kozlovsky kozlovsky marked this pull request as ready for review March 8, 2024 08:53
@synctext
Copy link
Member

synctext commented Mar 8, 2024

This is finally making progress on an issue first reported on by our users on 7 Oct 2021, but this can be a different uncaught OS Mac/Windows/Linux networking error! Both aiohttp and asyncio suffer.

Lessons for future: ASyncIO has issue with recv() and accept() with a patch from Jan 2020 (github.com/python/cpython/pull/18199#issue-555429288). Guido Himself is aware. We could switch to hipster FastAPI, but has reproducible the same issues (uvicorn server).

The select reactor has better support for networking errors, but requires meticious tracking of the 64 MAX handles. The proactor event handler supposes to have superior Windows support, but has uncaught OS errors (or fails to retry).

@kozlovsky kozlovsky merged commit ea9e280 into Tribler:release/7.13 Mar 8, 2024
29 checks passed
@kozlovsky kozlovsky deleted the fix/proactor_finish_accept_patch branch March 8, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants