Skip to content

Conversation

@guhetier
Copy link
Collaborator

@guhetier guhetier commented Dec 17, 2025

Description

CxPlatDataPathSocketProcessAcceptCompletion can race with CxPlatSocketDelete if the test code delete the socket right after it receive the "accept" callback.

CxPlatSocketDelete doesn't wait on the rundown ref when IoStarted is not true (I don't know why, and I wonder if we couldn't simply remove that special case, but that is out of scope of this PR).

This would allow a socket to be already in the "uninitialzed" state when then end of CxPlatDataPathSocketProcessAcceptCompletion tries to post the first receive SQE on it.

Fixes #5679

Testing

CI. The failure was observed regularly on recent PR CI runs but is not consistent, so we may have to keep an eye for a time.

Documentation

N/A

@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.93%. Comparing base (3bb7b41) to head (0b58f5e).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5678      +/-   ##
==========================================
+ Coverage   85.57%   85.93%   +0.36%     
==========================================
  Files          60       60              
  Lines       18663    18663              
==========================================
+ Hits        15970    16038      +68     
+ Misses       2693     2625      -68     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@guhetier guhetier marked this pull request as ready for review December 17, 2025 22:24
@guhetier guhetier requested a review from a team as a code owner December 17, 2025 22:24
// otherwise the cleanup might not wait for the rundown.
//
AcceptSocketProc->IoStarted = TRUE;
if (!CxPlatRundownAcquire(&AcceptSocketProc->RundownRef)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it fails to acquire the rundown, it means the socket is being shutdown, and the IO should be canceled, and IoStarted should be set to false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI - FAILURE] ConnectTcp fails

3 participants