问题标签 [debugdiag]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
.net - DebugDiag 内存转储分析以确定 IIS 崩溃的原因?
我们在带有 WPF 前端的 IIS 中托管了许多 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 个线程)
请查看线程的调用堆栈,看看它在做什么,最终调用 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 动态类。将实体名称写入XML(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.XmlObjectSerialize(SerializerWriteContext.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.对象, 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. 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.XmlObjectSer。 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(Boolean)+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(Boolean)+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.ObjectQuery1+<>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, Boolean)+110 [[ StubHelperFrame]] System.Data.Entity.Core.Objects.ObjectQuery1+<>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.ObjectQuery1[[System.__Canon, mscorlib]].GetResults(System.Nullable
1)+170 System.Data.Entity.Core.Objects.ObjectQuery1[[System.__Canon, mscorlib]].<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()+b System.Data.Entity.Internal.LazyEnumerator
1[[System.__Canon , mscorlib]].MoveNext()+32 mscorlib_ni!System.Collections.Generic.List1[[System.__Canon, mscorlib]]..ctor(System.Collections.Generic.IEnumerable
1)+218 System_Core_ni!System.Linq.Enumerable.ToList[System.__Canon, mscorlib]+50 **Repository.MethodName**(System.Collections.Generic.List1)+1626 ServiceName.MethodName (System.Collections.Generic. List`1)+18 DynamicClass.SyncInvoke MethodName(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(Boolean)+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(Boolean)+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(Boolean)+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]]
太多的数据也会导致这种情况吗?谢谢,
asp.net - DebugDiag:如何手动注入 LeakTrack.dll
我有一个来自生产的故障转储来识别内存泄漏。当我使用 DebugDiag (v2 update 2) 时,我得到了一份报告
DebugDiag 没有检测到 w3wp.DMP 中加载的 LeakTrack.dll,因此没有对该文件执行泄漏分析。如果您正在解决内存泄漏问题,请确保在生成新转储之前使用 DebugDiag 工具将 LeakTrack.dll 注入目标进程
. 我无法找到从 DebugDiag UI 或阅读文档后注入 LeakTrack.dll 的方法。如何手动注入 LeakTrack.dll?
c# - 转储崩溃转储
我需要编写一个工具来侦听某些目标进程(在客户环境中崩溃),一旦它崩溃,它应该通过启动 DebugDiag 并传递命令行参数来生成转储。代码需要用 C# 编写。我已经完成了一些编码,但该工具从未检测到启动的进程。这是代码:
还请告知这是否是将命令行参数传递给 DebugDiag @Bruno 的方式,我使用 ProcDump 实现了您的建议。现在它可以工作一次,这意味着当我启动我的目标进程(32 位)时,ProcDump 也会启动,但是我的应用程序是这样的,当我在其中启动一个工作区时,它会启动另一个同名的进程,这一次 ProcDump 未能启动,在调试时我发现它抛出了一个异常,说 32 位进程无法调试 64 位进程并且我所有的目标进程都是 32 位的... 代码:
debugging - 有没有办法从命令行运行 DebugDiag Analysis?
有没有办法从命令行调用DebugDiag Analysis?我试过这个:
DebugDiag.Analysis.exe "C:\dumps\oops.dmp"
但它只启动了 GUI(oops.dmp
添加了)。
我正在寻找的是更像这样的东西:
DebugDiag.Analysis.exe -dump "C:\dumps\oops.dmp" -out "C:\results\oops-DebugDiag.mht" -anaylsis "CrashHangAnalysis,MemoryAnalysis"
然后它应该运行,而不显示任何 GUI。
用例:我们正在使用SuperDump全自动运行故障转储分析。自动添加 DebugDiag.mht
报告会非常好。
这可以做到吗?是否有关于 DebugDiag 命令行选项的文档?
windows - 转储文件分析
最近我开始在少数服务器上遇到问题,其中 CPU 开始消耗比通常趋势更多的资源。我试图找出根本原因,并从任务管理器中获取 w3wp 进程的转储(右键单击进程并进行转储)。
现在 dmp 文件大小为 14GB,我正在尝试通过 WinDBG 对其进行分析,但该工具无法正常工作并收到消息:
我还使用了一些小型转储,但其中一些打开正常,而很少打开,因此与 32 位或 64 位之间的混淆无关。(收集的转储是 64 位)。我想知道是什么导致了这个问题。是文件大小还是我没有正确进行转储。
我检查了链接,但它没有帮助。
c# - DebugDiag 能否导致异常停止被抛出或阻止一般的 .net 异常?
我知道这个问题听起来很疯狂,但这是我的情况。我在负载均衡器后面有三个 Windows Server 2012 R2 Web 服务器,所有三个的权重相同 (33%)。所有三台服务器都在 IIS 上运行我们的 ASP.NET 站点。这些服务器在各个方面都是相同的。每 2-3 天,每台服务器都会抛出一个未处理的异常,该异常会杀死工作进程。一个多星期前,我在 DebugDiag 中为我们在“服务器 A”上的应用程序创建了一个崩溃规则。服务器 B 和 C 继续抛出异常,但服务器 A 没有抛出异常,因为我们创建了 DebugDiag 规则。我已经验证了所有三台服务器都从我们的负载均衡器获得了相同数量的请求。这是我们得到的异常:
错误应用程序名称:w3wp.exe,版本:8.5.9600.16384,时间戳:0x5215df96
错误模块名称:KERNELBASE.dll,版本:6.3.9600.18202,时间戳:0x569e7eb1
异常代码:0xe0434352
有没有人知道为什么 DebugDiag 似乎为我们“解决”了这个问题,或者我们如何调试这个问题?
.net - DebugDiag 未完成分析
我一直在尝试为 .NET Web 应用程序找到高 CPU 使用率。我使用了本文中解释的 DebugDiag 工具:https ://www.iis.net/learn/troubleshoot/performance-issues/troubleshooting-high-cpu-in-an-iis-7x-application-pool
转储已成功收集,但是当使用 DebugDiag Analyzer 分析转储时,它运行了数小时,但没有完成。实际需要多长时间?
没有迹象表明它何时会完成。转储文件大小约为 6.6 GB,分析器在创建转储的同一台机器上运行。
.net - Debugdiag 显示“Microsoft VC 运行时堆”使用超过 1gb
您好,我的 WPF 应用程序有泄漏,我正在尝试使用内存转储文件来追踪问题所在。
使用 WinDbg 和 SOS 我找不到任何可疑的东西。然后我尝试了 DebugDiag,我发现Microsoft VC 运行时堆(私有)有 1.42 GB 的已提交内存。
你知道为什么会这样吗?
谢谢,
vb.net - Windows-Services freeze irregularly
Because I am running out of arguments discussing with our admins, I hope you can help me with the following issue.
We have a strange behaviour corresponding to our self-implemented windows-services. They freeze randomly. Sometimes they keep on working for weeks and sometimes they freeze multiple times in a week. I am pretty sure, there is no problem with bad code or unhandled exceptions. In my opinion this is some kind of a windows admin/rights management problem in combination with chronological coincidence.
But let's start with some information at first:
- All windows services are running on one server.
- All windows services are executed by the same windows user.
- The server is a virtual machine. (VMWare, Windows Server 2008 R2) (I know...)
- The services are implemented using VB.Net with .Net 4.0. (I know... Was not my decision ;-))
- We have 2 different kinds of services (called A, B).
- Both kinds of services read files from a directory and write some information in a database. It's problably not important, what they are doing exactly, because this is some kind of standard task.
- Every kind of a service exists in 3 variants, that are copies of each other, but use different SQL servers to store data (called 1, 2, 3).
- At irregular intervals one ore two of the six services seem to freeze.
- Inside the windows service manager the frozen services are marked as "running". Via Powershell command the services also are marked as running.
- There is no pattern you can see corresponding to which services freeze. Somethimes for example service A variant 2 is frozen, whereas variant 1 and 3 are working fine. Important: There is the same code behind these 3 variants.
- Each service writes one log file per day. Looking into the log of a frozen service you can see, that there is no exception or error logged. The services just have stopped doing their work.
- There is no relevant information I can find in the windows events.
- Restarting the frozen services always helps. Sometimes you cannot simply restart them. Instead you have to stop them first and start them after this. In this case you see "error 1061: service cannot accept control messages at this time". This also occurs irregularly.
Because I could not see any logged errors, I installed DebugDiag on the corresponding server, added crash rules for the mentioned services and perhaps found something interesting. Here is an extract of the DebugDiag log:
The last sign of life of the service (let's say it was service A variant 2), that was frozen again at this time, was at 01:04:29, where one thread has been exited. At 06:55:25 the service has been restarted by one of our admins, because he saw, that the service seemed to be frozen. No dump was written by DebugDiag, so I assume again, that the service did not crash.
For me it was strange, that wship6.dll, wshtcpip.dll, fwpuclnt.dll and security.dll were unloaded while restarting the service, because I have not seen this yet. I tried to restart another variant of service A several times, which was not frozen. I saw the same entries, but they were written only after the first restart. Even after stopping and starting the service again, I could not see, that the libraries were unloaded.
So after a lot of information:
- Can you tell me roughly the task of these windows libraries?
- Is there any hint, that the servers could have problems corresponding to user rights managment / group policies? I know, that we had issues with group policies in the past. The local rights of the user, which was executing the services, were overwritten by some invalid global group policies. That's at least what I understood. I am developing and don't do admin tasks.
- What else could I check to make sure, there really is no problem with the code / help our admins to solve this annoying issue?
Edit 16.06.2017: Last night it was another windows service that stopped working with the same behaviour. Some variants of the windows service are frozen and some are still working. But this time you cannot see that the mentioned DLLs were unloaded while restarting the service. Maybe the first suspicion about the unloaded DLLs does not help for further diagnostics. One interesting fact: This service stopped working at the same time as the first service. Maybe there is a problem with the VM backups or something equivalent? I guess there is a regular task that is causing the problem. Do you have any hints?
Edit 19.06.2017: I guess we have found something interesting. The freezing services all have one .Net component in common: a filesystemwatcher. This has never been a problem in the past because we extended the .Net-filesystemwatcher with a self-reconnecting feature. The fileserver, which contains the path that is relevant for our filesystemwatcher, is backed up every night. Our filesystemwatcher reconnect feature checks every second, if this network path is unavailable. If so, the filesystemwatcher is reconnected after the path is available again. The hosting server, which manages all our virtual servers, has been upgraded a few days ago. So we have the following suspicion: Let's assume our windows service checks the network path at time t_1000 and t_2000. The virtual server backup disconnects the virtual file server, which contains the network path monitored by the filesystemwatcher, at time t_1200 and reconnects the path at t_1500. In this case our reconnect feature cannot work properly, because at t_1000 and t_2000 the network path was available. The filesystemwatcher nevertheless lost his connection and does not react to incoming files in the mentioned network path. This has not been a problem before, because the reconnect triggered by our backup software took some milliseconds longer due to the slower hardware used in this server. So our reconnect feature worked fine.
So what can we do?
- Option 1: Contact the vendor of our backup software. Maybe this is a bug in his software?
- Option 2: Never ever use a filesystemwatcher again, because we are always working on network paths.
- Option 3: Maybe there is a way to optimize the filesystemwatcher even more? Can a filesystemwatcher catch any events like this, so we don't have to use our reconnect feature, which is working with a timer? What do you think?
Many thanks in advance.
asp.net - .net 应用程序中的内存泄漏,调试诊断分析未提供 GC 详细信息
我们有一个托管在 IIS 上的 asp.net 网站,如果我的应用程序运行超过一天,它使用超过 4 GB 并保持不变。目前我们有一套回收作为解决方法。我正在使用 debugdiag 找出泄漏的根本原因。
编辑:
我尝试按照this使用windbg,但手动分析并没有真正帮助。但我发现debugdiag的自动分析可以告诉你哪些.net对象正在消耗大多数对象。按照这些文章和微软的这篇文章
期待看到这样的.net信息,但我得到了错误“您的浏览器设置当前禁止运行此报告的脚本”
我关注了这篇文章和这篇文章,但分析并没有提供太多关于 .NET 的详细信息,这是一个纯 .NET 应用程序。我期待看到内存消耗 .NET 对象和 GC 详细信息等。