Repository navigation
Prevent coalesced libuv wakes from stranding inbound reads - #8498
Merged
Amaury Chamayou (achamayou) merged 6 commits intoOct 5, 2026
Merged
Amaury Chamayou (achamayou) merged 6 commits into
Amaury Chamayou (achamayou) merged 6 commits into
Conversation
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Investigate missed admission-resumption wakeup with libuv
Prevent coalesced libuv wakes from stranding inbound reads
Oct 2, 2026
Amaury Chamayou (achamayou)
approved these changes
Oct 5, 2026
Amaury Chamayou (achamayou)
marked this pull request as ready for review
October 5, 2026 10:59
Copilot started reviewing on behalf of
Amaury Chamayou (achamayou)
October 5, 2026 11:00
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The concurrency-sensitive ordering around older libuv versions warrants final human review.
Review effort: Balanced
Findings: None
What changed in this PR
Prevents older libuv notification coalescing from leaving inbound reads paused.
Changes:
- Protects admission rechecks with the output queue mutex.
- Adds cross-interface socket regression coverage.
- Documents the ordering and prepares release 7.0.19.
Custom instructions used
.github/copilot-instructions.md.github/instructions/reviewing.instructions.md.github/instructions/changelog.instructions.md.github/skills/testing/SKILL.md
| File | Description |
|---|---|
src/tls/openssl_server.h |
Synchronizes recheck publication and consumption. |
src/tls/test/openssl_server_test.cpp |
Tests cross-interface budget resumption. |
doc/architecture/tls_internals.rst |
Documents the mutex ordering argument. |
CHANGELOG.md |
Adds the 7.0.19 fix entry. |
python/pyproject.toml |
Bumps the SDK version to 7.0.19. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Initialize recheck_all to false to satisfy cppcoreguidelines-init-variables. The queue-mutex-protected exchange still supplies its value before use, so admission wake ordering and runtime behavior are unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Eddy Ashton (eddyashton)
approved these changes
Oct 5, 2026
Amaury Chamayou (achamayou)
enabled auto-merge (squash)
October 5, 2026 13:36
Amaury Chamayou (achamayou)
deleted the
copilot/investigate-missed-admission-resumption
branch
October 5, 2026 14:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On libuv before 1.53, an admission wake can be coalesced after the callback has consumed its recheck flag, potentially leaving paused reads idle until another event. This is a portable liveness risk, not a reproduced failure or lost response data.
{ ccf::ds::MutexGuard g(self->out_mutex); self->recheck_read_interest = true; } self->wake();Verified libuv versions
Checked on 2026-10-05 against Microsoft's official x86_64 package repositories:
1.48.0-1.azl31.52.0-2.azl4For Azure Linux 3, the downloaded RPM header was queried with
rpm -qp. For Azure Linux 4, the installedlibuvandlibuv-develRPM versions,pkg-config --modversion libuv, and the loaded library'suv_version_string()all agreed with the published package. CCF's setup scripts install the distribution'slibuv-develwithout an exact version pin, so this table records the verified packages rather than a guarantee for every installed system.Both versions are below the 1.53 threshold discussed above. Their version-tagged upstream documentation explicitly warns that multiple
uv_async_send()calls before a callback can yield only one callback (libuv 1.48.0, libuv 1.52.0). Coalesced notifications are therefore relevant to both environments; this does not claim that the stalled-read failure has been reproduced.Closes #8436