DebugDiag内存转储分析,以确定IIS崩溃的原因?

时间:2016-09-30 08:51:12

标签: .net entity-framework iis serialization debugdiag

我们在IIS中托管了许多带有WPF前端的WCF服务。 有时IIS会崩溃,看起来是序列化错误,但不确定哪个或哪个对象失败。我们怀疑它是实体框架对象集合的序列化(具有导航属性等),但是在内部测试时,所讨论的对象序列化很好。 IIS每天可能会在现场崩溃一次/两次。有问题的对象被最终用户大量使用,这让我相信如果这是一个真正的序列化错误,那么我们会看到每次WCF上的序列化失败?它可能只是在某些情况下失败,或者是否会导致IIS像这样崩溃?我们发现这很难追查。

来自来源' WAS'

的事件日志中有一个条目
  

为应用程序池提供服务的流程' xxx'遭受了致命的打击   Windows进程激活服务的通信错误。该   流程ID为' 1016'。数据字段包含错误编号。

这是使用DebugDiag工具捕获的内存转储/堆栈跟踪。

  

以下主题   w3wp__appPoolName__PID__2932__Date__09_29_2016__Time_01_00_26PM__964__Ntdll!ZwTerminateProcess.dmp正在调用TerminateProcess函数来终止进程

     

(39)

     

2,13%的线程被阻止(1个线程)

     

请查看线程的callstack以了解它正在做什么   这最终会调用TerminateProcess函数

     

第39号线 - 系统ID 4564

     

入口点clr!GetPrivateContextsPerfCounters + 16f00创建时间
  29.09.2016 12:59:25在用户模式下花费的时间0天00:00:08.125在内核模式下花费的时间0天00:00:00.000

     

这个线程调用TerminateProcess函数来终止   过程

     

该线程在堆栈上有.net异常的证据。检查   以前的.NET异常报告(所有.NET线程堆栈中的异常)   查看相关异常的更多细节

     

.NET调用堆栈

     

