Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[testing] Update TraceEvent package version and bypass corner case in EventPipe #1794

Merged
merged 3 commits into from
Jan 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/coreclr/dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!-- Tests/infrastructure dependency versions. -->
<PropertyGroup>
<XunitPerformanceApiPackageVersion>1.0.0-beta-build0015</XunitPerformanceApiPackageVersion>
<MicrosoftDiagnosticsTracingTraceEventPackageVersion>2.0.43</MicrosoftDiagnosticsTracingTraceEventPackageVersion>
<MicrosoftDiagnosticsTracingTraceEventPackageVersion>2.0.49</MicrosoftDiagnosticsTracingTraceEventPackageVersion>
<MicrosoftDiagnosticsToolsRuntimeClientVersion>1.0.4-preview6.19326.1</MicrosoftDiagnosticsToolsRuntimeClientVersion>
<CommandLineParserVersion>2.2.0</CommandLineParserVersion>

Expand Down
13 changes: 13 additions & 0 deletions src/coreclr/tests/src/tracing/eventpipe/common/IpcTraceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Collections.Concurrent;
using Microsoft.Diagnostics.Tracing;
using Microsoft.Diagnostics.Tools.RuntimeClient;
using System.Runtime.InteropServices;
Expand Down Expand Up @@ -173,6 +174,18 @@ private int Fail(string message = "")

private int Validate()
{
// FIXME: This is a bandaid fix for a deadlock in EventPipeEventSource caused by
// the lazy caching in the Regex library. The caching creates a ConcurrentDictionary
// and because it is the first one in the process, it creates an EventSource which
// results in a deadlock over a lock in EventPipe. These lines should be removed once the
// underlying issue is fixed by forcing these events to try to be written _before_ we shutdown.
//
// see: https://github.com/dotnet/runtime/pull/1794 for details on the issue
//
var emptyConcurrentDictionary = new ConcurrentDictionary<string, string>();
emptyConcurrentDictionary["foo"] = "bar";
var __count = emptyConcurrentDictionary.Count;

var isClean = EnsureCleanEnvironment();
if (!isClean)
return -1;
Expand Down