Beispiel #1
0
 public async Task StoreMiniInfo(DumpIdentifier id, DumpMiniInfo miniInfo)
 {
     if (DelaysEnabled)
     {
         await Task.Delay(WRITE_MINIINFO_DELAY_MS);
     }
     fakeDumpsDict[id].MiniInfo = miniInfo;
 }
        private readonly DumpMiniInfo dump3;         // very different to dump1

        public SimilarityCalculationBenchmarks()
        {
            dump1 = new DumpMiniInfo {
                DumpSimilarityInfoVersion = 2,
                Exception = new ExceptionMiniInfo {
                    MessageHash = "Thread in invalid state.".GetStableHashCode(),
                    TypeHash    = "System.Threading.ThreadStateException".GetStableHashCode()
                },
                FaultingThread = new ThreadMiniInfo {
                    DistinctModuleHashes = new string[] { "ntdll", "kernelbase", "ptsrv", "msvcr", "kernel" }.Select(x => x.GetStableHashCode()).ToArray(),
                    DistinctFrameHashes  = new string[] { "ntalpcsendwaitreceiveport", "sendmessagetowerservice", "reportexceptioninternal", "rtlreportexceptionhelper", "rtlreportexception", "ldrpcalloutexceptionfilter", "ldrpprocessdetachnode", "ldrpunloadnode", "ldrpdecrementmoduleloadcountex", "ldrunloaddll", "freelibrary", "hookfreelibrary", "unknown", "exit", "basethreadinitthunk", "rtluserthreadstart" }.Select(x => x.GetStableHashCode()).ToArray()
                },
                LastEvent = new LastEventMiniInfo {
                    TypeHash        = "EXCEPTION".GetStableHashCode(),
                    DescriptionHash = "Break instruction exception - code 80000003 (first/second chance not available)".GetStableHashCode()
                }
            };

            dump2 = new DumpMiniInfo {
                DumpSimilarityInfoVersion = 2,
                Exception = new ExceptionMiniInfo {
                    MessageHash = "Thread in invalid state.".GetStableHashCode(),
                    TypeHash    = "System.Threading.ThreadStateException".GetStableHashCode()
                },
                FaultingThread = new ThreadMiniInfo {
                    DistinctModuleHashes = new string[] { "someotherlibrary", "ntdll", "kernelbase", "ptsrv", "msvcr", "kernel" }.Select(x => x.GetStableHashCode()).ToArray(),
                    DistinctFrameHashes  = new string[] { "someotherstackframe", "yetanotherunknown", "reportexceptioninternal", "rtlreportexceptionhelper", "rtlreportexception", "ldrpcalloutexceptionfilter", "ldrpprocessdetachnode", "ldrpunloadnode", "ldrpdecrementmoduleloadcountex", "ldrunloaddll", "freelibrary", "hookfreelibrary", "unknown", "exit", "basethreadinitthunk", "rtluserthreadstart" }.Select(x => x.GetStableHashCode()).ToArray()
                },
                LastEvent = new LastEventMiniInfo {
                    TypeHash        = "EXCEPTION".GetStableHashCode(),
                    DescriptionHash = "Break instruction exception - code 80000003 (first/second chance not available)".GetStableHashCode()
                }
            };

            dump3 = new DumpMiniInfo {
                DumpSimilarityInfoVersion = 2,
                Exception      = null,
                FaultingThread = new ThreadMiniInfo {
                    DistinctModuleHashes = new string[] { "clr", "mscorlib", "simpleinjector", "unknown", "lineosweb", "", "systemweb", "webengine", "iiscore", "kernel", "ntdll" }.Select(x => x.GetStableHashCode()).ToArray(),
                    DistinctFrameHashes  = new string[] { "sigtypecontextequal", "eehashtablebasesigtypecontextconsteeinstantiationhashtablehelperfinditem", "eehashtablebasesigtypecontextconsteeinstantiationhashtablehelpergetvalue", "methodcallgraphpreparerrun", "preparemethoddesc", "reflectioninvocationpreparedelegatehelper", "reflectioninvocationpreparedelegate", "mscorlibdllunknown", "simpleinjectordllunknown", "unknown", "lineoswebdllunknown", "calldescrworkerinternal", "calldescrworkerwithhandler", "calldescrworkerreflectionwrapper", "runtimemethodhandleinvokemethod", "debuggerumcatchhandlerframe", "systemwebdllunknown", "inlinedcallframe", "wmgdhandlerprocessnotification", "wmgdhandlerdowork", "requestdowork", "cmgdenghttpmoduleonacquirerequeststate", "notificationcontextrequestdowork", "notificationcontextcallmodulesinternal", "notificationcontextcallmodules", "notificationmaindowork", "wcontextbasecontinuenotificationloop", "wcontextbaseindicatecompletion", "wmgdhandlerindicatecompletion", "mgdindicatecompletion", "domainneutralilstubclassilstubpinvoke", "ummthunkwrapper", "threaddoadcallback", "contexttransitionframe", "ummdoadcallback", "processnotificationcallback", "unmanagedperappdomaintpcountdispatchworkitem", "threadpoolmgrexecuteworkrequest", "threadpoolmgrworkerthreadstart", "threadintermediatethreadproc", "basethreadinitthunk", "rtluserthreadstart" }.Select(x => x.GetStableHashCode()).ToArray()
                },
                LastEvent = new LastEventMiniInfo {
                    TypeHash        = "EXCEPTION".GetStableHashCode(),
                    DescriptionHash = "Access violation - code c0000005 (first/second chance not available)".GetStableHashCode()
                }
            };
        }
Beispiel #3
0
 public async Task StoreMiniInfo(DumpIdentifier id, DumpMiniInfo miniInfo)
 {
     miniInfosLazyCache.TryAdd(id, miniInfo);
     await storage.StoreMiniInfo(id, miniInfo);
 }
Beispiel #4
0
 public async Task StoreMiniInfo(DumpIdentifier id, DumpMiniInfo miniInfo)
 {
     await File.WriteAllTextAsync(pathHelper.GetDumpMiniInfoPath(id), JsonConvert.SerializeObject(miniInfo, Formatting.None));
 }