[[FaultingExceptionFrame]]   System_Runtime_Serialization_ni!System.Xml.XmlBaseWriter.WriteStartElement(System.String,   System.Xml.XmlDictionaryString,System.Xml.XmlDictionaryString)+ 3b   System_Runtime_Serialization_ni!System.Runtime.Serialization.XmlWriterDelegator.WriteStartElement(System.String,   System.Xml.XmlDictionaryString,System.Xml.XmlDictionaryString)+23   DynamicClass。的收件实体名称 toxml用于(System.Runtime.Serialization.XmlWriterDelegator,   System.Object的,   System.Runtime.Serialization.XmlObjectSerializerWriteContext,   System.Runtime.Serialization.ClassDataContract)+ 14b9   System_Runtime_Serialization_ni!System.Runtime.Serialization.ClassDataContract.WriteXmlValue(System.Runtime.Serialization.XmlWriterDelegator,   System.Object的,   System.Runtime.Serialization.XmlObjectSerializerWriteContext)+31   System_Runtime_Serialization_ni!System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeAndVerifyType(System.Runtime.Serialization.DataContract,   System.Runtime.Serialization.XmlWriterDelegator,System.Object,   Boolean,System.RuntimeTypeHandle,System.Type)+ eb   System_Runtime_Serialization_ni!System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithXsiType(System.Runtime.Serialization.XmlWriterDelegator,   System.Object,System.RuntimeTypeHandle,System.Type,Int32,   System.RuntimeTypeHandle,System.Type)+309   System_Runtime_Serialization_ni!System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(System.Runtime.Serialization.XmlWriterDelegator,   System.Object,Boolean,Boolean,Int32,   System.RuntimeTypeHandle)247897   System_Runtime_Serialization_ni!System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference(System.Runtime.Serialization.XmlWriterDelegator,   System.Object,Boolean,Boolean,Int32,System.RuntimeTypeHandle)+ 6f   DynamicClass.WriteObjectListToXml(System.Runtime.Serialization.XmlWriterDelegator,   System.Object的,   System.Runtime.Serialization.XmlObjectSerializerWriteContext,   System.Runtime.Serialization.CollectionDataContract)+ 1AA   System_Runtime_Serialization_ni!System.Runtime.Serialization.CollectionDataContract.WriteXmlValue(System.Runtime.Serialization.XmlWriterDelegator,   System.Object的,   System.Runtime.Serialization.XmlObjectSerializerWriteContext)+41   System_Runtime_Serialization_ni!System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(System.Runtime.Serialization.XmlWriterDelegator,   System.Object,Boolean,Boolean,Int32,System.RuntimeTypeHandle)+ 6f   System_Runtime_Serialization_ni!System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference(System.Runtime.Serialization.XmlWriterDelegator,   System.Object,Boolean,Boolean,Int32,System.RuntimeTypeHandle)+ 6f   DynamicClass.WriteKeyValueOfstringObjectListtGI2ndrTToXml(System.Runtime.Serialization.XmlWriterDelegator,   System.Object的,   System.Runtime.Serialization.XmlObjectSerializerWriteContext,   System.Runtime.Serialization.ClassDataContract)+176   System_Runtime_Serialization_ni!System.Runtime.Serialization.ClassDataContract.WriteXmlValue(System.Runtime.Serialization.XmlWriterDelegator,   System.Object的,   System.Runtime.Serialization.XmlObjectSerializerWriteContext)+31   DynamicClass.WriteObjectsRemovedFromCollectionPropertiesToXml(System.Runtime.Serialization.XmlWriterDelegator,   System.Object的,   System.Runtime.Serialization.XmlObjectSerializerWriteContext,   System.Runtime.Serialization.CollectionDataContract)+ 1A1   System_Runtime_Serialization_ni!System.Runtime.Serialization.CollectionDataContract.WriteXmlValue(System.Runtime.Serialization.XmlWriterDelegator,   System.Object的,   System.Runtime.Serialization.XmlObjectSerializerWriteContext)+41   System_Runtime_Serialization_ni!System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(System.Runtime.Serialization.XmlWriterDelegator,   System.Object,Boolean,Boolean,Int32,System.RuntimeTypeHandle)+ 6f   System_Runtime_Serialization_ni!System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference(System.Runtime.Serialization.XmlWriterDelegator,   System.Object,Boolean,Boolean,Int32,System.RuntimeTypeHandle)+ 6f   DynamicClass.WriteEntityChangeTrackerToXml(System.Runtime.Serialization.XmlWriterDelegator,   System.Object的,   System.Runtime.Serialization.XmlObjectSerializerWriteContext,   System.Runtime.Serialization.ClassDataContract)+ 31A   System_Runtime_Serialization_ni!System.Runtime.Serialization.ClassDataContract.WriteXmlValue(System.Runtime.Serialization.XmlWriterDelegator,   System.Object的,   System.Runtime.Serialization.XmlObjectSerializerWriteContext)+31   System_Runtime_Serialization_ni!System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(System.Runtime.Serialization.XmlWriterDelegator,   System.Object,Boolean,Boolean,Int32,System.RuntimeTypeHandle)+ 6f ...

...序列化继续这样,然后是......

  

... System_ServiceModel_ni!System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(System.ServiceModel.Channels.RequestContext,   Boolean,System.ServiceModel.OperationContext)+ 7d7   System_ServiceModel_ni!System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(System.ServiceModel.Channels.RequestContext,   System.ServiceModel.OperationContext)+ 1FF   System_ServiceModel_ni!System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(System.IAsyncResult)+ DB   System_ServiceModel_Internals_ni!System.Runtime.Fx + AsyncThunk.UnhandledExceptionFrame(System.IAsyncResult)+32   System_ServiceModel_Internals_ni!System.Runtime.AsyncResult.Complete(布尔)+ 19E   System_ServiceModel_ni!System.ServiceModel.Channels.TransportDuplexSessionChannel + TryReceiveAsyncResult.OnReceive(System.IAsyncResult)+ 11D   System_ServiceModel_Internals_ni!System.Runtime.Fx + AsyncThunk.UnhandledExceptionFrame(System.IAsyncResult)+32   System_ServiceModel_Internals_ni!System.Runtime.AsyncResult.Complete(布尔)+ 19E   System_ServiceModel_ni!System.ServiceModel.Channels.SynchronizedMessageSource + ReceiveAsyncResult.OnReceiveComplete(System.Object的)+82   System_ServiceModel_ni!System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(System.Object的)+170   System_ServiceModel_ni!System.ServiceModel.Channels.SocketConnection.OnReceiveAsync(System.Object的,   System.Net.Sockets.SocketAsyncEventArgs)+ FD   System_ni!System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(System.Net.Sockets.SocketError,   Int32,System.Net.Sockets.SocketFlags)+ bd5   System_ni!System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32的,   UInt32,System.Threading.NativeOverlapped *)+ 40   mscorlib_ni!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32的,   UInt32,System.Threading.NativeOverlapped *)+ 96 [[GCFrame]]   [[DebuggerU2MCatchHandlerFrame]] [[ContextTransitionFrame]]   [[DebuggerU2MCatchHandlerFrame]]

完整堆栈跟踪

  

System_Core_ni!System.Linq.Expressions.ConstantExpression.Make(System.Object的,   System.Type的)+69   System.Data.Entity.Core.Objects.ELinq.ExpressionConverter + ConstantTranslator.TypedTranslate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter,   System.Linq.Expressions.ConstantExpression)+ 12d 0x000000dc 6cf0c5d0 clr!GetMetaDataPublicInterfaceFromInternal+3c494 System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.TranslateExpression(System.Linq.Expressions.Expression)+ae System.Data.Entity.Core.Objects.ELinq.ExpressionConverter+MethodCallTranslator+ContainsTranslator.TranslateContains(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter, System.Linq.Expressions.Expression, System.Linq.Expressions.Expression)+46 System.Data.Entity.Core.Objects.ELinq.ExpressionConverter+MethodCallTranslator.TypedTranslate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter, System.Linq.Expressions.MethodCallExpression)+d3 System.Data.Entity.Core.Objects.ELinq.ExpressionConverter+BinaryTranslator.TypedTranslate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter, System.Linq.Expressions.BinaryExpression)+132 System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.TranslateExpression(System.Linq.Expressions.Expression)+ae System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.TranslateLambda(System.Linq.Expressions.LambdaExpression, System.Data.Entity.Core.Common.CommandTrees.DbExpression)+7e System.Data.Entity.Core.Objects.ELinq.ExpressionConverter+MethodCallTranslator+OneLambdaTranslator.Translate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter, System.Linq.Expressions.MethodCallExpression, System.Data.Entity.Core.Common.CommandTrees.DbExpression ByRef, System.Data.Entity.Core.Common.CommandTrees.DbExpressionBinding ByRef, System.Data.Entity.Core.Common.CommandTrees.DbExpression ByRef)+eb System.Data.Entity.Core.Objects.ELinq.ExpressionConverter+MethodCallTranslator+OneLambdaTranslator.Translate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter, System.Linq.Expressions.MethodCallExpression)+3d System.Data.Entity.Core.Objects.ELinq.ExpressionConverter+MethodCallTranslator.TypedTranslate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter, System.Linq.Expressions.MethodCallExpression)+d3 System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.TranslateExpression(System.Linq.Expressions.Expression)+ae System.Data.Entity.Core.Objects.ELinq.ExpressionConverter+MethodCallTranslator+SelectTranslator.Translate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter, System.Linq.Expressions.MethodCallExpression)+65 System.Data.Entity.Core.Objects.ELinq.ExpressionConverter+MethodCallTranslator.TypedTranslate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter, System.Linq.Expressions.MethodCallExpression)+d3 System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.Convert()+a2 System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan(System.Nullable 1)+128   System.Data.Entity.Core.Objects.ObjectQuery 1+<>c__DisplayClass3[[System.__Canon, mscorlib]].<GetResults>b__2()+27 System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[[System.__Canon, mscorlib]](System.Func 1,   System.Data.Entity.Infrastructure.IDbExecutionStrategy,Boolean,   布尔)+110 [[StubHelperFrame]]   System.Data.Entity.Core.Objects.ObjectQuery 1+<>c__DisplayClass3[[System.__Canon, mscorlib]].<GetResults>b__1()+ef System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[[System.__Canon, mscorlib]](System.Func 1)+ 3b中   System.Data.Entity.Core.Objects.ObjectQuery 1[[System.__Canon, mscorlib]].GetResults(System.Nullable 1)170   System.Data.Entity.Core.Objects.ObjectQuery 1[[System.__Canon, mscorlib]].<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()+b System.Data.Entity.Internal.LazyEnumerator 1 [[系统.__佳能,   mscorlib程序]。的MoveNext()+ 32   mscorlib_ni!System.Collections.Generic.List 1[[System.__Canon, mscorlib]]..ctor(System.Collections.Generic.IEnumerable 1)+218   System_Core_ni!System.Linq.Enumerable.ToList [系统.__佳能,   mscorlib程序] +50   ** ** Repository.MethodName(System.Collections.Generic.List1)1626   的 ServiceName.MethodName (System.Collections.Generic.List`1)18   DynamicClass.SyncInvoke的方法名(System.Object的,   System.Object [],System.Object [])+ 7a   System_ServiceModel_ni!System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(System.Object的,   System.Object [],System.Object [] ByRef)+ 6a4   System_ServiceModel_ni!System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(System.ServiceModel.Dispatcher.MessageRpc   为ByRef)+505   System_ServiceModel_ni!System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(System.ServiceModel.Dispatcher.MessageRpc   为ByRef)+110   System_ServiceModel_ni!System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(System.ServiceModel.Dispatcher.MessageRpc   为ByRef)+ 17B   System_ServiceModel_ni!System.ServiceModel.Dispatcher.MessageRpc.Process(布尔)+ 17E   System_ServiceModel_ni!System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(System.ServiceModel.Channels.RequestContext,   Boolean,System.ServiceModel.OperationContext)+ 7d7   System_ServiceModel_ni!System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(System.ServiceModel.Channels.RequestContext,   System.ServiceModel.OperationContext)+ 1FF   System_ServiceModel_ni!System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(System.IAsyncResult)+ DB   System_ServiceModel_Internals_ni!System.Runtime.Fx + AsyncThunk.UnhandledExceptionFrame(System.IAsyncResult)+32   System_ServiceModel_Internals_ni!System.Runtime.AsyncResult.Complete(布尔)+ 19E   System_ServiceModel_ni!System.ServiceModel.Channels.TransportDuplexSessionChannel + TryReceiveAsyncResult.OnReceive(System.IAsyncResult)+ 11D   System_ServiceModel_Internals_ni!System.Runtime.Fx + AsyncThunk.UnhandledExceptionFrame(System.IAsyncResult)+32   System_ServiceModel_Internals_ni!System.Runtime.AsyncResult.Complete(布尔)+ 19E   System_ServiceModel_ni!System.ServiceModel.Channels.SynchronizedMessageSource + ReceiveAsyncResult.OnReceiveComplete(System.Object的)+82   System_ServiceModel_ni!System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(System.Object的)+170   System_ServiceModel_ni!System.ServiceModel.Channels.SocketConnection.OnReceiveAsync(System.Object的,   System.Net.Sockets.SocketAsyncEventArgs)+ FD   System_ni!System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(System.Net.Sockets.SocketError,   Int32,System.Net.Sockets.SocketFlags)+ bd5   System_ni!System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32的,   UInt32,System.Threading.NativeOverlapped *)+ 40   mscorlib_ni!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32的,   UInt32,System.Threading.NativeOverlapped *)+ 96 [[GCFrame]]   [[DebuggerU2MCatchHandlerFrame]] [[ContextTransitionFrame]]   [[DebuggerU2MCatchHandlerFrame]]

太多的数据是否也会造成这种情况?谢谢,

0 个答案:

没有答案