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

Connection not timing out #9584

Open
1 task done
Azmisov opened this issue Oct 29, 2024 · 0 comments
Open
1 task done

Connection not timing out #9584

Azmisov opened this issue Oct 29, 2024 · 0 comments
Labels
bug reproducer: missing This PR or issue lacks code, which reproduce the problem described or clearly understandable STR

Comments

@Azmisov
Copy link

Azmisov commented Oct 29, 2024

Describe the bug

I have a request which is hanging and never times out. It is occurring during connection to an IP which never responds; e.g. ping ip will hang with 100% packet loss. I am able to reproduce it 100% in a larger codebase running in a Docker instance. I'm not able to reproduce it running locally, so I'll play around some more to see if I can put together a minimal example.

To Reproduce

async def test(ip):
    addr_infos = [(
        AddressFamily.AF_INET,
        SocketKind.SOCK_STREAM,
        6, '', (ip, 80)
    )]
    loop = asyncio.get_running_loop()
    print("Loop:", loop)
    try:
        async with ceil_timeout(1, ceil_threshold=5):
            sock = await aiohappyeyeballs.start_connection(
                addr_infos=addr_infos,
                local_addr_infos=None,
                happy_eyeballs_delay=0.25,
                interleave=None,
                loop=loop,
            )
            print("Connected:", sock)
    except Exception as e:
        print("Exception:", type(e))

Expected behavior

Should throw an exception

Logs/tracebacks

Loop: <_UnixSelectorEventLoop running=True closed=False debug=False>

Python Version

3.12

aiohttp Version

3.10.10

multidict Version

6.1.0

propcache Version

0.2.0

yarl Version

1.17.0

OS

Debian bookworm

Related component

Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
@Azmisov Azmisov added the bug label Oct 29, 2024
@bdraco bdraco added the reproducer: missing This PR or issue lacks code, which reproduce the problem described or clearly understandable STR label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug reproducer: missing This PR or issue lacks code, which reproduce the problem described or clearly understandable STR
Projects
None yet
Development

No branches or pull requests

2 participants