Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

SqlClient fix managed MARS timeout cancellation #38266

Merged
merged 2 commits into from
Oct 15, 2019

Conversation

Wraith2
Copy link
Contributor

@Wraith2 Wraith2 commented Jun 5, 2019

fixes dotnet/SqlClient#108

When a disconnection event occurs using the managed sql network interface (unix and uwp) the error is incorrectly propagated to the receive completion callback which causes an assertion in debug mode and possible unknown bad things in release mode which may contribute to the observed instability of the unix version. This PR adds a check for a property on the packet which is only set when the connection is in a correct state for receiving packets.

Third attempt at this fix now with enhanced knowledge from the SQL team so hopefully this one is the last one. Manual and functional tests pass including those re-enabled in this PR.

/cc @afsanehr, @Gary-Zh , @David-Engel and @saurabh500 (whose implementation and knowlege this is based on)

@karelz karelz added this to the 5.0 milestone Aug 3, 2019
@cheenamalhotra
Copy link
Member

@Wraith2 This PR is being tracked and will be picked up for dotnet/SqlClient. Appreciate your patience for some more time while we come back to review and merge your contributions! 🙏

@safern
Copy link
Member

safern commented Sep 30, 2019

@cheenamalhotra what is the status of this PR?

@safern
Copy link
Member

safern commented Oct 8, 2019

/azp run corefx-ci

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@danmoseley
Copy link
Member

/azp run corefx-ci

@cheenamalhotra can this be merged now?

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@danmoseley
Copy link
Member

/azp run corefx-ci

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@danmoseley
Copy link
Member

@safern why is "corefx-ci (Windows x64_Debug) " not resetting -- is this a dead leg?

@safern
Copy link
Member

safern commented Oct 15, 2019

Yes, I believe the name of the leg changed. The hash of the commit would need to be reset, because GitHub stores the state of the bashes based on the head hash, since it didn't change it and there is no new leg overriding that bash by name, it preserves it. You can look at the build for this PR here:

https://dev.azure.com/dnceng/public/_build/results?buildId=388002

@danmoseley
Copy link
Member

Oh in the case we can just ignore it then.

@safern
Copy link
Member

safern commented Oct 15, 2019

@safern safern merged commit 3d16a2b into dotnet:master Oct 15, 2019
@Wraith2 Wraith2 deleted the sqlbug-108 branch July 13, 2020 13:28
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Add check for completion callback in Mars connection to prevent invalid callback conditions propagating.

* address feedback


Commit migrated from dotnet/corefx@3d16a2b
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SqlClient ManualTest MARSSyncTimeoutTest fails in managed mode
6 participants