Repository navigation
A robustness release for the bridge that carries the library's blocking lookups: reverse DNS,
DNS and ASN queries, and public-IP discovery during a classified trace. A cancellation at the wrong instant could crash the
process or leave the caller suspended forever, and callers that gave up on queued work leaked it.
All three are fixed, one more unbounded wait is bounded, and the embedded ASN database is
refreshed.
No public API changes: swift package diagnose-api-breaking-changes v0.17.0 reports none.
Upgrading is a version bump, and it raises the SwiftIP2ASN floor to 0.5.2.
Bug fixes
- A cancelled call with a deadline no longer crashes the process. When the calling task was
cancelled in the instant between the bridge's cancellation check and arming its deadline timer,
the timer was created, cancelled and released without ever being resumed, which libdispatch
treats as a client bug and traps on (EXC_BREAKPOINTin_dispatch_queue_xref_dispose). Every
blocking call that carries a deadline went through this path. A downstream consumer saw it in
the field as rare crashes. The timer is now created only when it will be armed. - A call cancelled while it was being submitted no longer hangs forever. Blocking
lookups (reverse DNS, DNS and ASN queries, public-IP discovery during a classified trace) cross
one bridge onto a bounded executor. If the caller was cancelled in the short window while that bridge was
submitting the work, nothing was left to resume the caller: it stayed suspended permanently,
deadline or not. In a test that cancels 10,000 calls at varying moments, some never returned;
now all do. An operation that finishes for any reason resumes its caller if nothing else has. - Abandoned blocking calls are released. An operation whose caller gave up while it was
still queued, by cancellation or by deadline, was never freed, and a deadline that fired first
also kept its timer. During an outage, when queued lookups time out one after another, that was
one leaked operation per lookup. - A Team Cymru ASN lookup no longer waits without limit for a free worker. The DNS fallback
that.dnsand.hybriduse bounded each query once it was running, but not the time it spent
queued for one of the eight shared blocking-I/O slots. With every slot held by stalled resolver
calls from sibling tracers, ASN enrichment waited for as long as they stalled. Each lookup now
gives up three query timeouts after it is submitted (two server attempts, plus one timeout of
queueing) and that address is reported without ASN data, as it already is when the query itself
times out. This is one of the unbounded waits identified in #84; whether it is what holds
traceClassifiedpast 60 seconds in the field is not yet established.
Dependencies
- SwiftIP2ASN floor raised from 0.4.1 to 0.5.2. The embedded database, the default ASN source
since 0.17.0, moves to iptoasn data of 2026-11-02 (459,655 IPv4 and 119,798 IPv6 ranges across
86,901 ASNs). SwiftFTR's own API is unchanged. Callers that also import SwiftIP2ASN directly
should read its 0.5.0 notes:UltraCompactErrorgained avalidationFailed(_:)case, so an
exhaustiveswitchover it needs the new case.
Tooling
SendBurstDegradationTestsused a socket it had just closed as its "always fails" descriptor.
Under the parallel suite another test could be handed the same descriptor number, so the test
failed intermittently and could send probes on that other test's socket. It now uses a
descriptor that is never open (#86).- Probe tests force-unwrapped the round-trip time of a live probe, so an unreachable external test
site killed the test process with a trap instead of recording one failed expectation. They now
fail the expectation. - The self-hosted integration workflow uses
actions/checkout@v7, matching the other workflows.