diff --git a/src/coreclr/dependencies.props b/src/coreclr/dependencies.props index 6336b791dc580..06a25f2a47092 100644 --- a/src/coreclr/dependencies.props +++ b/src/coreclr/dependencies.props @@ -8,7 +8,7 @@ 1.0.0-beta-build0015 - 2.0.43 + 2.0.49 1.0.4-preview6.19326.1 2.2.0 diff --git a/src/coreclr/tests/src/tracing/eventpipe/common/IpcTraceTest.cs b/src/coreclr/tests/src/tracing/eventpipe/common/IpcTraceTest.cs index 54ec02ebdab6a..c10968f519683 100644 --- a/src/coreclr/tests/src/tracing/eventpipe/common/IpcTraceTest.cs +++ b/src/coreclr/tests/src/tracing/eventpipe/common/IpcTraceTest.cs @@ -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; @@ -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(); + emptyConcurrentDictionary["foo"] = "bar"; + var __count = emptyConcurrentDictionary.Count; + var isClean = EnsureCleanEnvironment(); if (!isClean) return -1;