You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.AppDomainUnloadedException: The application domain in which the thread was running has been unloaded.
Server stack trace:
at System.Threading.Thread.InternalCrossContextCallback(Context ctx, IntPtr ctxID, Int32 appDomainID, InternalCrossContextDelegate ftnToCall, Object[] args)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatch(Byte[] reqStmBuff, SmuggledMethodCallMessage smuggledMcm, SmuggledMethodReturnMessage& smuggledMrm)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.SyncProcessMessage(IMessage reqMsg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Build.Framework.IMetadataContainer.EnumerateMetadata()
at Microsoft.Build.Framework.ITaskItemExtensions.EnumerateMetadata(ITaskItem taskItem)
at Microsoft.Build.Framework.TaskParameterEventArgs.WriteMetadata(BinaryWriter writer, ITaskItem taskItem)
at Microsoft.Build.Framework.TaskParameterEventArgs.WriteItem(BinaryWriter writer, Object item)
at Microsoft.Build.Framework.TaskParameterEventArgs.WriteItems(BinaryWriter writer, IList items)
at Microsoft.Build.Framework.TaskParameterEventArgs.WriteToStream(BinaryWriter writer)
at Microsoft.Build.Shared.LogMessagePacketBase.WriteToStream(ITranslator translator)
at Microsoft.Build.Shared.LogMessagePacketBase.Translate(ITranslator translator)
at Microsoft.Build.BackEnd.NodeEndpointOutOfProcBase.RunReadLoop(Stream localReadPipe, Stream localWritePipe, ConcurrentQueue`1 localPacketQueue, AutoResetEvent localPacketAvailable, AutoResetEvent localTerminatePacketPump)
Fixes#6379
We have a situation where we are in a worker node and a task runs in a separate AppDomain and logs a TaskParameterEventArgs. Since logging is asynchronous there's a risk that by the time the node packet translator accesses the TaskParameterEventArgs.Items the AppDomain is already unloaded and we crash when trying to enumerate item metadata.
Detect that we're in another AppDomain and eagerly take a snapshot of task items with all metadata.
Fixes#6379
We have a situation where we are in a worker node and a task runs in a separate AppDomain and logs a TaskParameterEventArgs. Since logging is asynchronous there's a risk that by the time the node packet translator accesses the TaskParameterEventArgs.Items the AppDomain is already unloaded and we crash when trying to enumerate item metadata.
Detect that we're in another AppDomain and eagerly take a snapshot of task items with all metadata.
Original Feedback Ticket: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1314638 (the "Move to Github") button failed)
Issue Description
Caused by #6155 /cc: @KirillOsenkov
Stack Trace
Versions & Configurations
Build Number: 16.10.31213.239
Product Version: 16.10.0-preview-2.0
The text was updated successfully, but these errors were encountered: