Giter Site home page Giter Site logo

dynatrace / superdump Goto Github PK

View Code? Open in Web Editor NEW
493.0 38.0 74.0 13.03 MB

A service for automated crash-dump analysis

License: Other

Batchfile 0.35% C# 83.11% JavaScript 4.83% CSS 1.52% C++ 1.14% C 0.12% Shell 0.08% Dockerfile 0.32% HTML 8.55%
crash-dump dump-analysis windbg debugging dotnet debugdiag debugging-tool coredump tool

superdump's Introduction

SuperDump

SuperDump is a service for automated crash-dump analysis. It has a web- as well as a REST-interface to upload Windows crash dumps or Linux coredumps.

SuperDump was made with these goals in mind:

  • Make crash-dump analysis easy for people who are unexperienced with it, or don't have the necessary tools installed.
  • Speed up first assessment of a crash-dump, by automatically preparing crash-dump analysis up-front. A developer should be quicker in determining if it's an already known crash.

What SuperDump is not:

  • A replacement for in-depth analysis tools such as WinDbg.
  • A windows kernel dump analysis tool.

Maintainer: Christoph Neumüller ([email protected], https://twitter.com/discostu105)

Docker

Windows analyis can be run simply in Docker for Windows:

  • Have Windows Containers enabled on your Docker for Windows.
  • Just run docker run -d -p 80:5000 -v superdump:C:\superdump\data\dumps discostu105/superdump
  • Due to a Windows/Docker glitch, it's not possible to find the service under localhost:5000 though. Use docker inspect <id> to get the IP address of the container and access it directly <ip-of-container>:80. This should improve in future Windows versions.

Features

  • Dump analysis can be triggered via web-frontend (HTTP-upload) or via REST-API.
  • Windows-crash-dumps (Fulldump or Minidump) can be analyzed (.dmp files). Only process-dumps, not kernel-dumps.
  • Linux-crash-dumps can be analyzed (.core files). See format for core dumps
  • .zip files containing multiple crash-dumps are also supported. Each contained dump is processed.
  • Report results are stored as .json files and can be queried via REST-API. But they can also be viewed in SuperDump directly.
  • SuperDump report shows:
    • Basic information (bitness, system/process uptime, lastevent, ...)
    • Loaded modules and versions
    • Stacktraces of all threads (native and .NET frames)
    • AppDomains
    • Basic memory analyis (number of bytes used by .NET types)
    • Linux Signals
  • SuperDump detects exceptions (native and managed) and marks the responsible threads.
  • Deadlock detection.
  • SuperDump also invokes a number of WinDbg commands automatically and logs them to a separate log-file.
  • It also invokes DebugDiag Analysis. An .mht file is created automatically and can be downloaded.
  • You can enter "interactive mode" for every dump. This will spin up cdb.exe (basically WinDbg for the command line) and create a websocket-based console terminal in the browser which lets you analyze the dump more deeply, with out the need to download it and have debugging tools installed locally. (Isn't that awesome?)
  • Linux coredumps (.core) are supported too. The analysis is triggered via a docker container (the actual command is configurable via LinuxAnalysisCommand. Note, that linux dumps must be uploaded in archives in a specific format. In addition to the .core file, it must also contain linux system libraries as libs.tar.gz, otherwise symbols cannot be resolved correctly. If you're interested in seriously using this, please get in touch and we'll document this better. Find more details on linux analysis here: http://epub.jku.at/obvulihs/download/pdf/2581999?originalFilename=true
  • "Interactive mode" for linux coredumps is possible as well. Starts a fully TTY-Compliant browser session with GDB.
  • Slack Notifications for finished analysis (see SlackNotificationUrls config setting)
  • Elastic search integration for statistics. Every dump analysis is pushed into elastic search instance, which allows to run statistics on crash dumps.
  • Link to source (see RepositoryUrl setting)
  • Duplication detection
  • Optional Ldap Authentication with three user groups:
    • Admin: Has access to the Hangfire Server webinterface and can clean the Elastic Search.
    • User: Can download the dump files, view the stack variables, use the interactive mode and rerun the dump analysis.
    • Viewer: Can upload dumps, view the basic report and download certain log files.
  • Token Authentication for Api
  • Logging of security relevant events.
  • Logging of all webrequests.

Demo

Demo-Video: https://youtu.be/XdyDjkW8MDk

Slides about SuperDump (explaining some of the architecture): https://www.slideshare.net/ChristophNeumller/large-scale-crash-dump-analysis-with-superdump

Technologies

Build

  • Prerequisites:
    • Visual Studio 2019
    • .NET 5
    • .NET Framework 4.8 (developer pack)
    • NPM
    • Bower (npm install -g bower)
    • Git
    • Docker for Windows (for building the docker image for linux analysis)
    • LocalDB (optional, see UseInMemoryHangfireStorage setting)
    • DebugDiag (for automatic DebugDiag analysis)
    • When building the first time, remember to create conf/appsettings.json
    • Windows Debugging Tools (cdb.exe) (optional, for interactive mode)
  • Build via buildscript in building/*.cmd (see README.md)
  • Run via build/runsuperdump.cmd (defaults to port 5000)

Authentication

For authentication it is necessary to add a few settings to either the appconfig.json file, environment variables or using the user secrets file of asp .net.

  • "SuperDumpSettings:LdapAuthenticationSettings:LdapDomain"
  • "SuperDumpSettings:LdapAuthenticationSettings:TokenSigningKey"
  • "SuperDumpSettings:LdapAuthenticationSettings:GroupNames:Admin"
  • "SuperDumpSettings:LdapAuthenticationSettings:GroupNames:User"
  • "SuperDumpSettings:LdapAuthenticationSettings:GroupNames:Viewer"

When "SuperDumpSettings:LdapAuthenticationSettings:LdapServiceUserMode" is set to "ServiceUser" it is also necessary to specify

  • "SuperDumpSettings:LdapAuthenticationSettings:LdapServiceUserName"
  • "SuperDumpSettings:LdapAuthenticationSettings:LdapServiceUserPwd"

The user secrets file can be created by right-clicking the "SuperDumpService" Project in Visual Studio and selecting "Manage User Secrets"

For the https redirection it is necessary to add urls for https and http to the ASPNETCORE_URLS environment variable.

State of the project

SuperDump has been created at Dynatrace as an internship project in 2016. It turned out to be pretty useful so we thought it might be useful for others too. Thus we decided to open source it. This project is considered "community supported". No full-fledged support (with SLA's) is provided by Dynatrace.

Though it currently works great for us at Dynatrace, there are areas that need to be improved to make it a high-quality and generally useful tool:

  • Test-Coverage: A couple of unit tests are there, but there is currently no CI to automatically run them. The tests partially depend on actual dump-files being available, which obviously are not in source control. We'd need some binary-store, a prepare/download step, etc to make those run.
  • Some stuff is tailored for our needs at Dynatrace. E.g. we have special detection for Dynatrace Agent stackframes. While this feature probably won't hurt anyone else, it is kind of unclean to have such special detection in place.

Future

We've open sourced SuperDump, because we believe it can be helpful for others. Anyone is welcome to contribute to SuperDump. In small ways, or in ways we have not thought about yet. Feedback, github tickets, as well as PR's are welcome.

Some high-level ideas we've been poking around:

  • Pluggable analyzers: Possibility to write your own analyzers, detached from the main project and pluggable.
  • Workers: Instead of directly invoking analysis by SuperDumpService, a worker should instead invoke those, after fetching jobs from a queue. It would enable to detach actual analysis from the web-frontend. After that step, it would be easier to deploy SuperDump into Kubernetes.
  • Descriptive summaries: The idea is to put the most likely crash-reason in a short descriptive summary text. This is useful if a crash is entered as a bug in a ticket system.

Security

A word of caution: SuperDump is meant to be an internal tool to make crash dump diagnosis easier and faster. It is NOT designed to be used as a publicly hosted service. If you deploy SuperDump, it's recommended to put access restrictions in place on top of the LDAP authentication that SuperDump provides to only allow access for trusted individuals, .

Known shortcomings:

  • Especially the "Interactive Mode" is basically a window into a shell on the SuperDump server. So far, no effort has been made to properly sandbox that shell process, so a versatile user could break out of the debugger process (cdb/gdb) and gain shell access. Only users with the role SuperDumpSettings:LdapAuthenticationSettings:GroupNames:User can enter Interactive Mode.
  • SuperDump allows to upload files that are supposed to contain dumps, logfiles, debug symbols or archives containing such files. Uploading executables is not detected or restricted, which opens to possibility for remote code execution.
  • There is no access restriction between users that uploaded dumps. As soon as user permission SuperDumpSettings:LdapAuthenticationSettings:GroupNames:User is given, such a user can download other dumps or enter Interactive Mode. Memory dumps are may contain highly sensitive data, so such access must only be given to trusted individuals.

Credit

Most of the initial code base was written by Andreas Lobmaier in his summer internship of 2016. It's been maintained and further developed since then by Christoph Neumüller and other folks at Dynatrace. Dominik Steinbinder also contributed large parts, such as Linux analysis, elastic search integration and much more.

Some of the thread analysis code is based on Sasha Goldshtein's work in https://github.com/goldshtn/msos.

Thank you!

License

MIT

superdump's People

Contributors

beeme1mr avatar d-schneider avatar dependabot[bot] avatar discostu105 avatar dotstone avatar flarna avatar mantis avatar mmayr-at avatar tkoecker avatar weidingerhp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

superdump's Issues

Create separate model for input-data from api

Currently the rest-api (DumpsController.Post) takes a DumpBundle object (which derives from DumpObject).

This class offers too many input fields (e.g. bundleId, downloadCompleted, ... should not come as input).

There should be a separate class for input-data, which only contains the fields needed for scheduling the download.

Detection for first-chance vs. second chance exceptions

When analyzing a dump, it would be nice to know if an exception is a first-chance exception (stack not yet unwound, maybe a catch block exists) or a second chance (already unwound the stack, did not find a catch block).

Maybe a proper heuristic to find this out would be if KERNELBASE!RaiseException is on the top of the stack.

Application start instruction

Hey,

I have few problems with your project :(

  1. To start I should run cmd files from building directory. I receive errors with .NET Core (path are missing wtf) (please check attachment)
    dockeroutput.txt

  2. I try to use your application on Windows with Visual Studio 2017 (.NET Core 2.0 and .NET Framework are available on my machine). When I open solution on Visual Studio I receive error popup with information "Project file is incomplete. Expected imports are missing".

  3. I saw that you have sample console application - SuperDump.DebugDiag. I pass parameters to console app (DumpFilePath, Overwrite (true)) and I receive multiple exceptions when trying to run code (null reference exception for example on:
    analyzer.RunAnalysisRules(progress, options.SymbolPath, options.ImagePath, options.ReportFile);

What is exactly ImagePath and could you pass example input to SuperDump.DebugDiag application?

Thanks for your help!

Move SuperDumpService to .NET Core

This is actually a pre-requisite to make SuperDump happen on Linux. I'll try to make the target framework netcoreapp1.1 for SuperDumpService and SuperDumpModels.

Analysis Failed with errors. No reports available.

Hi, I am trying to analyse the following x86 dump file which is around 3 GB in size and am getting the following errors.
image
It says that there is not enough storage to process this command. I am running the service on a x64 windows server 2016 with 8 GB of RAM. Could you please help out?
analysis.log

image

wwwroot/lib does not exist

The lib directory under wwwroot does not exist and i am unsure if it gets created, or comes from elsewhere. Because of this , files like Jquery are not accessible and i cannot upload dump files. The service is broken. Can anyone provide any information as to how to get this lib directory?
Capture

Show exception records and mark trap frames

Exception records are not properly analyzed yet.

exr -1 shows the last exception record. It would reveal the real exception frame as well as details (e.g. which address was accessed in an access violation).

Getting the real exception frame, would also mean we could either change the stacktrace to omit the exception-handling/stack-unwinding frames (in WinDbg this is done via .excr), or we could keep the full stack, and just mark that frame with a tag.

Exception Record could be reported as an extra piece of information, and the faulting frame should also be considered in duplication detection algorithm.

Interactive Mode

Motivation:
In order to seriously debug a crash dump, which does not reveal it's real reason from a SuperDump report, one must still download the crash dump, start a debugging tool (e.g. WinDbg, gdb) and investgate further. For Windows users, who need to debug Linux crash dumps (and vice versa), this is painful. Also, some setup stuff always needs to be prepared (e.g. correct symbol path). What if SuperDump offered a web-based console which allows for interactive debugging?

Goal:
On a crash report page, offer a button for "Interactive Mode". It would show a console window in the browser. In the background, SuperDumpService would actually start a process (e.g. cdb.exe, gdb), load the given crash dump (maybe do other preparation steps) and redirect input/output to the console window.

It would make sense to start the process in a docker-container to protect the outer environment.

Missing libunwind patches/code

I'm trying to rebuild the Linux container with an updated Ubuntu base Image, however I can't get libunwind to compile (neither version 1.1 nor 1.2-rc1 - the latter seems to be what the dotstone/sdlinux:base image contains based on running strings and guessing...)

There are references to _UCD_set_backing_files_sysroot but that function doesn't exist anywhere Google would find...

Am I missing something? Is there a patch missing for libunwind?

Refactor DumpRepository.cs

This class is too big and has too many concerns. I'll try to split every concern into a separate class and use asp.net core dependency injection for it. Thinking about:

  • Bundle/Dump Storage (persistence)
  • Bundle/Dump Repository (in-memory fast access)
  • Analysis Service
  • Download Service
  • SymStore Service

progress here: https://github.com/Dynatrace/superdump/tree/metainfo

Unhandled Exception

Unhandled Exception: System.Runtime.InteropServices.COMException: Retrieving the
COM class factory for component with CLSID {4001052F-9B7B-46A6-AD4B-C6984222BE6
2} failed due to the following error: 80040154 Class not registered (Exception f
rom HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
at DebugDiag.DotNet.NetAnalyzer..ctor()
at SuperDump.DebugDiag.Program.RunAnalysis(Options options)

superDump failed when create clr runtime

I start superDump exe to analyze 1 dump more than 10 gb , the exception below always thrown.
also checked with windbg ,works fine. could you help to figure out what happened. thanks

ERROR: Exception creating CLR Runtime
ERROR: Failure loading DAC: CreateDacInstance failed 0x80131c39
在 Microsoft.Diagnostics.Runtime.DacLibrary..ctor(DataTargetImpl dataTarget, String dacDll)
在 Microsoft.Diagnostics.Runtime.ClrInfo.ConstructRuntime(String dac)
在 Microsoft.Diagnostics.Runtime.ClrInfo.CreateRuntime(String dacFilename, Boolean ignoreMismatch)
在 SuperDump.ClrMdExtensions.CreateRuntime(DataTarget target, String& dac, String dumpPath) 位置 D:\superdump\src\SuperDump\ClrMdExtensions.cs:行号 47
在 SuperDump.Program.SetupCLRRuntime() 位置 D:\superdump\src\SuperDump\Program.cs:行号 172

Startup is slow with many dumps

Having a couple hundred crashes in the repository makes the first request very slow. We had an instance with ~900 dumps and the first request took more than two minutes.

The reason is that DumpRepository.Populate goes through all results and opens every .json for initialization.

Since not all information is needed for initial population (and listing dumps in Overview), we should create a data model which only stores the metainformation that is needed for listing bundles and dumps.

Support tty console for interactive mode

This would be a fun project.

Currently, input/output redirect for cdb.exe and docker.exe/gbd is just plain redirection of input and output streams to the browser.

This means that some advanced features of gdb (such as coloring, split views, etc) do not work, since they would require TTY compliance.

I have no experience with this stuff, but IMHO we would need a .NET Core TTY Emulator when starting docker.exe. Not sure if such a thing already exists (maybe here?)

Then we would somehow need to channel tty data to the browsers which would also require a tty enabled console. (there seem to be a few).

symbols / pdb files.

I have superdump up and running. Thank-you, this looks like just what I need.
Unfortunately, I am unsure how to set the symbol path to include my pbd files.
Do I need to edit a Dockerfile and rebuild?
Any help here is most appreciated.

MIT License Attribution

Looking at the SuperDump source code it looks the original commit is very heavily inspired by some of the code in the msos library (also on github). For example, unless I'm mistaken most code in for example at least CombinedStackFrame.cs and CombinedStackTrace.cs seems to have been lifted directly from the Unified* counterparts in msos/MixedStack.cs.

In this case (in my honest opinion) it would be nice to acknowledge the original authors and provide correct attribution for at least some parts of the source code.

Unhandled exception on SuperDump.DebugDiag

Application: SuperDump.DebugDiag.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.PipeException
at System.ServiceModel.Channels.PipeConnection.FinishSyncRead(Boolean)
at System.ServiceModel.Channels.PipeConnection.Read(Byte[], Int32, Int32, System.TimeSpan)

Exception Info: System.ServiceModel.CommunicationException

Server stack trace: 
   at System.ServiceModel.Channels.PipeConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
   at System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
   at System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
   at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
   at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
   at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
   at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
   at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessage)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(System.Runtime.Remoting.Proxies.MessageData ByRef, Int32)
   at DebugDiag.DotNet.x86Analysis.IAnalysisService.RunAnalysisRules(System.Collections.Generic.List`1<DebugDiag.DotNet.AnalysisRules.AnalysisRuleInfo>, System.Collections.Generic.List`1<System.String>, System.String, System.String, System.String, System.TimeSpan, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, System.Collections.Generic.List`1<DebugDiag.DotNet.Fact> ByRef)
   at DebugDiag.DotNet.NetAnalyzer.RunX86Analysis(DebugDiag.DotNet.NetProgress, System.Collections.Generic.List`1<System.String>, System.Collections.Generic.List`1<DebugDiag.DotNet.AnalysisRules.AnalysisRuleInfo>, System.String, System.String, System.String, Boolean, DebugDiag.DotNet.NetResults ByRef, System.Collections.Generic.List`1<DebugDiag.DotNet.Fact> ByRef)
   at DebugDiag.DotNet.NetAnalyzer.RunAnalysisRulesInternal(DebugDiag.DotNet.DumpFileType, DebugDiag.DotNet.NetProgress, System.String, System.String, System.String, Boolean, DebugDiag.DotNet.AnalysisRules.AnalysisModes)
   at DebugDiag.DotNet.NetAnalyzer.RunAnalysisRules(DebugDiag.DotNet.NetProgress, System.String, System.String, System.String, Boolean, DebugDiag.DotNet.AnalysisRules.AnalysisModes)
   at SuperDump.DebugDiag.Program.RunAnalysis(SuperDump.DebugDiag.Options)
   at CommandLine.ParserResultExtensions.WithParsed[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](CommandLine.ParserResult`1<System.__Canon>, System.Action`1<System.__Canon>)
   at SuperDump.DebugDiag.Program.Main(System.String[])

Using superdump for Linux based coredumps

Hi,

I need more help in getting linux based coredumps uploaded and how to verify them on UI.
Can you please let me know if there are any demo / recording around that?

Thanks,
Pankti

Interactive session crashes

Unhandled Exception: System.IO.IOException: The pipe has been ended
   at System.IO.Win32FileStream.FlushOSBuffer()
   at System.IO.Win32FileStream.<>c.<FlushAsync>b__97_0(Object state)
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.IO.StreamWriter.<FlushAsyncInternal>d__67.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.IO.StreamWriter.<WriteAsyncInternal>d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at SuperDump.Webterm.ConsoleAppManager.<WriteInputTask>d__30.MoveNext() in C:\workspaces\superdump\src\SuperDumpService\Webterm\ConsoleAppManager.cs:line 153
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

sometimes an interactive session kills the process with this unhandled exception.

failed to create endpoint on network nat

I followed the instructions in the readme, but I get this error when trying to run the container:

docker: Error response from daemon: failed to create endpoint X on network nat: failed during hnsCallRawResponse: hnsCall failed in Win32: The process cannot access the file because it is being used by another process. (0x20).

I tried different ports for port mapping but the problem remaining.

Are there any alternative ways to run this?

How do I get the line number on the stack?

sorry,I asked a question on CLRMD before, but some things were not clear。

When I enumerate the thread stack,How do I get the line number on the stack?
such as :
0012f380 7c92e514 Program.Main() ( C:/user/code/Console/Program.cs @ 17 )

You recommended a link:https://github.com/Dynatrace/superdump/blob/master/src/SuperDump/ClrMdExtensions.cs#L105

When I called the method from the link, it was just return the last column of PdbSequencePoint。

GetSourceLocation(this ClrStackFrame frame) =>call FindNearestLine()

private static SDFileAndLineNumber FindNearestLine(PdbFunction function, int ilOffset) {
			int distance = int.MaxValue;
			var nearest = new SDFileAndLineNumber();

			foreach (PdbSequencePointCollection sequenceCollection in function.SequencePoints) {
				foreach (PdbSequencePoint point in sequenceCollection.Lines) {
					int dist = (int)Math.Abs(point.Offset - ilOffset);
					if (dist < distance) {
						nearest.File = sequenceCollection.File.Name;
						nearest.Line = (int)point.LineBegin;
					}
				}
			}

			return nearest;
		}

Let's say I have a method :Program.Main()

1.    static void Main(string[] args)
2.    {
3.            while (true)
4.                  Console.WriteLine(1);
5.    }

FindNearestLine method will always return to line=5 。

I want to know how to find out where the code is running in that stackframe。
thanks,thanks,thanks,thanks,thanks,thanks

Exit Code 1

stderr: Exception happened: Microsoft.Diagnostics.Runtime.ClrDiagnosticsException: Dump does not contain a SystemInfoStream stream.

at Microsoft.Diagnostics.Runtime.Utilities.DumpReader.GetStream(MINIDUMP_STREAM_TYPE type)

at Microsoft.Diagnostics.Runtime.Utilities.DumpReader..ctor(String path)

at Microsoft.Diagnostics.Runtime.DumpDataReader..ctor(String file)

at Microsoft.Diagnostics.Runtime.DataTarget.LoadCrashDump(String fileName, CrashDumpReader dumpReader)

at SuperDump.Program.LoadDump(DumpContext context, String absoluteDumpFile) in C:\workspaces\pub\superdump.git\src\SuperDump\Program.cs:line 162

at SuperDump.Program.RunAnalysis(Options options) in C:\workspaces\pub\superdump.git\src\SuperDump\Program.cs:line 62

at Dynatrace.OneAgent.Sdk.Api.DummyImpl.DummyIncomingRemoteCallTracer.Trace(Action action)

at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult1 result, Action1 action)

at SuperDump.Program.Main(String[] args) in C:\workspaces\pub\superdump.git\src\SuperDump\Program.cs:line 22

Docker missing from Prerequisites:

Hi,

Pulled down the repo and tried to get everything working and realized that docker is a prerequisites for building, but not listed as such. Just giving you guys a heads up.

Thanks for the great project, looks very promising.

Regards

Unable to expose service to local network

Trying to figure out how to expose the service to local network. simply port mapping doesn't appear to work -- the container runs on the "nat" network (Windows 10), and isn't accessible externally.

Tried creating an external (transparent) network. That doesn't appear to work either. The container starts successfully, but is inaccessible.

NRE in JiraIssueRepository

In some instances, I get this exception.

System.Collections.Generic.KeyNotFoundException: The given key 'APM-155990' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at SuperDumpService.Services.JiraIssueRepository.<>c__DisplayClass25_0.<SetBundleIssues>b__2(JiraIssueModel issue) in C:\workspaces\priv\superdump-internal.git\src\SuperDumpService\Services\JiraIssueRepository.cs:line 201
   at System.Linq.Enumerable.SelectListIterator`2.ToList()
   at SuperDumpService.Services.JiraIssueRepository.GetIssues(String bundleId) in C:\workspaces\priv\superdump-internal.git\src\SuperDumpService\Services\JiraIssueRepository.cs:line 64
   at SuperDumpService.Services.JiraIssueRepository.GetAllIssuesByBundleIdWithoutWait(String bundleId) in C:\workspaces\priv\superdump-internal.git\src\SuperDumpService\Services\JiraIssueRepository.cs:line 69
   at SuperDumpService.Services.JiraIssueRepository.GetAllIssuesByBundleIdsWithoutWait(IEnumerable`1 bundleIds) in C:\workspaces\priv\superdump-internal.git\src\SuperDumpService\Services\JiraIssueRepository.cs:line 76
   at SuperDumpService.Controllers.HomeController.Report(String bundleId, String dumpId) in C:\workspaces\priv\superdump-internal.git\src\SuperDumpService\Controllers\HomeController.cs:line 267
   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

I honestly don't understand this yet. JiraIssueRepository.GetIssues never calls SetBundleIssues.

https://github.com/Dynatrace/superdump/blob/master/src/SuperDumpService/Services/JiraIssueRepository.cs#L64
https://github.com/Dynatrace/superdump/blob/master/src/SuperDumpService/Services/JiraIssueRepository.cs#L201

how to upload local files via RESTful api

using the curl example from the swagger docs I am able to upload a dmp file to the server from the cmd line, but only if the dmp file is placed on another webserver first. Is there a way to specify a local file? If so, what should the -d '{"url":"???" ... }' be set to in this case?

Show inlined frames

WinDbg somehow manages to show inlined frames, but SuperDump does not show them.

Not sure if this is a CLRMD limitation. We should find a way to show them.

Fails to Analyze

I'm using the docker image for dump analysis, however when I upload a dump and analyze it, I get no output. The superdump log says this:
ERROR: WinDbgAnalyzer failed: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Diagnostics.Runtime.DbgEngDataReader..ctor(String dumpFile) at Microsoft.Diagnostics.Runtime.DataTarget.LoadCrashDump(String fileName, CrashDumpReader dumpReader) at SuperDump.DumpContext.CreateDbgEngDataTargetImpl() in C:\workspaces\pub\superdump.git\src\SuperDump\DumpContext.cs:line 35 at SuperDump.DumpContext.CreateTemporaryDbgEngTarget() in C:\workspaces\pub\superdump.git\src\SuperDump\DumpContext.cs:line 26 at SuperDump.Analyzers.WinDbgAnalyzer.Analyze() in C:\workspaces\pub\superdump.git\src\SuperDump\Analyzers\WinDbgAnalyzer.cs:line 16 at SuperDump.Program.<>c__DisplayClass5_0.<RunAnalysis>b__0() in C:\workspaces\pub\superdump.git\src\SuperDump\Program.cs:line 64 at SuperDump.Program.RunSafe(DumpContext context, String name, Action action) in C:\workspaces\pub\superdump.git\src\SuperDump\Program.cs:line 210 ERROR: The right dac file could not be found. Could not find the specified dac. at SuperDump.ClrMdExtensions.CreateRuntime(DataTarget target, String& dac) in C:\workspaces\pub\superdump.git\src\SuperDump\ClrMdExtensions.cs:line 42 at SuperDump.Program.SetupCLRRuntime(DumpContext context) in C:\workspaces\pub\superdump.git\src\SuperDump\Program.cs:line 170 ERROR: WinDbgAnalyzer failed: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Diagnostics.Runtime.DbgEngDataReader..ctor(String dumpFile) at Microsoft.Diagnostics.Runtime.DataTarget.LoadCrashDump(String fileName, CrashDumpReader dumpReader) at SuperDump.DumpContext.CreateDbgEngDataTargetImpl() in C:\workspaces\pub\superdump.git\src\SuperDump\DumpContext.cs:line 35 at SuperDump.DumpContext.CreateTemporaryDbgEngTarget() in C:\workspaces\pub\superdump.git\src\SuperDump\DumpContext.cs:line 26 at SuperDump.Analyzers.SystemAnalyzer..ctor(DumpContext context) in C:\workspaces\pub\superdump.git\src\SuperDump\Analyzers\SystemAnalyzer.cs:line 20 at SuperDump.Program.<>c__DisplayClass5_1.<RunAnalysis>b__1() in C:\workspaces\pub\superdump.git\src\SuperDump\Program.cs:line 76 at SuperDump.Program.RunSafe(DumpContext context, String name, Action action) in C:\workspaces\pub\superdump.git\src\SuperDump\Program.cs:line 210 ERROR: WinDbgAnalyzer failed: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Diagnostics.Runtime.DbgEngDataReader..ctor(String dumpFile) at Microsoft.Diagnostics.Runtime.DataTarget.LoadCrashDump(String fileName, CrashDumpReader dumpReader) at SuperDump.DumpContext.CreateDbgEngDataTargetImpl() in C:\workspaces\pub\superdump.git\src\SuperDump\DumpContext.cs:line 35 at SuperDump.DumpContext.CreateTemporaryDbgEngTarget() in C:\workspaces\pub\superdump.git\src\SuperDump\DumpContext.cs:line 26 at SuperDump.Analyzers.ExceptionAnalyzer..ctor(DumpContext context, SDResult res) in C:\workspaces\pub\superdump.git\src\SuperDump\Analyzers\ExceptionAnalyzer.cs:line 16 at SuperDump.Program.<>c__DisplayClass5_1.<RunAnalysis>b__2() in C:\workspaces\pub\superdump.git\src\SuperDump\Program.cs:line 96 at SuperDump.Program.RunSafe(DumpContext context, String name, Action action) in C:\workspaces\pub\superdump.git\src\SuperDump\Program.cs:line 210 INFO: --- Thread analysis --- ERROR: WinDbgAnalyzer failed: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Diagnostics.Runtime.DbgEngDataReader..ctor(String dumpFile) at Microsoft.Diagnostics.Runtime.DataTarget.LoadCrashDump(String fileName, CrashDumpReader dumpReader) at SuperDump.DumpContext.CreateDbgEngDataTargetImpl() in C:\workspaces\pub\superdump.git\src\SuperDump\DumpContext.cs:line 35 at SuperDump.DumpContext.CreateTemporaryDbgEngTarget() in C:\workspaces\pub\superdump.git\src\SuperDump\DumpContext.cs:line 26 at SuperDump.Analyzers.ThreadAnalyzer..ctor(DumpContext context) in C:\workspaces\pub\superdump.git\src\SuperDump\Analyzers\ThreadAnalyzer.cs:line 26 at SuperDump.Program.<>c__DisplayClass5_1.<RunAnalysis>b__3() in C:\workspaces\pub\superdump.git\src\SuperDump\Program.cs:line 101 at SuperDump.Program.RunSafe(DumpContext context, String name, Action action) in C:\workspaces\pub\superdump.git\src\SuperDump\Program.cs:line 210 --- Blocking objects in heap --- WARNING: no heap information avaliable! MT Count TotalSize Class Name ERROR: no heap information is avaliable ERROR: WinDbgAnalyzer failed: System.NullReferenceException: Object reference not set to an instance of an object. at SuperDump.Analyzer.Common.UniversalTagAnalyzer.AnalyzeResult(SDResult result) in C:\workspaces\pub\superdump.git\src\SuperDump.Analyzer.Common\UniversalTagAnalyzer.cs:line 7 at SuperDump.Analyzer.Common.DynamicAnalysis.AnalyzeSDResult() in C:\workspaces\pub\superdump.git\src\SuperDump.Analyzer.Common\DynamicAnalysis.cs:line 51 at SuperDump.Analyzer.Common.DynamicAnalysis.Analyze() in C:\workspaces\pub\superdump.git\src\SuperDump.Analyzer.Common\DynamicAnalysis.cs:line 24 at SuperDump.Analyzers.TagAnalyzer.Analyze() in C:\workspaces\pub\superdump.git\src\SuperDump\Analyzers\TagAnalyzer.cs:line 22 at SuperDump.Program.<>c__DisplayClass5_1.<RunAnalysis>b__5() in C:\workspaces\pub\superdump.git\src\SuperDump\Program.cs:line 123 at SuperDump.Program.RunSafe(DumpContext context, String name, Action action) in C:\workspaces\pub\superdump.git\src\SuperDump\Program.cs:line 210 INFO: --- End of output ---

Windows Dump Analysis

Unhandled Exception: System.ObjectDisposedException: Cannot write to a closed TextWriter.
at System.IO.__Error.WriterClosed()
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.Write(Char[] buffer, Int32 index, Int32 count)
at SuperDump.Printers.FilePrinter.WriteError(String value) in C:\superdump\src\SuperDump\Printers\FilePrinter.cs:line 17
at SuperDump.DumpContext.WriteError(String value) in C:\superdump\src\SuperDump\DumpContext.cs:line 97
at SuperDump.Program.Main(String[] args) in C:\superdump\src\SuperDump\Program.cs:line 27

Documentation required for setup and usage for Linux (cross-compiled) coredumps

Hello guys,
I am not sure if this is the proper way to ask this question but I was looking for instructions and/or documentation to setup this tool to analyze Linux (arm cross-compiled) coredumps.
The environment should preferably reside on a Linux (x86) box but Windows can be managed too.
I have everything needed to do this analysis manually.
Thanks.

build.cmd fails with path not found

Unable to build, though I'm pretty sure I have all the prerequisites. Am I missing something?

"D:\build\superdump\building\msbuild.targets" (Windows target) (1) ->
"D:\build\superdump\src\SuperDumpService\SuperDumpService.csproj" (Build target) (6) ->
(GenerateOpenApiDocuments target) ->
  C:\Users\nucnuc\.nuget\packages\microsoft.extensions.apidescription.server\0.3.0-preview7.19365.7\build\Microsoft.Extensions.ApiDe
scription.Server.targets(41,5): error MSB3073: The command "dotnet "C:\Users\nucnuc\.nuget\packages\microsoft.extensions.apidescript
ion.server\0.3.0-preview7.19365.7\build\/../tools/dotnet-getdocument.dll" --assembly "D:\build\superdump\src\SuperDumpService\bin\Re
lease\netcoreapp3.0\SuperDumpService.dll" --file-list "obj\SuperDumpService.OpenApiFiles.cache" --framework ".NETCoreApp,Version=v3.
0" --output "obj" --project "SuperDumpService" --assets-file "D:\build\superdump\src\SuperDumpService\obj\project.assets.json" --pla
tform "AnyCPU" " exited with code 7. [D:\build\superdump\src\SuperDumpService\SuperDumpService.csproj]

    2 Warning(s)
    1 Error(s)

Time Elapsed 00:00:02.58
The system cannot find the path specified.

Implement a Search

It would be really great to have a search for

  • JIRA ticket (substring)
  • dump name
  • methods/comments/...

Add DebugDiag analysis

DebugDiag delivers great analysis. It goes much deeper than SuperDump. We could automatically run a DebugDiag analysis for every crashdump and offer the resulting .mht file to the SuperDump result-files.

analysis fail

I am not building the project, just running it with cmd.
Uploaded the file via web browser.
It looks like context.DumpDirectory is null.
Probably i am doing something wrong but not sure what it is.

Error: System.Exception: SuperDumpSelector exited with error code -532462766

stdout:
D:\superdump\data\dumps\hnu8449\rfa6820
detected x86 dump, selecting 32-bit build of SuperDump ...
starting process. exe: 'D:\superdump\bin\SuperDumpx86\SuperDump.exe', args: 'D:\superdump\data\dumps\hnu8449\rfa6820\xxx.exe.5116.dmp D:\superdump\data\dumps\hnu8449\rfa6820\superdump-result.json', workdir: 'D:\superdump\bin\SuperDumpx86'
stdout: SuperDump - Windows dump analysis tool

D:\superdump\data\dumps\hnu8449\rfa6820\xxx.exe.5116.dmp

stderr:
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: path1
at System.IO.Path.Combine(String path1, String path2)
at SuperDump.Program.Main(String[] args) in C:\workspaces\superdump\src\SuperDump\Program.cs:line 112

exitcode: -532462766

stderr:

Unhandled Exception: System.AggregateException: One or more errors occurred. ---> SuperDumpSelector.SuperDumpFailedException:
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: path1
at System.IO.Path.Combine(String path1, String path2)
at SuperDump.Program.Main(String[] args) in C:\workspaces\superdump\src\SuperDump\Program.cs:line 112

issue with DebugDiag report

Hi ,
I'm getting below exception when i tried to download DebugDiag report from superdump tool .

"
debugDiagExe exited with error code -532462766

stdout:
Checking for existing AssemblyResolve handler

stderr:

Unhandled Exception: System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'DebugDiag.DbgLib.IDbgObj4'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{C31AD976-24BF-4F4C-85B0-7F18484C2600}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at System.StubHelpers.InterfaceMarshaler.ConvertToManaged(IntPtr pUnk, IntPtr itfMT, IntPtr classMT, Int32 flags)
at DebugDiag.DbgLib.DbgControlClass_Legacy.OpenDump(String DumpPath, String SymbolPath, String ImagePath, Object pProgress)
at DebugDiag.DotNet.NetDbgObj.OpenDump(String dumpPath, String symbolPath, String imagePath, Object pProgress, Boolean throwOnBitnessMismatch, Boolean loadClrRuntime, Boolean loadClrHeap)
at DebugDiag.DotNet.NetDbgObj.GetDumpFileType(String dumpFile, String symbolPath)
at DebugDiag.DotNet.NetAnalyzer.AddDumpFile(String dumpFile, String symbolPath)
at SuperDump.DebugDiag.Program.RunAnalysis(Options options) in C:\workspaces\dynatrace\pub\superdump\src\SuperDump.DebugDiag\Program.cs:line 53
at Dynatrace.OneAgent.Sdk.Api.DummyImpl.DummyIncomingRemoteCallTracer.Trace(Action action)
at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult1 result, Action1 action)
at SuperDump.DebugDiag.Program.Main(String[] args) in C:\workspaces\dynatrace\pub\superdump\src\SuperDump.DebugDiag\Program.cs:line 26

"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.