Skip to content

Conversation

@tmds
Copy link
Member

@tmds tmds commented Sep 25, 2020

These retries cause masking cases where the operation and
dispose Task are never completing.

Fixes #42686 (comment)

@MihaZupan @antonfirsov ptal

These retries cause masking cases where the operation and
dispose Task are never completing.
@ghost
Copy link

ghost commented Sep 25, 2020

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

@antonfirsov antonfirsov left a comment

Choose a reason for hiding this comment

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

Wouldn't it be better to extend RetryHelper to detect fatal failures?

See:
1339f52

int msDelay = 100;
await RetryHelper.ExecuteAsync(async () =>
int retries = 10;
while (true)
Copy link
Contributor

Choose a reason for hiding this comment

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

                catch (SocketException se)
                {
                    // On connection timeout, retry.
                    Assert.NotEqual(SocketError.TimedOut, se.SocketErrorCode);

                    localSocketError = se.SocketErrorCode;
                }

The test fails here on Windows. Should do some more research on SocketError.TimedOut cases, but I think we should keep retrying here.

@antonfirsov
Copy link
Contributor

Fixes #42686 (comment)

I don't think that a possible test bug is the only concern in #42686.

@tmds
Copy link
Member Author

tmds commented Sep 29, 2020

I don't think that a possible test bug is the only concern in #42686.

Yes, this is only meant to fix the test bug.

@antonfirsov
Copy link
Contributor

antonfirsov commented Oct 6, 2020

@tmds what do you think about my idea regarding RetryHelper? If we could simplify the changes with that trick, and fix the Windows failure, I'm happy to proceed merging this.

@tmds
Copy link
Member Author

tmds commented Oct 6, 2020

@tmds what do you think about my idea regarding RetryHelper? If we could simplify the changes with that trick, and fix the Windows failure, I'm happy to proceed merging this.

I think you need to look at multiple tests to know whether it makes sense to extend the RetryHelper for this pattern.
I've moved the assert into the try-catch-retry section. It was the simplest way to fix the Windows failure.

@antonfirsov
Copy link
Contributor

/azp run runtime

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@antonfirsov
Copy link
Contributor

/azp run runtime

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@antonfirsov
Copy link
Contributor

/azp run runtime

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tmds
Copy link
Member Author

tmds commented Oct 15, 2020

Part of #42725.

@tmds tmds closed this Oct 15, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
@karelz karelz added this to the 6.0.0 milestone Jan 26, 2021
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.

Socket Dispose during synchronous operation hangs on RedHat 7

4 participants