[GH-ISSUE #3470] [Bug] Timeout error when using DoH3 (h3) in global_resolver example #1189

Open
opened 2026-03-16 01:51:45 +03:00 by kerem · 3 comments
Owner

Originally created by @mokeyish on GitHub (Feb 22, 2026).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/3470

Describe the bug
When modifying the global_resolver.rs example to use DNS-over-HTTP/3 (h3), the resolver fails to complete queries and consistently results in a timeout error.

To Reproduce
Apply the following patch to crates/resolver/examples/global_resolver.rs to switch the configuration to H3:

--- a/crates/resolver/examples/global_resolver.rs
+++ b/crates/resolver/examples/global_resolver.rs
@@ -33,8 +33,13 @@ static GLOBAL_DNS_RESOLVER: Lazy<TokioResolver> = Lazy::new(|| {
             #[cfg(any(unix, windows))]
             {
                 // use the system resolver configuration
-                TokioResolver::builder(TokioRuntimeProvider::default())
-                    .map(|builder| builder.build().unwrap())
+
+                use hickory_resolver::{Resolver, config::{GOOGLE, ResolverConfig}};
+
+                Resolver::builder_with_config(
+                    ResolverConfig::h3(&GOOGLE),
+                    TokioRuntimeProvider::default(),
+                ).build()
             }

Then run the example:
cargo run --example global_resolver

Actual behavior
The resolver hangs and eventually returns a Timeout error.

Expected behavior
The resolver should be able to initialize and perform DNS lookups successfully using the h3 configuration.

System:

  • OS: ArchLinux
  • Architecture: x86_64
  • Version: latest
  • rustc version: rustc 1.93.1

Version:
Crate: resolver
Version: 0.26.0-alpha.1

Originally created by @mokeyish on GitHub (Feb 22, 2026). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/3470 **Describe the bug** When modifying the global_resolver.rs example to use DNS-over-HTTP/3 (h3), the resolver fails to complete queries and consistently results in a timeout error. **To Reproduce** Apply the following patch to crates/resolver/examples/global_resolver.rs to switch the configuration to H3: ```diff --- a/crates/resolver/examples/global_resolver.rs +++ b/crates/resolver/examples/global_resolver.rs @@ -33,8 +33,13 @@ static GLOBAL_DNS_RESOLVER: Lazy<TokioResolver> = Lazy::new(|| { #[cfg(any(unix, windows))] { // use the system resolver configuration - TokioResolver::builder(TokioRuntimeProvider::default()) - .map(|builder| builder.build().unwrap()) + + use hickory_resolver::{Resolver, config::{GOOGLE, ResolverConfig}}; + + Resolver::builder_with_config( + ResolverConfig::h3(&GOOGLE), + TokioRuntimeProvider::default(), + ).build() } ``` Then run the example: cargo run --example global_resolver **Actual behavior** The resolver hangs and eventually returns a Timeout error. **Expected behavior** The resolver should be able to initialize and perform DNS lookups successfully using the h3 configuration. **System:** - OS: ArchLinux - Architecture: x86_64 - Version: latest - rustc version: rustc 1.93.1 **Version:** Crate: resolver Version: 0.26.0-alpha.1
Author
Owner

@djc commented on GitHub (Feb 22, 2026):

Are you sure Google Public DNS supports H3? Maybe try with Cloudflare?

<!-- gh-comment-id:3940600295 --> @djc commented on GitHub (Feb 22, 2026): Are you sure Google Public DNS supports H3? Maybe try with Cloudflare?
Author
Owner

@mokeyish commented on GitHub (Feb 22, 2026):

Are you sure Google Public DNS supports H3? Maybe try with Cloudflare?

@djc I also gave Cloudflare a shot, but I'm hitting mysterious hangs and timeouts. It seems like a Tokio scheduling bug when QUIC creates a connection. Spent hours troubleshooting but I'm stuck.

<!-- gh-comment-id:3940645315 --> @mokeyish commented on GitHub (Feb 22, 2026): > Are you sure Google Public DNS supports H3? Maybe try with Cloudflare? @djc I also gave Cloudflare a shot, but I'm hitting mysterious hangs and timeouts. It seems like a Tokio scheduling bug when QUIC creates a connection. Spent hours troubleshooting but I'm stuck.
Author
Owner

@djc commented on GitHub (Feb 23, 2026):

I'm unlikely to have time to look into this deeply in the next month or so. I think we have at least some H3 tests which are passing most of the time, so I suggest starting from those and comparing? Also if you share data collected from your troubleshooting here I can have a look.

<!-- gh-comment-id:3943755719 --> @djc commented on GitHub (Feb 23, 2026): I'm unlikely to have time to look into this deeply in the next month or so. I think we have at least some H3 tests which are passing most of the time, so I suggest starting from those and comparing? Also if you share data collected from your troubleshooting here I can have a look.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#1189
No description provided.