memory leaks - WinDbg with dump files when you have a classic ASP app which uses a lot of .Net via interop -



memory leaks - WinDbg with dump files when you have a classic ASP app which uses a lot of .Net via interop -

ok, first please don't inquire why application way is. classic asp application in several areas uses .net , com , of .net reaches com! it's code reuse really, @ point .net introduced , used whole load of features, required within classic asp app , voile! kind of hellish beast appeared.

so question? can see looks serious memory leak in application (it's 32 bit) private bytes rocket 900mb+ , users start receive out of memory errors , odd issues part of page beingness rendered. took perfmon logs , added user action tracing code , tied info trace perfmon (working set , private bytes on w3wp). told me few things, did find issues with, "resolved" , release - though had no impact. stress test on app based on actions in iis logs, told me nil - can't replicate @ locally.

so got memory dump when hits around 900mb , analysing windbg. problem - have hardly used tool in past, , long time ago when did. ran few things like:

.loadby sos mscorwks !dumpheap -stat

i system.string biggest user of memory , dumped out strings console, it's meaningless, load of strings might expect see. can't see wood trees seems.

does have advice on how can interpret dmp file , determine using of memory? fact system.string "appears" using of (it's @ bottom), isn't quite true believe. not strictly .net app, how can thought of whether .net or classic asp/com using of memory?

update 1

thanks answers far thomas , alex. i'm struggling find root cause, have gone little deeper point see mutual pattern/theme emerging. please see following:

i summary of memory usage:

>!heap -s heap flags reserv commit virt free list ucr virt lock fast (k) (k) (k) (k) length blocks cont. heap ----------------------------------------------------------------------------- 002a0000 58001062 695360 677844 680772 2102 100 420 8 1f960 l

i redacted results show one, clear bulk of memory in head used address. @ address , can see of objects of size 2404, see these are:

>!heap -stat -h 002a0000 size #blocks total ( %) (percent of total busy bytes) 2404 cfce - 1d3c3738 (71.05) >!heap -flt s 2404

a big list returned expected , ensuring +ust gflags on w3wp before collecting dump , investigating number of these descriptive stack trace:

>!heap -p -a 4fc4d7b8 heap_entry size prev flags userptr usersize - state 4fc4d7b0 0484 0000 [07] 4fc4d7b8 02404 - (busy) trace: 414f 7c833ba5 ntdll!rtlinitializecriticalsection+0x00000010 77e67877 kernel32!initializecriticalsection+0x0000000e 79e8539b mscorwks!crstbase::initworker+0x000000a7 79e853d4 mscorwks!crst::crst+0x00000016 79e92b58 mscorwks!pendingtypeloadentry::pendingtypeloadentry+0x0000001c 79e92992 mscorwks!classloader::loadtypehandlefortypekey_inner+0x000000bd 79e92b01 mscorwks!classloader::loadtypehandlefortypekey_body+0x000001da 79e9272a mscorwks!classloader::loadtypehandlefortypekey+0x000000ae 79e9359f mscorwks!classloader::ensureloaded+0x000000a6 79e932d9 mscorwks!methodtable::dofullyload+0x000000c1 79e9302f mscorwks!methodtable::dofullyload+0x00000180 79e9333c mscorwks!methodtable::dofullyload+0x00000142 79e92dc9 mscorwks!classloader::notify+0x00000104 79e92764 mscorwks!classloader::loadtypehandlefortypekey+0x000000e8 79e934b3 mscorwks!classloader::loadtypedefthrowing+0x00000193 79e94515 mscorwks!classloader::loadtypehandlethrowing+0x000001f4 79e8c1f0 mscorwks!classloader::loadtypehandlethrowiffailed+0x0000001b 79efd389 mscorwks!classloader::loadtypebynamethrowing+0x0000003b 79efd315 mscorwks!binder::lookupclass+0x00000032 79efd3ab mscorwks!binder::fetchclass+0x0000001f 79f1ec2b mscorwks!refseccontext::init+0x000000ba 79ef3726 mscorwks!runtimetypehandle::createinstance+0x00000334 7d0663a +0x07d0663a 7d06567 +0x07d06567 7d063b5 +0x07d063b5 7d05ec3 +0x07d05ec3 7d05e60 +0x07d05e60 7d05e22 +0x07d05e22 7d05dda +0x07d05dda 7d05cbe +0x07d05cbe 7d05c44 +0x07d05c44 7d0582d +0x07d0582d

or

> !heap -p -a 4fca7ff0 address 4fca7ff0 found in _heap @ 2a0000 heap_entry size prev flags userptr usersize - state 4fca7fe8 0484 0000 [07] 4fca7ff0 02404 - (busy) trace: 414b 7c854f44 ntdll!rtlallocateheapslowly+0x00000041 7c83d7f0 ntdll!rtlallocateheap+0x00000e9f 79e747ac mscorwks!eeheapalloc+0x00000142 79e7482a mscorwks!eeheapallocinprocessheap+0x00000052 79e74853 mscorwks!operator new[]+0x00000025 79e927d9 mscorwks!pendingtypeloadtable::allocnewentry+0x0000000c 79e929ae mscorwks!classloader::loadtypehandlefortypekey_inner+0x000000d9 79e92b01 mscorwks!classloader::loadtypehandlefortypekey_body+0x000001da 79e9272a mscorwks!classloader::loadtypehandlefortypekey+0x000000ae 79e9359f mscorwks!classloader::ensureloaded+0x000000a6 79e92faa mscorwks!classloader::loadexactparentandinterfacestransitively+0x000000c2 79e92fe7 mscorwks!classloader::loadexactparents+0x00000027 79e92f24 mscorwks!classloader::doincrementalload+0x00000057 79e929e1 mscorwks!classloader::loadtypehandlefortypekey_inner+0x0000012c 79e92b01 mscorwks!classloader::loadtypehandlefortypekey_body+0x000001da 79e9272a mscorwks!classloader::loadtypehandlefortypekey+0x000000ae 79e934b3 mscorwks!classloader::loadtypedefthrowing+0x00000193 79e94515 mscorwks!classloader::loadtypehandlethrowing+0x000001f4 79e8c1f0 mscorwks!classloader::loadtypehandlethrowiffailed+0x0000001b 79efd389 mscorwks!classloader::loadtypebynamethrowing+0x0000003b 79efd315 mscorwks!binder::lookupclass+0x00000032 79efd3ab mscorwks!binder::fetchclass+0x0000001f 79f1ec2b mscorwks!refseccontext::init+0x000000ba 79ef3726 mscorwks!runtimetypehandle::createinstance+0x00000334 7d0663a +0x07d0663a 7d06567 +0x07d06567 7d063b5 +0x07d063b5 7d05ec3 +0x07d05ec3 7d05e60 +0x07d05e60 7d05e22 +0x07d05e22 7d05dda +0x07d05dda 7d05cbe +0x07d05cbe

what love able @ point see classes beingness instantiated give me clue user action (always classic asp page) calling (e.g. casp calls com or .net in turn phone call com or .net).

you need find roots holds these strings in memory. have few examples in article: http://alexatnet.com/articles/net-memory-management-and-garbage-collector might need utilize !gcroot command - should traverse object graph 1 of roots holds object.

.net memory-leaks asp-classic windbg

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -