Skip to content

Fix fd leak in Diagnostics Server and add better error handling - #39129

Merged
josalem merged 5 commits into
dotnet:masterfrom
josalem:dev/josalem/ipcstreamfactory-errorhandling
Jul 20, 2020
Merged

josalem merged 5 commits into
dotnet:masterfrom
josalem:dev/josalem/ipcstreamfactory-errorhandling

Conversation

@josalem

@josalem josalem commented Jul 10, 2020 •

Copy link
Copy Markdown
Contributor

The Diagnostics Server would call socket every time it attempted to connect to a reverse connection, but wouldn't call close on that fd if the subsequent connect failed. I believe this is what was causing test failures in CI (#38156). I have temporarily turned on these tests and moved them all back to Pri0 to test while this is in draft mode.

Turns reverse server testing back on.

I also increased the error handling for GetNextAvailableStream.

fixes #38156

CC @tommcdon @lateralusX @janvorli @BruceForstall @jashook @noahfalk @sywhang

@josalem josalem added this to the 5.0.0 milestone Jul 10, 2020
@josalem josalem self-assigned this Jul 10, 2020
@josalem

josalem commented Jul 11, 2020

Copy link
Copy Markdown
Contributor Author

Got one all green CI, but I'm going to run it again before marking for review. I noticed that the clean environment check in IpcTest has failed in a couple places, but I think it is a race condition with other CI tests running at the same time. I don't think it is worth validating that the environment is "clean" after deleting zombied pipes. I'll make that change in another PR to keep this one targeted.

@josalem

josalem commented Jul 11, 2020

Copy link
Copy Markdown
Contributor Author

/azp run runtime

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@josalem
josalem marked this pull request as ready for review July 11, 2020 22:17
Comment thread src/coreclr/src/vm/ipcstreamfactory.cpp Resolved
@josalem
josalem force-pushed the dev/josalem/ipcstreamfactory-errorhandling branch from 019c159 to 96f4b8d Compare July 14, 2020 23:28
@josalem

josalem commented Jul 15, 2020

Copy link
Copy Markdown
Contributor Author

Rebasing again to try and fix CI issues. They all appear to be unrelated to these changes, but they're preventing the pri0 tests from running on this PR. I think this change should go in for preview 8 snap this afternoon. There are a few previously clean CI runs in case we run up against the time limit.

@josalem
josalem force-pushed the dev/josalem/ipcstreamfactory-errorhandling branch from 96f4b8d to 3cefc2c Compare July 15, 2020 18:21
@josalem

josalem commented Jul 15, 2020

Copy link
Copy Markdown
Contributor Author

CoreCLR Pri0 Runtime Tests Run OSX x64 checked passed all tracing tests. Failure is a timeout in crossgen determinism. I believe this to be unrelated to these changes.

@josalem

josalem commented Jul 20, 2020

Copy link
Copy Markdown
Contributor Author

Remaining failures appear to be coming from Microsoft.Extensions.*.

@josalem
josalem merged commit 1ab372c into dotnet:master Jul 20, 2020
@josalem
josalem deleted the dev/josalem/ipcstreamfactory-errorhandling branch July 20, 2020 20:25
@BruceForstall

Copy link
Copy Markdown
Contributor

@josalem Should this fix #38843 and #38801?

@josalem

josalem commented Jul 21, 2020

Copy link
Copy Markdown
Contributor Author

Yes to #38843, but I'm not sure this would fix #38801. I'm still looking at that one.

</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/pauseonstart/pauseonstart/**">
<Issue>https://github.com/dotnet/runtime/issues/38847</Issue>
</ExcludeList>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This test is still failing

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The failure in your PR was fixed in #39686. If you rebase it should resolve those.

lateralusX added a commit to lateralusX/runtime that referenced this pull request Aug 25, 2020
Port of dotnet#39129.
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
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.

Test failure: tracing/eventpipe/reverse/reverse/reverse.sh

4 participants