• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

c-ares / c-ares / 28594042315
90%

Build:
DEFAULT BRANCH: main
Ran 02 Jul 2026 01:35PM UTC
Jobs 1
Files 177
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Jul 2026 01:32PM UTC coverage: 91.551% (+0.004%) from 91.547%
28594042315

push

github

web-flow
test: fix OpenBSD CI hang in MockTCPChannelTest.ReadFullFrameThenDisconnect (#1177)

## Problem

Every OpenBSD CI job hangs and is killed at GitHub's 6-hour ceiling. The
hang is deterministic and identical across every branch (including
`main`): `arestest` prints

```
[ RUN      ] AddressFamilies/MockTCPChannelTest.ReadFullFrameThenDisconnect/ipv4
```

and never returns. NetBSD, macOS and Linux all pass, so this is
OpenBSD-specific, not BSD-wide. (The `WARNING: clock gained 810 days` in
the OpenBSD logs is unrelated — it's just the VM image noticing the host
clock.)

## Root cause — a single-threaded test-harness deadlock, not a library
bug

The mock DNS server runs **synchronously in the same thread** as the
c-ares client: `ProcessWork` → `select()` → `ProcessFD` →
`ProcessRequest`. The client's `ares_process` only runs *after*
`ProcessFD` returns, so the client can drain a socket *between* the
server's sends, never *during* one.

`MakeMaxReadTcpAReply()` (added in #1138, and used by this one test
only) builds a reply whose TCP frame is exactly **65535 octets** to
exercise the `read_again` path. The mock server writes it with a
**single blocking `sendto()`** on a **blocking** `accept()`ed socket
that has no `SO_SNDBUF` tuning.

`send()` returns only once the data is copied into the kernel send
buffer, which requires `server_sndbuf + client_rcvbuf ≥ 65535`. c-ares
tunes neither buffer, so:

- **Linux / macOS / NetBSD** — large default loopback buffers hold the
whole frame → `send()` returns → test passes.
- **OpenBSD** — ~16k default buffers can't hold 65535 bytes → `send()`
blocks waiting for the client to drain — but the client can't run
because it's the same thread stuck in `send()`. **Permanent deadlock** →
6h timeout.

The `#1138` deferred disconnect-handling change that introduced this
test is correct; only the harness's assumption that a full-size reply
can be written in one blocking `send()` is wrong on small-socket-buffer
platforms.

## Fix

... (continued)

2 of 2 new or added lines in 1 file covered. (100.0%)

23751 of 25943 relevant lines covered (91.55%)

12315.6 hits per line

Jobs
ID Job ID Ran Files Coverage
1 28594042315.1 02 Jul 2026 01:35PM UTC 935
61.6
GitHub Action Run
Source Files on build 28594042315
  • Tree
  • List 177
  • Changed 55
  • Source Changed 0
  • Coverage Changed 55
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 87c89570 on github
  • Prev Build on main (#28591372674)
  • Next Build on main (#28628343107)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc