I am analyzing a .dmp file for "OutofMemory" exception. The objects are staying in the memory for very long time, so is there a command to check if the garbage collection was triggered by using SOS.dll or SOSEX?
Is there a way to check if garbage collection was triggered while analyzing dump file through SOS.dll
723 Views Asked by m_d_p29 At
1
There are 1 best solutions below
Related Questions in C#
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in DEBUGGING
- Eclipse find source file from library
- Debug native code in Android Studio
- Breakpoint "concurrency" in Intellij
- PhpStorm IDE. Collapse custom/debug code
- How does one debug infinite recursion in Haskell?
- Android Studio missing exception stacktrace in Logcat
- java FileNotFoundException wont locate a file in the same project
- How can I debug scala.js unit tests?
- Why Eclipse Debugger does not stop on scoped exception breakpoint (how to stop on handled exception)
- Suggestions for my Selection Sort / Java
- Fortran Debugging
- Debug Excel VSTO add-in when launched by double-clicking existing file
- Starting GDB with interpreter mi via .gdbinit file
- How to print call stack in Swift?
- Preventing threads in Xcode
Related Questions in GARBAGE-COLLECTION
- JVM is functioning very differently with same flags
- Why WeakReference to a WeakRef object is not garbage collected?
- GC cleaning the object before calling onPictureTaken method
- Know what objects got garbage collected
- Practical case JVM tunning to avoid full GC
- GC overhead limit exceed when reading large file
- Can java string literals be garbage collected?. If Yes, how to prove it?
- G1 doesn't process soft references
- why do I have to swapCursor(null) in onLoaderReset?
- Is it safe to assume static variables never get cleared?
- JVM ClassUnloadingWithConcurrentMark flag
- Java 8 Metaspace - Avoid decrease
- node.js memory usage issue
- G1GC Strange behavior
- Exposing whether an application is undergoing GC via UDP
Related Questions in SOS
- Is there a way to check if garbage collection was triggered while analyzing dump file through SOS.dll
- Android app to app communication
- Failed to find runtime clr.dll to use sos
- Lot of System.Invalidoperation - SOS has no stack trace
- Date Difference Query
- How to load SOS in Windbg for a 32bit app running on a 64bit server
- Memory Dump in Visual Studio
- Comparing two dump files for report on objects with highest growth
- windbg: version of loaded assemblies
- SOS commands fail while live debugging a process which has multiple versions of CLR loaded
- How to read a string with SOS?
- Windbg: psscor4 doesn't work
- How to make PANIC BUTTON working on bluetooth
- Automating WinDBG or otherwise extracting information from Dump Files?
- How to display managed objects with certain value in one of the fields in WinDbg using SOS (or SOSEX)?
Related Questions in SOSEX
- Is there a way to check if garbage collection was triggered while analyzing dump file through SOS.dll
- How to display managed objects with certain value in one of the fields in WinDbg using SOS (or SOSEX)?
- Dumping only rooted managed objects and/or statistics on them inside WinDbg
- Live debug a .NET application, the !mt command just returns "Unable to resolve call target. Error = 0x80004005"
- Breakpoint set by sosex.mbp or sosex.mbm not working
- Why does sosex!dlk run forever on Windows 7?
- Using embedded symbols with WinDbg
- Is there any way to get the values of local variables (like sosex !mdv) with ClrMD?
- Warning: Multiple managed methods at this address
- sosex.mbm: setting a command argument
- !dumpheap -min for strings does not work as expected
- Source code information missing with SOS/SOSEX
- Use register for .NET sosex extension
- Windbg: Breakpoint SOS, or SOSEX.DLL name of the method
- Why do SOS/SOSEx misinterpret the values of a System.Collections.Generic.List.Enumerator?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
In a comment you mention
If you have an object in Gen 2, then garbage collection ran at least 2 times, otherwise it would be in Gen 0.
Now that you know it, it's obvious that this information is not really helpful. You want to know why it remains in memory.
To find out which reference keeps the large object in memory, use the SOS command
!gcroot. When you know that, review your code to find out where such a reference comes from or where it should be removed.If there is no reference any more, the object may be freed soon and it's just alive because no Gen 2 garbage collection has occurred since. See this great answer on IDisposable, which discusses the point of releasing a large object.
In your case, it might even be ok to call
GC.Collect()after releasing the reference. Usually you should not tamper with garbage collection, but if you always have such a large object and you certainly know that this object is no longer needed andGC.Collect()resolves the OOM exception, then it is the right thing to do.