Skip to content

Fix PerfWatson hang 1357805#7858

Closed
ocallesp wants to merge 2 commits into
dotnet:mainfrom
ocallesp:fixPerfwatsonHang1357805
Closed

Fix PerfWatson hang 1357805#7858
ocallesp wants to merge 2 commits into
dotnet:mainfrom
ocallesp:fixPerfwatsonHang1357805

Conversation

@ocallesp
Copy link
Copy Markdown
Contributor

@ocallesp ocallesp commented Jan 25, 2022

Fix AB#1357805

A hang was detected by the PerfWatson tool in VsSolutionEventListener.PrioritizedOnAfterOpenProject() when trying to get the ActiveWorkspaceProjectContext.

After an analysis with Windbg using the command !dumpasync we can see that many tasks are blocked waiting for _instanceTaskSource

Since this is not 100% reproducible, and we only have a coredump, we are just removing possible hangs in Task.GetAwaiter().GetResult().

Microsoft Reviewers: Open in CodeFlow

A hang was detected by the PerfWatson tool in VsSolutionEventListener.PrioritizedOnAfterOpenProject() when trying to get the ActiveWorkspaceProjectContext.

After an analysis with Windbg using the command !dumpasync we can see that many tasks are blocked waiting for _instanceTaskSource

Since this is not 100% reproducible, and we only have a coredump, we are just removing possible hangs in Task.GetAwaiter().GetResult().
@ocallesp ocallesp requested a review from a team as a code owner January 25, 2022 09:50
(_, initializeAsyncTask) = _instanceTaskSource.Task.GetAwaiter().GetResult();
}
// Should throw TaskCanceledException if already cancelled in Dispose
(T instance, JoinableTask initializeAsyncTask)? oldInstanceTask = await _instanceTaskSource.Task;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If the task is completed, isn't it safe to call GetAwaiter().GetResult()?

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.

Can GetAwaiter().GetResult() pattern block the main thread ? In the debugger this line is blocked.

@drewnoakes
Copy link
Copy Markdown
Member

we can see that many tasks are blocked waiting for _instanceTaskSource

Can you provide more details on this bit please?

This change appears to be replacing the lock with a semaphore, and it's not clear to me what this improves. Some more explanation here would be helpful.

@ocallesp
Copy link
Copy Markdown
Contributor Author

Coredump:
\Desktop-khhp4dg\shared\coredumps\PrioritizedOnAfterOpenProject(Watson1357805).hdmp

List of tasks that are blocked:

148f99a2960 <0> Microsoft.VisualStudio.Threading.ThreadingTools+d__9 @ 7ff8ba46f5b0
..148f99a2af0 <0> Microsoft.VisualStudio.ProjectSystem.VS.VsSafeProjectGuidService+d__5 @ 7ff86a51dc10
..148f99a2c70 <0> Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextProvider+d__8 @ 7ff86a51d4d0
..148f99a2dd8 <0> Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextProvider+d__5 @ 7ff86a51cbd0
..148f99a2f68 <0> Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextHost+WorkspaceProjectContextHostInstance+d__17 @ 7ff86a52f420
..148f99a30b8 <0> Microsoft.VisualStudio.ProjectSystem.OnceInitializedOnceDisposedAsync+<<-ctor>b__8_0>d @ 7ff8818c1040
..148f99a2448 <1> * Microsoft.VisualStudio.Threading.AsyncLazy+<>c__DisplayClass13_0+<b__0>d<System.Object> @ 7ff8ba4716c0
..148f99abd00 <0> Microsoft.VisualStudio.ProjectSystem.OnceInitializedOnceDisposedAsync+<>c__DisplayClass32_0+<b__0>d @ 7ff8818c2490

148f99a43e0 <0> Microsoft.VisualStudio.Threading.ThreadingTools+d__9 @ 7ff8ba46f5b0
..148f99a4570 <0> Microsoft.VisualStudio.ProjectSystem.VS.VsSafeProjectGuidService+d__5 @ 7ff86a51dc10
..148f99a46f0 <0> Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextProvider+d__8 @ 7ff86a51d4d0
..148f99a4858 <0> Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextProvider+d__5 @ 7ff86a51cbd0
..148f99a49e8 <0> Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextHost+WorkspaceProjectContextHostInstance+d__17 @ 7ff86a52f420
..148f99a4b38 <0> Microsoft.VisualStudio.ProjectSystem.OnceInitializedOnceDisposedAsync+<<-ctor>b__8_0>d @ 7ff8818c1040
..148f99a3f50 <1> * Microsoft.VisualStudio.Threading.AsyncLazy+<>c__DisplayClass13_0+<b__0>d<System.Object> @ 7ff8ba4716c0
..148f99aabc8 <0> Microsoft.VisualStudio.ProjectSystem.OnceInitializedOnceDisposedAsync+<>c__DisplayClass32_0+<b__0>d @ 7ff8818c2490

148f99a57d8 <-1> Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextProvider+d__5 @ 7ff86a51cbd0
..148f99a5968 <0> Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextHost+WorkspaceProjectContextHostInstance+d__17 @ 7ff86a52f420
..148f99a5ab8 <0> Microsoft.VisualStudio.ProjectSystem.OnceInitializedOnceDisposedAsync+<<-ctor>b__8_0>d @ 7ff8818c1040
..148f99a1f20 <1> * Microsoft.VisualStudio.Threading.AsyncLazy+<>c__DisplayClass13_0+<b__0>d<System.Object> @ 7ff8ba4716c0
..149798f3300 <0> Microsoft.VisualStudio.Threading.ThreadingTools+d__9 @ 7ff8ba46f5b0
..149798f3488 <0> Microsoft.VisualStudio.Threading.JoinableTask+d__76 @ 7ff8ba46c490
..149798f3608 <1> Microsoft.VisualStudio.ProjectSystem.AbstractMultiLifetimeComponent+d__3<Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextHost+WorkspaceProjectContextHostInstance> @ 7ff86a4f9da0
..149794f6cf8 <1> Microsoft.VisualStudio.ProjectSystem.LanguageServices.ActiveWorkspaceProjectContextHost+d__4 @ 7ff86a51add0

1497989e3a0 <0> Microsoft.VisualStudio.Threading.ThreadingTools+d__9 @ 7ff8ba46f5b0
..1497989e530 <0> Microsoft.VisualStudio.ProjectSystem.VS.VsSafeProjectGuidService+d__5 @ 7ff86a51dc10
..1497989e6b0 <0> Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextProvider+d__8 @ 7ff86a51d4d0
..1497989e818 <0> Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextProvider+d__5 @ 7ff86a51cbd0
..1497989e9a8 <0> Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextHost+WorkspaceProjectContextHostInstance+d__17 @ 7ff86a52f420
..1497989eaf8 <0> Microsoft.VisualStudio.ProjectSystem.OnceInitializedOnceDisposedAsync+<<-ctor>b__8_0>d @ 7ff8818c1040
..1497989dda0 <1> * Microsoft.VisualStudio.Threading.AsyncLazy+<>c__DisplayClass13_0+<b__0>d<System.Object> @ 7ff8ba4716c0
..149798a5168 <0> Microsoft.VisualStudio.ProjectSystem.OnceInitializedOnceDisposedAsync+<>c__DisplayClass32_0+<b__0>d @ 7ff8818c2490

1497989fe70 <0> Microsoft.VisualStudio.Threading.ThreadingTools+d__9 @ 7ff8ba46f5b0
..149798a0000 <0> Microsoft.VisualStudio.ProjectSystem.VS.VsSafeProjectGuidService+d__5 @ 7ff86a51dc10
..149798a0180 <0> Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextProvider+d__8 @ 7ff86a51d4d0
..149798a02e8 <0> Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextProvider+d__5 @ 7ff86a51cbd0
..149798a0478 <0> Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextHost+WorkspaceProjectContextHostInstance+d__17 @ 7ff86a52f420
..149798a05c8 <0> Microsoft.VisualStudio.ProjectSystem.OnceInitializedOnceDisposedAsync+<<-ctor>b__8_0>d @ 7ff8818c1040
..1497989f9f8 <1> * Microsoft.VisualStudio.Threading.AsyncLazy+<>c__DisplayClass13_0+<b__0>d<System.Object> @ 7ff8ba4716c0
..149798a46e8 <0> Microsoft.VisualStudio.ProjectSystem.OnceInitializedOnceDisposedAsync+<>c__DisplayClass32_0+<b__0>d @ 7ff8818c2490

148f99a2448 <1> * Microsoft.VisualStudio.Threading.AsyncLazy+<>c__DisplayClass13_0+<b__0>d<System.Object> @ 7ff8ba4716c0
..148f99a3868 <0> Microsoft.VisualStudio.Threading.JoinableTask+d__76 @ 7ff8ba46c490
..148f99a39d0 <0> Microsoft.VisualStudio.ProjectSystem.AbstractMultiLifetimeComponent+d__5<Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextHost+WorkspaceProjectContextHostInstance> @ 7ff86a4fa350
..148f99a3b18 <1> Microsoft.VisualStudio.ProjectSystem.AbstractMultiLifetimeComponent+d__4<Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextHost+WorkspaceProjectContextHostInstance> @ 7ff86a4fa0e0
..148f99ab740 <1> Microsoft.VisualStudio.ProjectSystem.ConfiguredProjectImplicitActivationTracking+ConfiguredProjectImplicitActivationTrackingInstance+d__12 @ 7ff86a526ca0
..148f99ab850 <0> Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim+d__5<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.ValueTuple<Microsoft.VisualStudio.ProjectSystem.IProjectCapabilitiesSnapshot,Microsoft.VisualStudio.ProjectSystem.IConfigurationGroup<Microsoft.VisualStudio.ProjectSystem.ProjectConfiguration>>>> @ 7ff8818c9810

148f99a3f50 <1> * Microsoft.VisualStudio.Threading.AsyncLazy+<>c__DisplayClass13_0+<b__0>d<System.Object> @ 7ff8ba4716c0
..148f99a52e8 <0> Microsoft.VisualStudio.Threading.JoinableTask+d__76 @ 7ff8ba46c490
..148f99a5450 <0> Microsoft.VisualStudio.ProjectSystem.AbstractMultiLifetimeComponent+d__5<Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextHost+WorkspaceProjectContextHostInstance> @ 7ff86a4fa350
..148f99a5598 <1> Microsoft.VisualStudio.ProjectSystem.AbstractMultiLifetimeComponent+d__4<Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextHost+WorkspaceProjectContextHostInstance> @ 7ff86a4fa0e0
..148f99aa608 <1> Microsoft.VisualStudio.ProjectSystem.ConfiguredProjectImplicitActivationTracking+ConfiguredProjectImplicitActivationTrackingInstance+d__12 @ 7ff86a526ca0
..148f99aa718 <0> Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim+d__5<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.ValueTuple<Microsoft.VisualStudio.ProjectSystem.IProjectCapabilitiesSnapshot,Microsoft.VisualStudio.ProjectSystem.IConfigurationGroup<Microsoft.VisualStudio.ProjectSystem.ProjectConfiguration>>>> @ 7ff8818c9810

148f99a1f20 <1> * Microsoft.VisualStudio.Threading.AsyncLazy+<>c__DisplayClass13_0+<b__0>d<System.Object> @ 7ff8ba4716c0
..148f99a6268 <0> Microsoft.VisualStudio.Threading.JoinableTask+d__76 @ 7ff8ba46c490
..148f99a63d0 <0> Microsoft.VisualStudio.ProjectSystem.AbstractMultiLifetimeComponent+d__5<Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextHost+WorkspaceProjectContextHostInstance> @ 7ff86a4fa350
..148f99a6518 <1> Microsoft.VisualStudio.ProjectSystem.AbstractMultiLifetimeComponent+d__4<Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextHost+WorkspaceProjectContextHostInstance> @ 7ff86a4fa0e0
..148f99abf58 <1> Microsoft.VisualStudio.ProjectSystem.ConfiguredProjectImplicitActivationTracking+ConfiguredProjectImplicitActivationTrackingInstance+d__12 @ 7ff86a526ca0
..148f99ac068 <0> Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim+d__5<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.ValueTuple<Microsoft.VisualStudio.ProjectSystem.IProjectCapabilitiesSnapshot,Microsoft.VisualStudio.ProjectSystem.IConfigurationGroup<Microsoft.VisualStudio.ProjectSystem.ProjectConfiguration>>>> @ 7ff8818c9810

1497989dda0 <1> * Microsoft.VisualStudio.Threading.AsyncLazy+<>c__DisplayClass13_0+<b__0>d<System.Object> @ 7ff8ba4716c0
..1497989f2a8 <0> Microsoft.VisualStudio.Threading.JoinableTask+d__76 @ 7ff8ba46c490
..1497989f410 <0> Microsoft.VisualStudio.ProjectSystem.AbstractMultiLifetimeComponent+d__5<Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextHost+WorkspaceProjectContextHostInstance> @ 7ff86a4fa350
..1497989f558 <1> Microsoft.VisualStudio.ProjectSystem.AbstractMultiLifetimeComponent+d__4<Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextHost+WorkspaceProjectContextHostInstance> @ 7ff86a4fa0e0
..149798a4b90 <1> Microsoft.VisualStudio.ProjectSystem.ConfiguredProjectImplicitActivationTracking+ConfiguredProjectImplicitActivationTrackingInstance+d__12 @ 7ff86a526ca0
..149798a4ca0 <0> Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim+d__5<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.ValueTuple<Microsoft.VisualStudio.ProjectSystem.IProjectCapabilitiesSnapshot,Microsoft.VisualStudio.ProjectSystem.IConfigurationGroup<Microsoft.VisualStudio.ProjectSystem.ProjectConfiguration>>>> @ 7ff8818c9810

1497989f9f8 <1> * Microsoft.VisualStudio.Threading.AsyncLazy+<>c__DisplayClass13_0+<b__0>d<System.Object> @ 7ff8ba4716c0
..149798a0d78 <0> Microsoft.VisualStudio.Threading.JoinableTask+d__76 @ 7ff8ba46c490
..149798a0ee0 <0> Microsoft.VisualStudio.ProjectSystem.AbstractMultiLifetimeComponent+d__5<Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextHost+WorkspaceProjectContextHostInstance> @ 7ff86a4fa350
..149798a1028 <1> Microsoft.VisualStudio.ProjectSystem.AbstractMultiLifetimeComponent+d__4<Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextHost+WorkspaceProjectContextHostInstance> @ 7ff86a4fa0e0
..149798a4128 <1> Microsoft.VisualStudio.ProjectSystem.ConfiguredProjectImplicitActivationTracking+ConfiguredProjectImplicitActivationTrackingInstance+d__12 @ 7ff86a526ca0
..149798a4238 <0> Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim+d__5<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.ValueTuple<Microsoft.VisualStudio.ProjectSystem.IProjectCapabilitiesSnapshot,Microsoft.VisualStudio.ProjectSystem.IConfigurationGroup<Microsoft.VisualStudio.ProjectSystem.ProjectConfiguration>>>> @ 7ff8818c9810

149798ef518 <0> Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.TreePublishingBatchService+d__14 @ 7ff86f6ed660
..149798ef680 <1> Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.TreeService+d__112 @ 7ff86f6de830
..149798ef910 <0> Microsoft.VisualStudio.Threading.JoinableTask+d__76 @ 7ff8ba46c490
..149798efaf0 <0> Microsoft.VisualStudio.ProjectSystem.VS.ProjectHostBridge+<>c__DisplayClass52_0+<b__2>d<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Tuple<Microsoft.VisualStudio.ProjectSystem.IProjectTreeSnapshot,Microsoft.VisualStudio.ProjectSystem.IProjectSnapshot,System.Collections.Generic.KeyValuePair<System.Collections.Immutable.IImmutableDictionary<System.String,Microsoft.VisualStudio.ProjectSystem.Properties.IProjectRuleSnapshot>,System.Int32>>>,Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.TreeService+TreeData,Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<Microsoft.VisualStudio.ProjectSystem.IProjectTreeServiceState>> @ 7ff871a21db0
..149798efc88 <0> Microsoft.VisualStudio.ProjectSystem.TransformBlockSlim+TransformManyBlockSlimAsync+d__3<System.Int32,Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<Microsoft.VisualStudio.ProjectSystem.IProjectTreeServiceState>> @ 7ff8818e38a0
..149798efdd0 <0> Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim+d__5<System.Int32> @ 7ff8818e2fb0

14978da0520.SwitchToMainThreadAsync
..14978da0800 <0> Microsoft.VisualStudio.ProjectSystem.VS.ProjectHostBridge+d__53<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>,Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.GlobalProjectCollectionXmlSyncBridge+ChangedProjectSnapshots,Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>> @ 7ff871a22380
..14978db1430 <0> Microsoft.VisualStudio.Threading.JoinableTask+d__76 @ 7ff8ba46c490
..14978db15f8 <0> Microsoft.VisualStudio.ProjectSystem.VS.ProjectHostBridge+<>c__DisplayClass52_0+<b__2>d<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>,Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.GlobalProjectCollectionXmlSyncBridge+ChangedProjectSnapshots,Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>> @ 7ff871a21db0
..14978db1790 <0> Microsoft.VisualStudio.ProjectSystem.TransformBlockSlim+TransformManyBlockSlimAsync+d__3<System.Int32,Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>> @ 7ff8818e38a0
..14978db18d8 <0> Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim+d__5<System.Int32> @ 7ff8818e2fb0

148f8b97d08.SwitchToMainThreadAsync
..148f8b97fe8 <0> Microsoft.VisualStudio.ProjectSystem.VS.ProjectHostBridge+d__53<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>,Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.GlobalProjectCollectionXmlSyncBridge+ChangedProjectSnapshots,Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>> @ 7ff871a22380
..148f8b985e8 <0> Microsoft.VisualStudio.Threading.JoinableTask+d__76 @ 7ff8ba46c490
..148f8b987b0 <0> Microsoft.VisualStudio.ProjectSystem.VS.ProjectHostBridge+<>c__DisplayClass52_0+<b__2>d<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>,Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.GlobalProjectCollectionXmlSyncBridge+ChangedProjectSnapshots,Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>> @ 7ff871a21db0
..148f8b98948 <0> Microsoft.VisualStudio.ProjectSystem.TransformBlockSlim+TransformManyBlockSlimAsync+d__3<System.Int32,Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>> @ 7ff8818e38a0
..148f8b98a90 <0> Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim+d__5<System.Int32> @ 7ff8818e2fb0

148f8b8c430.SwitchToMainThreadAsync
..148f8b8c710 <0> Microsoft.VisualStudio.ProjectSystem.VS.ProjectHostBridge+d__53<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>,Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.GlobalProjectCollectionXmlSyncBridge+ChangedProjectSnapshots,Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>> @ 7ff871a22380
..148f8b8cc88 <0> Microsoft.VisualStudio.Threading.JoinableTask+d__76 @ 7ff8ba46c490
..148f8b8ce50 <0> Microsoft.VisualStudio.ProjectSystem.VS.ProjectHostBridge+<>c__DisplayClass52_0+<b__2>d<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>,Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.GlobalProjectCollectionXmlSyncBridge+ChangedProjectSnapshots,Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>> @ 7ff871a21db0
..148f8b8cfe8 <0> Microsoft.VisualStudio.ProjectSystem.TransformBlockSlim+TransformManyBlockSlimAsync+d__3<System.Int32,Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>> @ 7ff8818e38a0
..148f8b8d130 <0> Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim+d__5<System.Int32> @ 7ff8818e2fb0

148f8b4f0b0.SwitchToMainThreadAsync
..148f8b4f3c0 <0> Microsoft.VisualStudio.ProjectSystem.VS.ProjectHostBridge+d__53<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>,Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.GlobalProjectCollectionXmlSyncBridge+ChangedProjectSnapshots,Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>> @ 7ff871a22380
..148f8b4f9c0 <0> Microsoft.VisualStudio.Threading.JoinableTask+d__76 @ 7ff8ba46c490
..148f8b4fb88 <0> Microsoft.VisualStudio.ProjectSystem.VS.ProjectHostBridge+<>c__DisplayClass52_0+<b__2>d<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>,Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.GlobalProjectCollectionXmlSyncBridge+ChangedProjectSnapshots,Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>> @ 7ff871a21db0
..148f8b4fd20 <0> Microsoft.VisualStudio.ProjectSystem.TransformBlockSlim+TransformManyBlockSlimAsync+d__3<System.Int32,Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>> @ 7ff8818e38a0
..148f8b4fe68 <0> Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim+d__5<System.Int32> @ 7ff8818e2fb0

148f8b3e848.SwitchToMainThreadAsync
..148f8b3eb10 <0> Microsoft.VisualStudio.ProjectSystem.VS.ProjectHostBridge+d__53<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>,Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.GlobalProjectCollectionXmlSyncBridge+ChangedProjectSnapshots,Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>> @ 7ff871a22380
..148f8b605d8 <0> Microsoft.VisualStudio.Threading.JoinableTask+d__76 @ 7ff8ba46c490
..148f8b607a0 <0> Microsoft.VisualStudio.ProjectSystem.VS.ProjectHostBridge+<>c__DisplayClass52_0+<b__2>d<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>,Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.GlobalProjectCollectionXmlSyncBridge+ChangedProjectSnapshots,Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>> @ 7ff871a21db0
..148f8b60938 <0> Microsoft.VisualStudio.ProjectSystem.TransformBlockSlim+TransformManyBlockSlimAsync+d__3<System.Int32,Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.Build.Construction.ProjectRootElement>>> @ 7ff8818e38a0
..148f8b60a80 <0> Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim+d__5<System.Int32> @ 7ff8818e2fb0

148f98fde68 <0> Microsoft.VisualStudio.Threading.ThreadingTools+d__9 @ 7ff8ba46f5b0
..148f98fdff0 <0> Microsoft.VisualStudio.ProjectSystem.LanguageServices.ActiveWorkspaceProjectContextHost+d__4 @ 7ff86a51add0

149794f1c58 <0> Microsoft.VisualStudio.Threading.ThreadingTools+d__9 @ 7ff8ba46f5b0
..149794f1de0 <0> Microsoft.VisualStudio.ProjectSystem.LanguageServices.ActiveWorkspaceProjectContextHost+d__4 @ 7ff86a51add0

149794f3390 <0> Microsoft.VisualStudio.Threading.ThreadingTools+d__9 @ 7ff8ba46f5b0
..149794f3518 <0> Microsoft.VisualStudio.ProjectSystem.LanguageServices.ActiveWorkspaceProjectContextHost+d__4 @ 7ff86a51add0

14979790410 <0> Microsoft.VisualStudio.Threading.ThreadingTools+d__9 @ 7ff8ba46f5b0
..14979790598 <0> Microsoft.VisualStudio.ProjectSystem.LanguageServices.ActiveWorkspaceProjectContextHost+d__4 @ 7ff86a51add0

148f9a0d988 <0> Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectConfigHostBridge+d__53 @ 7ff86f69a980
148f9a320f0 <0> Microsoft.VisualStudio.Threading.JoinableTaskCollection+d__20 @ 7ff8ba46c930
-- Thread TID:[2dce8] - JoinableTask: 148fc853a78 SynchronouslyBlockingMainThread

14977bf9ac8 <0> Microsoft.VisualStudio.RemoteSettings.TargetedNotificationsProviderBase+d__29 @ 7ff8b244c0a0
14977d049c0 <0> Microsoft.VisualStudio.Threading.JoinableTask+d__76 @ 7ff8ba46c490
14977d04bb8 <0> Microsoft.VisualStudio.Threading.JoinableTask+d__76 @ 7ff8ba46c490
14977d23700 <0> Microsoft.VisualStudio.Threading.NonConcurrentSynchronizationContext+d__12 @ 7ff8ba46d600
1497822ce28 <0> Microsoft.VisualStudio.Threading.JoinableTask+d__76 @ 7ff8ba46c490
1497822cfc0 <0> Microsoft.VisualStudio.Threading.JoinableTask+d__76 @ 7ff8ba46c490
148f7f8ded8 <0> Nerdbank.Streams.PipeExtensions+<>c__DisplayClass8_0+<b__0>d @ 7ff8b4e231b0
149786bc5e8 <0> Nerdbank.Streams.PipeExtensions+<>c__DisplayClass8_0+<b__0>d @ 7ff8b4e231b0
149789fd088 <0> Nerdbank.Streams.PipeExtensions+<>c__DisplayClass8_0+<b__0>d @ 7ff8b4e231b0
14978a00ba0 <0> Microsoft.VisualStudio.Threading.NonConcurrentSynchronizationContext+d__12 @ 7ff8ba46d600
148f863ec30 <0> Nerdbank.Streams.PipeExtensions+<>c__DisplayClass8_0+<b__0>d @ 7ff8b4e231b0
148f862d6b8 <0> Nerdbank.Streams.PipeExtensions+<>c__DisplayClass8_0+<b__0>d @ 7ff8b4e231b0
148f863ede0 <0> Nerdbank.Streams.PipeExtensions+<>c__DisplayClass20_0+<b__2>d @ 7ff8b4e275b0
148f8637778 <0> Nerdbank.Streams.PipeExtensions+<>c__DisplayClass20_0+<b__2>d @ 7ff8b4e275b0
14978a372d8 <0> Nerdbank.Streams.PipeExtensions+<>c__DisplayClass8_0+<b__0>d @ 7ff8b4e231b0
148f863eab0 <0> Nerdbank.Streams.PipeExtensions+<>c__DisplayClass8_0+<b__0>d @ 7ff8b4e231b0
14978a38dc8 <0> Nerdbank.Streams.PipeExtensions+<>c__DisplayClass20_0+<b__2>d @ 7ff8b4e275b0
148f86725f0 <0> Nerdbank.Streams.PipeExtensions+<>c__DisplayClass8_0+<b__0>d @ 7ff8b4e231b0
14978aed2c0 <0> Nerdbank.Streams.PipeExtensions+<>c__DisplayClass20_0+<b__2>d @ 7ff8b4e275b0
14978aea318 <0> Microsoft.VisualStudio.Threading.NonConcurrentSynchronizationContext+d__12 @ 7ff8ba46d600
14978af35e8 <0> Microsoft.VisualStudio.Threading.NonConcurrentSynchronizationContext+d__12 @ 7ff8ba46d600
14978ba54a8 <0> Microsoft.VisualStudio.Threading.NonConcurrentSynchronizationContext+d__12 @ 7ff8ba46d600
14978ba2510 <0> Nerdbank.Streams.PipeExtensions+<>c__DisplayClass8_0+<b__0>d @ 7ff8b4e231b0
14978ba26c0 <0> Nerdbank.Streams.PipeExtensions+<>c__DisplayClass20_0+<b__2>d @ 7ff8b4e275b0
148f89c9818 <0> Nerdbank.Streams.PipeExtensions+<>c__DisplayClass8_0+<b__0>d @ 7ff8b4e231b0
14978d09100 <0> Microsoft.VisualStudio.Shell.Connected.ConnectedUser.SqmLogger+d__3 @ 7ff88b548560
14978d60f40 <0> Microsoft.VisualStudio.Threading.NonConcurrentSynchronizationContext+d__12 @ 7ff8ba46d600
149795a3718 <1> Microsoft.VisualStudio.OperationProgress.OperationProgressStageUpdater+d__9 @ 7ff88c0e01d0

Copy link
Copy Markdown
Member

@davkean davkean left a comment

Choose a reason for hiding this comment

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

This does not fix the hang, this is caused by the active workspace context host waiting on the wrong configuration and nothing to do with guarding the wait. Please sync with me offline before attempting to fix this.

@ocallesp ocallesp closed this Jan 31, 2022
@ocallesp
Copy link
Copy Markdown
Contributor Author

This w as a bug in MEF and here is the fix microsoft/vs-mef#294

@ocallesp ocallesp deleted the fixPerfwatsonHang1357805 branch January 31, 2022 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants