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

http3 upstream connection stalls #367

Open
Cydox opened this issue Nov 30, 2023 · 3 comments
Open

http3 upstream connection stalls #367

Cydox opened this issue Nov 30, 2023 · 3 comments
Assignees

Comments

@Cydox
Copy link

Cydox commented Nov 30, 2023

When using an HTTP3 upstream (tested with h3://dns.google/dns-query) sometimes the dns proxy stops responding to queries.

The proxy starts working again after dns.google closes the connection due to max connection age being reached. At that point the proxy restarts a new connection to dns.google using 0-RTT.

This is happening just using this proxy as the DNS for my local machine. So far I have not been able to create a scenario for reliably reproducing the issue, but it'll usually start occurring after some time (maybe at least 20 minutes).

From the verbose logs I can see that the proxy gets stuck at:

resp, err = p.exchangeHTTPSClient(client, req)

@EugeneOne1 EugeneOne1 self-assigned this Jan 15, 2024
@EugeneOne1
Copy link
Member

@Cydox, hello and thanks for the report. Could you please collect the verbose log and goroutines profile for us? You can send both to devteam@adguard.com with the issue number in subject.

To collect the goroutines profile, enable the profiling first. This may be done either with --pprof CLI option, or by setting pprof: true within the YAML configuration file. After that, when the problem occur again, using the same host machine, request:

curl "http://127.0.0.1:6060/debug/pprof/goroutine?debug=1" > profile.txt

The same is available via any web browser.

@Cydox
Copy link
Author

Cydox commented May 5, 2024

I figured out what is going on. After a little over an hour the quic connection runs out of free streams. The reason for this is that after exactly 1 hour dns.google sends a GOAWAY frame. Despite this quic-go continues to send new requests. It looks like quic-go is not currently handling the GOAWAY frame:
https://github.com/quic-go/quic-go/blob/03a32d0daa232fef3313726e244bc7b56eb88bcc/http3/frames.go#L69

@ameshkov
Copy link
Member

ameshkov commented May 8, 2024

Thanks a lot for the update on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants