[GH-ISSUE #2736] client_tests::test_query_udp_edns is flaky (locally) #1054

Closed
opened 2026-03-16 01:26:51 +03:00 by kerem · 1 comment
Owner

Originally created by @djc on GitHub (Jan 24, 2025).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2736

I see this test failure intermittently when running cargo test locally:

---- client_tests::test_query_udp_edns stdout ----
response records: DnsResponse { message: Message { header: Header { id: 10157, message_type: Response, op_code: Query, authoritative: false, truncation: false, recursion_desired: true, recursion_available: true, authentic_data: false, checking_disabled: false, response_code: NoError, query_count: 1, answer_count: 4, name_server_count: 0, additional_count: 1 }, queries: [Query { name: Name("WWW.example.com."), query_type: A, query_class: IN }], answers: [Record { name_labels: Name("WWW.example.com."), dns_class: IN, ttl: 51, rdata: CNAME(CNAME(Name("www.example.com-v4.edgesuite.net."))), proof: Indeterminate }, Record { name_labels: Name("www.example.com-v4.edgesuite.net."), dns_class: IN, ttl: 17754, rdata: CNAME(CNAME(Name("a1422.dscr.akamai.net."))), proof: Indeterminate }, Record { name_labels: Name("a1422.dscr.akamai.net."), dns_class: IN, ttl: 20, rdata: A(A(23.203.135.216)), proof: Indeterminate }, Record { name_labels: Name("a1422.dscr.akamai.net."), dns_class: IN, ttl: 20, rdata: A(A(23.203.135.233)), proof: Indeterminate }], name_servers: [], additionals: [], signature: [], edns: Some(Edns { rcode_high: 0, version: 0, flags: EdnsFlags { dnssec_ok: false, z: 0 }, max_payload: 512, options: OPT { options: [(Subnet, Subnet(ClientSubnet { address: 1.2.0.0, source_prefix: 16, scope_prefix: 19 }))] } }) }, buffer: [39, 173, 129, 128, 0, 1, 0, 4, 0, 0, 0, 1, 3, 87, 87, 87, 7, 101, 120, 97, 109, 112, 108, 101, 3, 99, 111, 109, 0, 0, 1, 0, 1, 192, 12, 0, 5, 0, 1, 0, 0, 0, 51, 0, 34, 3, 119, 119, 119, 7, 101, 120, 97, 109, 112, 108, 101, 6, 99, 111, 109, 45, 118, 52, 9, 101, 100, 103, 101, 115, 117, 105, 116, 101, 3, 110, 101, 116, 0, 192, 45, 0, 5, 0, 1, 0, 0, 69, 90, 0, 20, 5, 97, 49, 52, 50, 50, 4, 100, 115, 99, 114, 6, 97, 107, 97, 109, 97, 105, 192, 74, 192, 91, 0, 1, 0, 1, 0, 0, 0, 20, 0, 4, 23, 203, 135, 216, 192, 91, 0, 1, 0, 1, 0, 0, 0, 20, 0, 4, 23, 203, 135, 233, 0, 0, 41, 2, 0, 0, 0, 0, 0, 0, 10, 0, 8, 0, 6, 0, 1, 16, 19, 1, 2] }
thread 'client_tests::test_query_udp_edns' panicked at tests/integration-tests/tests/integration/client_tests.rs:203:5:
assertion `left == right` failed
  left: Subnet(ClientSubnet { address: 1.2.0.0, source_prefix: 16, scope_prefix: 19 })
 right: Subnet(ClientSubnet { address: 1.2.0.0, source_prefix: 16, scope_prefix: 0 })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

(Seeing this on current macOS, stable Rust.)

Originally created by @djc on GitHub (Jan 24, 2025). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2736 I see this test failure intermittently when running `cargo test` locally: ```rust ---- client_tests::test_query_udp_edns stdout ---- response records: DnsResponse { message: Message { header: Header { id: 10157, message_type: Response, op_code: Query, authoritative: false, truncation: false, recursion_desired: true, recursion_available: true, authentic_data: false, checking_disabled: false, response_code: NoError, query_count: 1, answer_count: 4, name_server_count: 0, additional_count: 1 }, queries: [Query { name: Name("WWW.example.com."), query_type: A, query_class: IN }], answers: [Record { name_labels: Name("WWW.example.com."), dns_class: IN, ttl: 51, rdata: CNAME(CNAME(Name("www.example.com-v4.edgesuite.net."))), proof: Indeterminate }, Record { name_labels: Name("www.example.com-v4.edgesuite.net."), dns_class: IN, ttl: 17754, rdata: CNAME(CNAME(Name("a1422.dscr.akamai.net."))), proof: Indeterminate }, Record { name_labels: Name("a1422.dscr.akamai.net."), dns_class: IN, ttl: 20, rdata: A(A(23.203.135.216)), proof: Indeterminate }, Record { name_labels: Name("a1422.dscr.akamai.net."), dns_class: IN, ttl: 20, rdata: A(A(23.203.135.233)), proof: Indeterminate }], name_servers: [], additionals: [], signature: [], edns: Some(Edns { rcode_high: 0, version: 0, flags: EdnsFlags { dnssec_ok: false, z: 0 }, max_payload: 512, options: OPT { options: [(Subnet, Subnet(ClientSubnet { address: 1.2.0.0, source_prefix: 16, scope_prefix: 19 }))] } }) }, buffer: [39, 173, 129, 128, 0, 1, 0, 4, 0, 0, 0, 1, 3, 87, 87, 87, 7, 101, 120, 97, 109, 112, 108, 101, 3, 99, 111, 109, 0, 0, 1, 0, 1, 192, 12, 0, 5, 0, 1, 0, 0, 0, 51, 0, 34, 3, 119, 119, 119, 7, 101, 120, 97, 109, 112, 108, 101, 6, 99, 111, 109, 45, 118, 52, 9, 101, 100, 103, 101, 115, 117, 105, 116, 101, 3, 110, 101, 116, 0, 192, 45, 0, 5, 0, 1, 0, 0, 69, 90, 0, 20, 5, 97, 49, 52, 50, 50, 4, 100, 115, 99, 114, 6, 97, 107, 97, 109, 97, 105, 192, 74, 192, 91, 0, 1, 0, 1, 0, 0, 0, 20, 0, 4, 23, 203, 135, 216, 192, 91, 0, 1, 0, 1, 0, 0, 0, 20, 0, 4, 23, 203, 135, 233, 0, 0, 41, 2, 0, 0, 0, 0, 0, 0, 10, 0, 8, 0, 6, 0, 1, 16, 19, 1, 2] } thread 'client_tests::test_query_udp_edns' panicked at tests/integration-tests/tests/integration/client_tests.rs:203:5: assertion `left == right` failed left: Subnet(ClientSubnet { address: 1.2.0.0, source_prefix: 16, scope_prefix: 19 }) right: Subnet(ClientSubnet { address: 1.2.0.0, source_prefix: 16, scope_prefix: 0 }) note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` (Seeing this on current macOS, stable Rust.)
kerem closed this issue 2026-03-16 01:26:56 +03:00
Author
Owner

@divergentdave commented on GitHub (Jan 24, 2025):

Skimming RFC 7871, it might be that we need to ignore the scope prefix when comparing responses. The source prefix-length is copied from query to response, but the scope prefix length is zero in queries and determined by the server in responses. It represents "the leftmost number of significant bits of ADDRESS that the response covers." This test is querying www.example.com, so it could be that the new Akamai infrastructure is sometimes specializing the address it returns based on this option. There's also a paragraph that says "A SCOPE PREFIX-LENGTH value longer than SOURCE PREFIX-LENGTH indicates that the provided prefix length was not specific enough to select the most appropriate Tailored Response." I tried reproducing this on my end, but was unsuccessful.

<!-- gh-comment-id:2612813006 --> @divergentdave commented on GitHub (Jan 24, 2025): Skimming RFC 7871, it might be that we need to ignore the scope prefix when comparing responses. The source prefix-length is copied from query to response, but the scope prefix length is zero in queries and determined by the server in responses. It represents "the leftmost number of significant bits of ADDRESS that the response covers." This test is querying `www.example.com`, so it could be that the new Akamai infrastructure is sometimes specializing the address it returns based on this option. There's also a paragraph that says "A SCOPE PREFIX-LENGTH value longer than SOURCE PREFIX-LENGTH indicates that the provided prefix length was not specific enough to select the most appropriate Tailored Response." I tried reproducing this on my end, but was unsuccessful.
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#1054
No description provided.