RSS 2.0 Feed
2008-03 Entries
摘要:抓到一个mini dump,执行!clrstack,会提示如下错误: *** WARNING: Unable to verify timestamp for mscorwks.dll Failed to load data access DLL, 0x80004005 Verify that 1) you have a recent build of the debugger (6.2.14 or newer)             2) the file mscordacwks.dll that matches your version of mscorwks.dll is                 in the version directory             3) or, if you are debugging a dump file, verify that the file                 mscordacwks_<arch>_<arch>_<version>.dll is on your symbol path.             4) you are debugging on the same architecture as the dump file.                 For example, an IA64 dump file must be debugged on an IA64                 machine. You can also run the debugger command .cordll to control the debugger's load......[阅读全文]

posted @ | Feedback (0) | Filed Under [ VS.NET ]

摘要:对于XmlSerializer带来的内存占用过高,最终导致Out Of Memory的问题,参见以前这个链接:http://www.cnblogs.com/juqiang/archive/2008/01/15/1039936.html (但是那篇文章中对于XmlSerializer构造方法的说明,是错误的。那段代码没有问题,有问题的是下面的) 首先看System.Xml.Serialization.XmlSerializer的构造方法,一共分为三大类: public XmlSerializer(Type type) : this(type, (string) null) public XmlSerializer(Type type, string defaultNamespace) 这两个方法,采用了上文引用的那篇文章的处理方式,应用了cache,这是正确的,不会造成内存占用过高。(上文引用那篇文章里面这个地方解释错了) 另一大类的方法是: public XmlSerializer(XmlTypeMapping xmlTypeMapping),这个方法里面会产生一个tempAssembly,但是没有用缓存方式来处理。 有问题的一类方法是: public XmlSerializer(Type type, Type[] extraTypes) : this(type, null, extraTypes, null, null, null, null) public XmlSerializer(Type type, XmlAttributeOverrides overrides) : this(type, overrides, new Type[0], null, null, null, null) public XmlSerializer(Type type, XmlRootAttribute root) : this(type, null, new Type[0], root, null, null, null) public XmlSerializer(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, string defaultNamespace) : this(type, overrides, extraTypes, root, defaultNamespace, null, null) public XmlSerializer(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, string defaultNamespace, string location, Evidence evidence) 前4个都最终调用了最后一个构造方法,里面产生了一个tempAssembly,也没有用缓存方式来护理。 我上次提到的那个问题,问题代码如下: public static TReturn Convert<TReturn, TInput>(TInput input) where TReturn: class, new() where TInput: IProvisioningObject {     using (MemoryStream stream......[阅读全文]

posted @ | Feedback (1) | Filed Under [ VS.NET ]

摘要:    网站升级后,说有High CPU的问题。mstsc上去后,看了一下,果然如此,w3wp.exe的cpu几乎一直是满的,我的远程桌面操作也很慢。下载下来windbg,装好,抓了两个dump。首先!runaway一下, 0:022> !runaway  User Mode Time   Thread       Time   22:8cc       0 days 0:17:15.238   23:4d8       0 days 0:15:20.936   15:898       0 days 0:09:15.316   24:c64       0 days 0:05:07.587 这是前4个线程,一共占用了47分钟左右,我们再看一下time的时间: 0:022> .time Debug session time: Sun Mar  9 15:07:52.000 2008 (GMT+8) System Uptime: 1 days 2:04:59.903 Process Uptime: 0 days 0:55:38.000   Kernel time: 0 days 0:00:07.000   User time: 0 days 0:48:41.000 cool,.time的时间和!runaway的几乎一致,再看看!threadpool的数字: 0:022> !threadpool CPU utilization 100% Worker Thread: Total: 5 Running: 5 Idle: 0 MaxLimit: 200 MinLimit: 2 Work Request in Queue: 15 Unknown Function: 6a2aa6fb  Context: 0190c5b8 AsyncTimerCallbackCompletion TimerInfo@01969b30 AsyncTimerCallbackCompletion TimerInfo@01969428 Unknown Function: 6a2aa6fb  Context: 0190ccb8 AsyncTimerCallbackCompletion TimerInfo@019698a8 AsyncTimerCallbackCompletion TimerInfo@01969c98 AsyncTimerCallbackCompletion TimerInfo@019f5778 AsyncTimerCallbackCompletion TimerInfo@01918658 AsyncTimerCallbackCompletion TimerInfo@01969788 Unknown Function: 6a2aa6fb  Context: 0190cb38 AsyncTimerCallbackCompletion TimerInfo@019695d8 Unknown Function: 6a2aa6fb  Context: 0190caf8 AsyncTimerCallbackCompletion TimerInfo@01969740 Unknown Function: 6a2aa6fb  Context: 0190c178 Unknown Function: 6a2aa6fb ......[阅读全文]

posted @ | Feedback (4) | Filed Under [ VS.NET ]