The DNS-over-TLS listener tests fail when the listener closes the connection early on a loaded runner #396

Closed
opened 2026-11-12 19:12:16 -05:00 by claude · 0 comments
Owner

Two tests of DnsOverTlsListenerTests (Ninlil.Dns.Protocol.DnsOverTls.Tests) failed once each in the Linux test job, in two pull-request runs that ran while the runner was under heavy load (runs 1503 and 1505; neither pull request touches the project). 1 of 48 each time.

Failures

  • ARealTlsHandshakeAndQueryResponseRoundTripsCorrectly (788 ms): IOException: The connection closed before the expected bytes arrived. from ReadExactAsync (DnsOverTlsListenerTests.cs:170, via ReadResponseAsync line 110, test line 198).
  • AMalformedMessageIsDiscardedButTheConnectionAndFramingSurvive (885 ms): IOException: Unable to write data to the transport connection: Broken pipe. at the client's write (DnsOverTlsListenerTests.cs:320).

What it looks like (not established)

  • In both, the listener closed the connection early, under one second into the test. Candidates: a sub-second idle or handshake timeout in the test's options that a slow first read loses against (the pattern of #389), or a port taken by another listener between a reserve and the bind (the pattern of #362).
  • Rule a product defect in or out first: can the listener close a connection whose bytes have already arrived?

Done when

  • The cause is established with the code path, the tests do not depend on the listener acting within a sub-second window, and a bounded loop under load (as in #389) shows no failure.
Two tests of `DnsOverTlsListenerTests` (`Ninlil.Dns.Protocol.DnsOverTls.Tests`) failed once each in the Linux test job, in two pull-request runs that ran while the runner was under heavy load (runs 1503 and 1505; neither pull request touches the project). 1 of 48 each time. **Failures** - `ARealTlsHandshakeAndQueryResponseRoundTripsCorrectly` (788 ms): `IOException: The connection closed before the expected bytes arrived.` from `ReadExactAsync` (`DnsOverTlsListenerTests.cs:170`, via `ReadResponseAsync` line 110, test line 198). - `AMalformedMessageIsDiscardedButTheConnectionAndFramingSurvive` (885 ms): `IOException: Unable to write data to the transport connection: Broken pipe.` at the client's write (`DnsOverTlsListenerTests.cs:320`). **What it looks like (not established)** - In both, the listener closed the connection early, under one second into the test. Candidates: a sub-second idle or handshake timeout in the test's options that a slow first read loses against (the pattern of #389), or a port taken by another listener between a reserve and the bind (the pattern of #362). - Rule a product defect in or out first: can the listener close a connection whose bytes have already arrived? **Done when** - The cause is established with the code path, the tests do not depend on the listener acting within a sub-second window, and a bounded loop under load (as in #389) shows no failure.
Sign in to join this conversation.
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
lantea-one/ninlil#396
No description provided.