-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
create_connection
and create_server
in asyncio
didn't work with a Python build with IPv6 disabled
#121913
Labels
Comments
aisk
added
type-bug
An unexpected behavior, bug, or error
stdlib
Python modules in the Lib dir
topic-asyncio
labels
Jul 17, 2024
Using |
Sure, working on it. |
kumaraditya303
pushed a commit
that referenced
this issue
Jul 25, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jul 25, 2024
…e_events` (pythonGH-122269) (cherry picked from commit 070f1e2) Co-authored-by: AN Long <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jul 25, 2024
…e_events` (pythonGH-122269) (cherry picked from commit 070f1e2) Co-authored-by: AN Long <[email protected]>
Thanks |
shadchin
added a commit
to shadchin/uvloop
that referenced
this issue
Aug 11, 2024
After python/cpython#121913 error message `[errno 98] address already in use`
fantix
pushed a commit
to MagicStack/uvloop
that referenced
this issue
Aug 13, 2024
After python/cpython#121913 error message `[errno 98] address already in use`
edgarrmondragon
pushed a commit
to edgarrmondragon/uvloop
that referenced
this issue
Aug 19, 2024
After python/cpython#121913 error message `[errno 98] address already in use`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug report
Bug description:
Build Python with the configuration
--disable-ipv6
, and run the test with./python.exe -m test test_asyncio.test_events -m 'test_create_connection_local_addr_skip_different_family' -v
. You will encounter the following error stack:This issue not only affects the test but also user's code.
After some research, I found that it's caused by these two functions, which use
getaddrinfo
to get a list of connection infos and then attempt to callbind
for each of the infos, ignoringOSError
until a working one is found.However, in the iteration code, it attempts to use
OSError().strerror
to create a new error. Unfortunately, someOSError
instances have astrerror
field ofNone
. The error raised bysock.bind
withAF_INET6
when--disable-ipv6
is used does not have this field, leading to an error that prevents the iteration loop from trying the next potential solution.There are already reports for the missing
strerror
/errno
fields issues: #109601 and #50720 with a draft PR #109720.But before we fix this issue, should we provide a workaround for this specific problem, like using
str(exc)
instead ofexc.strerror
, or skip this loop ifnot socket.has_ipv6
and current family isAF_INET6
?CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Linked PRs
asyncio.base_events
(GH-122269) #122278asyncio.base_events
(GH-122269) #122279The text was updated successfully, but these errors were encountered: