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

c-ares / c-ares / 28835446606
90%

Build:
DEFAULT BRANCH: main
Ran 07 Jul 2026 01:42AM UTC
Jobs 1
Files 176
Run time 1min
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

07 Jul 2026 01:39AM UTC coverage: 89.956% (-0.01%) from 89.969%
28835446606

push

github

web-flow
event: deliver failed-I/O completions in Win32 IOCP fallback (x86 event-thread hang) (#1247)

## Problem

The 32-bit Windows CI job (`MSVC x86 (CMake)`, built with
`-D_WIN32_WINNT=0x0501`) intermittently **hangs** on
`MockEventThreadTest.BulkCancel/WIN32_ipv4_ForceTCP` — it ran 2h06m
before being cancelled in run [28809396229 attempt
1](https://github.com/c-ares/c-ares/actions/runs/28809396229), while
`MSVC x64 (CMake)` passed in 4m. It is **x86-only** and rare (one hang
in 33 Windows runs; the only run ever re-run).

## Root cause

On builds where `_WIN32_WINNT < 0x0600` (the XP-compatible 32-bit
build), `GetQueuedCompletionStatusEx()` is unavailable and
`ares_event_win32.c` emulates it with a loop over
`GetQueuedCompletionStatus()`. That loop stops on **any** `FALSE`
return, but `GetQueuedCompletionStatus()` returns `FALSE` in two
different situations:

1. **No packet dequeued** (`lpOverlapped == NULL`) — timeout; stopping
is correct.
2. **A packet WAS dequeued for a *failed* I/O** (`lpOverlapped != NULL`)
— this is what an outstanding AFD POLL request delivers when its socket
is torn down (rapid connection cancel/reset). It must still be handled.

Dropping case 2 means `process_socket_event()` never runs for that
socket, so its AFD poll is never re-armed or cleaned up — stranding a
query waiting on it and hanging the event thread.
`GetQueuedCompletionStatusEx()` returns these failed-I/O entries in its
output array, which is why the 64-bit build never hangs.

## Regression scope — unreleased

The `GetQueuedCompletionStatus()` emulation was introduced with Windows
XP support in #960. That work is on **`main` only** and has **not
shipped in any release** (all releases are `v1.34.x`, built at the Vista
floor `0x0600`, which use the real `GetQueuedCompletionStatusEx()`).
**No released version is affected.**

## Fix

Distinguish the two `FALSE` cases via `lpOverlapped`, matching
`GetQueuedCompletionStatusEx()` semantics: deliver a dequeued packet
even wh... (continued)

24316 of 27031 relevant lines covered (89.96%)

24478.12 hits per line

Coverage Regressions

Lines Coverage ∆ File
5
89.75
-1.61% src/lib/record/ares_dns_name.c
Jobs
ID Job ID Ran Files Coverage
1 28835446606.1 07 Jul 2026 01:42AM UTC 176
89.96
GitHub Action Run
Source Files on build 28835446606
  • Tree
  • List 176
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28835446606
  • 17bd87cd on github
  • Prev Build on main (#28831603725)
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