473,902 Members | 3,778 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Memory Leak

I am using VS2008.

I have a Windows Service application which creates Crystal Reports. This is
a multi theaded application which can run several reports at one time.
My problem - there is a memory leak someplace. I can not detect the memory
leak by running several reports by hand, but when I run tha app as a
servrice and process few hundred reports there is significant memory leak.
The application can consume over 1GB of memory where it should not go over
200 mb. I have few other applications that use Crystal Reports and those
applications do not have memory leak, the big difference is those
applications are single threaded.

My question is are there any free tools I can use to find the memory leak?

I have tried http://www.softprodigy.com but I could not get it to work it
just locks up.

Thank You
Peter
Jun 27 '08
22 9382
Thanks for our help

I have fallowed the instructions and it seems to be working, but I do not
know what the results mean, I don't know how to read them
Here's a partial output, but I do not know what to do next.

!DumpHeap -stat

00687e2c 3572 285760
CrystalDecision s.CrystalReport s.Engine.Report Document
00d9c33c 21518 860720
com.crystaldeci sions.common.ke ycode.KeycodeDe finitionDataXML +feature
79101fe4 22600 1265600 System.Collecti ons.Hashtable
790fd8c4 22576 1351096 System.String
0015bbc0 295 2175560 Free
7912d9bc 22600 3270432 System.Collecti ons.Hashtable+b ucket[]

!DumpHeap -type System.Collecti ons.Hashtable+b ucket[]
Address MT Size
00fd15bc 7912d9bc 144
00fd1684 7912d9bc 144
00fd174c 7912d9bc 144
00fd18c0 7912d9bc 144
00fd1a60 7912d9bc 144
00fd1bd0 7912d9bc 144
00fd1cc4 7912d9bc 144
00fd1d8c 7912d9bc 144
00fd2168 7912d9bc 144
00fd2230 7912d9bc 144
00fd28c4 7912d9bc 216
00fd30ec 7912d9bc 144
00fd442c 7912d9bc 144
00fd4d3c 7912d9bc 456
00fd4f3c 7912d9bc 456
00fdeca0 7912d9bc 2880
00fe2ae8 7912d9bc 288
00fe2e4c 7912d9bc 144
00fe306c 7912d9bc 144
00fe3134 7912d9bc 144
00fe34a4 7912d9bc 144
00fe3de4 7912d9bc 144
00fe4c40 7912d9bc 144
00fe5438 7912d9bc 1296
010bb2e4 7912d9bc 144
010bb574 7912d9bc 144
010bb84c 7912d9bc 144
010bb978 7912d9bc 144
010bbb3c 7912d9bc 144
010bbc74 7912d9bc 144
010bbe30 7912d9bc 144
010bc180 7912d9bc 144
010bcbf8 7912d9bc 144
010c2dc0 7912d9bc 1296
010cde14 7912d9bc 144

!gcroot 00fdeca0

Note: Roots found on stacks may be false positives. Run "!help gcroot" for
more info.
Scan Thread 0 OSTHread 1490
Scan Thread 2 OSTHread 15dc
Scan Thread 5 OSTHread 11b0
Scan Thread 13 OSTHread de0
Scan Thread 14 OSTHread 1c68
Scan Thread 15 OSTHread 1e50
DOMAIN(001652D0 ):HANDLE(WeakSh ):6612c4:Root:0 10d0f48(System. Diagnostics.Sou rceSwitch)->
010d11e0(System .Diagnostics.Sw itchElementsCol lection)->
00fd536c(System .Configuration. RuntimeConfigur ationRecord)->
00fd619c(System .Collections.Ha shtable)->
00fdeca0(System .Collections.Ha shtable+bucket[])
""Jeffrey Tan[MSFT]"" <je***@online.m icrosoft.comwro te in message
news:pr******** ******@TK2MSFTN GHUB02.phx.gbl. ..
Hi Peter,

Thanks for your feedback.

Actually, there is no need to run vadump.exe because we have used
different
counters from Process Explorer to confirm the memory leak. So we may
ignore
the first 3 steps in the link below and start from the step 4:
http://blogs.msdn.com/ricom/archive/...10/279612.aspx

!dumpheap and !eeheap are both the windbg extension commands exported by
SOS.dll which is written by the CLR team for internal debugging purpose.
So, we need to install windbg to debug this memory leak instead of using
VS
debugger. Yes, we can use VS debugger with SOS.dll, but it is
inconvenient.
The link below talks about how to use VS debugger+SOS.dl l for .Net
debugging:
".NET Finalizer Memory Leak: Debugging with sos.dll in Visual Studio"
http://blogs.msdn.com/tess/archive/2...mory-leak-debu
gging-with-sos-dll-in-visual-studio.aspx

I prefer windbg because it is more powerful and convenient for production
debugging than VS debugger and it is free. If you have never used windbg
before, you can follow the basic setup in the blog I written below:
"How to debug application crash/hang in production environment"
http://blogs.msdn.com/msdnts/archive...pplication-cra
sh-hang-in-production-environment.asp x

After completing the windbg installation and configuration, you can follow
to start from "Step 4: Attach Windbg and load SOS" in the first blog link
above.

If there is anything unclear, please feel free to tell me, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=============== =============== ===========
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

This posting is provided "AS IS" with no warranties, and confers no
rights.

Jun 27 '08 #11
Hi Peter,

Thanks for your feedback.

The "!DumpHeap - stat" command will group all the objects on the heap
based on their types. The output is sorted by the occupied space of each
type(3rd column), so we can find out the objects that occupy the largest
memory space. For detailed explanation of this command, please refer to:
"!dumpheap -stat explained¡* (debugging .net leaks)"
http://blogs.msdn.com/tess/archive/2...25/496973.aspx.

In your output, is "System.Collect ions.Hashtable+ bucket[]" the last line in
the output? From the output, "System.Collect ions.Hashtable+ bucket[]" type
only occupes about 3MB of memory(3270432) , so it may not be the culprit of
the leaking problem.

Can you paste the last several lines of the output? There should be a
summary line stating the total objects and total heap object sizes, like
"Total 9,712,896 objects, Total size: 1,032,127,612".

Thanks!

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=============== =============== ===========
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 27 '08 #12
Here are the results from !dumpheap -stat
!dumpheap -stat

00d951f4 13173 316152 CrystalDecision s.Shared.Export Options
790fa9d8 23429 374864 System.__ComObj ect
04e7c68c 12603 403296
CrystalDecision s.CrystalReport s.Engine.DataSo urceCacheItem
04e7715c 12603 403296 CrystalDecision s.CrystalReport s.Engine.Table
00687f64 13172 1053760
CrystalDecision s.CrystalReport s.Engine.Report Document
00164450 2373 2024340 Free
790fd8c4 60981 3590148 System.String
79101fe4 94954 5317424 System.Collecti ons.Hashtable
7912d9bc 94956 13689264 System.Collecti ons.Hashtable+b ucket[]
Total 449066 objects

!dumpheap -mt 7912d9bc

total 94956 objects
Statistics:
MT Count TotalSize Class Name
7912d9bc 94956 13689264 System.Collecti ons.Hashtable+b ucket[]
Total 94956 objects
""Jeffrey Tan[MSFT]"" <je***@online.m icrosoft.comwro te in message
news:wU******** ********@TK2MSF TNGHUB02.phx.gb l...
Hi Peter,

Thanks for your feedback.

The "!DumpHeap - stat" command will group all the objects on the heap
based on their types. The output is sorted by the occupied space of each
type(3rd column), so we can find out the objects that occupy the largest
memory space. For detailed explanation of this command, please refer to:
"!dumpheap -stat explained¡* (debugging .net leaks)"
http://blogs.msdn.com/tess/archive/2...25/496973.aspx.

In your output, is "System.Collect ions.Hashtable+ bucket[]" the last line
in
the output? From the output, "System.Collect ions.Hashtable+ bucket[]" type
only occupes about 3MB of memory(3270432) , so it may not be the culprit of
the leaking problem.

Can you paste the last several lines of the output? There should be a
summary line stating the total objects and total heap object sizes, like
"Total 9,712,896 objects, Total size: 1,032,127,612".

Thanks!

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=============== =============== ===========
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 8 '08 #13
Hi Peter,

Thanks for your feedback.

The command output indicates that the largest object size on the GC heap is
of type "System.Collect ions.Hashtable+ bucket[]". However, it only costs
less than 14M memory: "13689264". So, it should not be the culprit of the
memory leaking problem.

Can you issue command "!eeheap" in your application? This command will dump
a summary report of all the managed heaps in the application. I suspect the
GC heap is not leaking that much memory yet. You may paste the "!eeheap"
command output here for analysis. Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=============== =============== ===========
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 9 '08 #14
Here it is the !eeheap
Loader Heap:
--------------------------------------
System Domain: 7a3bc8b8
LowFrequencyHea p: Size: 0x0(0)bytes.
HighFrequencyHe ap: 00672000(8000:1 000) Size: 0x1000(4096)byt es.
StubHeap: 0067a000(2000:2 000) 04150000(10000: 7000) Size: 0x9000(36864)by tes.
Virtual Call Stub Heap:
IndcellHeap: Size: 0x0(0)bytes.
LookupHeap: Size: 0x0(0)bytes.
ResolveHeap: Size: 0x0(0)bytes.
DispatchHeap: Size: 0x0(0)bytes.
CacheEntryHeap: Size: 0x0(0)bytes.
Total size: 0xa000(40960)by tes
--------------------------------------
Shared Domain: 7a3bc560
LowFrequencyHea p: 006a0000(2000:1 000) Size: 0x1000(4096)byt es.
HighFrequencyHe ap: 006a2000(8000:1 000) Size: 0x1000(4096)byt es.
StubHeap: 006aa000(2000:1 000) Size: 0x1000(4096)byt es.
Virtual Call Stub Heap:
IndcellHeap: 006b0000(2000:1 000) Size: 0x1000(4096)byt es.
LookupHeap: 006b5000(2000:1 000) Size: 0x1000(4096)byt es.
ResolveHeap: 006bb000(5000:1 000) Size: 0x1000(4096)byt es.
DispatchHeap: 006b7000(4000:1 000) Size: 0x1000(4096)byt es.
CacheEntryHeap: 006b2000(3000:1 000) Size: 0x1000(4096)byt es.
Total size: 0x7000(28672)by tes
--------------------------------------
Domain 1: 15a790
LowFrequencyHea p: 00680000(2000:2 000) 00b90000(10000: d000)
00d80000(10000: 10000) 00dc0000(10000: f000) 03890000(10000: f000)
039a0000(10000: f000) 00ac0000(10000: f000) 077b0000(10000: 10000)
07ee0000(10000: 10000) 08860000(10000: 10000) 07000000(10000: d000)
05c90000(20000: 20000) 05e40000(10000: c000) Size: 0xc4000(802816) bytes.
Wasted: 0xa000(40960)by tes.
HighFrequencyHe ap: 00682000(8000:8 000) 00d90000(10000: 10000)
04e70000(10000: 10000) 07ab0000(10000: 10000) 07ed0000(10000: 10000)
07f50000(10000: 10000) 055c0000(10000: 10000) 05cc0000(10000: a000) Size:
0x72000(466944) bytes.
StubHeap: 0068a000(2000:2 000) 07ac0000(10000: 3000) Size: 0x5000(20480)by tes.
Virtual Call Stub Heap:
IndcellHeap: 00690000(2000:1 000) Size: 0x1000(4096)byt es.
LookupHeap: 00696000(1000:1 000) Size: 0x1000(4096)byt es.
ResolveHeap: 0069a000(6000:5 000) Size: 0x5000(20480)by tes.
DispatchHeap: 00697000(3000:2 000) Size: 0x2000(8192)byt es.
CacheEntryHeap: 00692000(4000:1 000) Size: 0x1000(4096)byt es.
Total size: 0x144000(132710 4)bytes
--------------------------------------
Jit code heap:
LoaderCodeHeap: 05d30000(10000: 8000) Size: 0x8000(32768)by tes.
LoaderCodeHeap: 05cb0000(10000: 10000) Size: 0x10000(65536)b ytes.
LoaderCodeHeap: 050a0000(10000: 10000) Size: 0x10000(65536)b ytes.
LoaderCodeHeap: 06fe0000(10000: 10000) Size: 0x10000(65536)b ytes.
LoaderCodeHeap: 088b0000(10000: 10000) Size: 0x10000(65536)b ytes.
LoaderCodeHeap: 077e0000(10000: f000) Size: 0xf000(61440)by tes.
LoaderCodeHeap: 05290000(10000: 10000) Size: 0x10000(65536)b ytes.
LoaderCodeHeap: 00b50000(10000: f000) Size: 0xf000(61440)by tes.
LoaderCodeHeap: 00ba0000(10000: e000) Size: 0xe000(57344)by tes.
Total size: 0x84000(540672) bytes
--------------------------------------
Module Thunk heaps:
Module 790c2000: Size: 0x0(0)bytes.
Module 006a239c: Size: 0x0(0)bytes.
Module 006a2010: Size: 0x0(0)bytes.
Module 00682c3c: Size: 0x0(0)bytes.
Module 67a30000: Size: 0x0(0)bytes.
Module 7a726000: Size: 0x0(0)bytes.
Module 00683e94: Size: 0x0(0)bytes.
Module 006851d4: Size: 0x0(0)bytes.
Module 006862f4: Size: 0x0(0)bytes.
Module 7b454000: Size: 0x0(0)bytes.
Module 7ae74000: Size: 0x0(0)bytes.
Module 00d90084: Size: 0x0(0)bytes.
Module 00d9070c: Size: 0x0(0)bytes.
Module 00d90ea4: Size: 0x0(0)bytes.
Module 648ea000: Size: 0x0(0)bytes.
Module 639f8000: Size: 0x0(0)bytes.
Module 00d92568: Size: 0x0(0)bytes.
Module 653f2000: 03860000(10000: 1000) Size: 0x1000(4096)byt es.
Module 00d95f14: Size: 0x0(0)bytes.
Module 00d97404: Size: 0x0(0)bytes.
Module 00d983c0: Size: 0x0(0)bytes.
Module 00d9901c: Size: 0x0(0)bytes.
Module 00d995b8: Size: 0x0(0)bytes.
Module 00d9ab64: Size: 0x0(0)bytes.
Module 6638c000: Size: 0x0(0)bytes.
Module 67b2e000: Size: 0x0(0)bytes.
Module 67426000: Size: 0x0(0)bytes.
Module 04cf4000: 04d50000(10000: 2000) Size: 0x2000(8192)byt es.
Module 6037e000: 077a0000(10000: 2000) Size: 0x2000(8192)byt es.
Module 04e7a46c: Size: 0x0(0)bytes.
Module 65da0000: Size: 0x0(0)bytes.
Module 07ed601c: Size: 0x0(0)bytes.
Module 07ed6ca4: Size: 0x0(0)bytes.
Module 07f51f54: Size: 0x0(0)bytes.
Module 07f5fb04: Size: 0x0(0)bytes.
Module 055c341c: Size: 0x0(0)bytes.
Total size: 0x5000(20480)by tes
--------------------------------------
Module Lookup Table heaps:
Module 790c2000: Size: 0x0(0)bytes.
Module 006a239c: Size: 0x0(0)bytes.
Module 006a2010: Size: 0x0(0)bytes.
Module 00682c3c: Size: 0x0(0)bytes.
Module 67a30000: Size: 0x0(0)bytes.
Module 7a726000: Size: 0x0(0)bytes.
Module 00683e94: Size: 0x0(0)bytes.
Module 006851d4: Size: 0x0(0)bytes.
Module 006862f4: Size: 0x0(0)bytes.
Module 7b454000: Size: 0x0(0)bytes.
Module 7ae74000: Size: 0x0(0)bytes.
Module 00d90084: Size: 0x0(0)bytes.
Module 00d9070c: Size: 0x0(0)bytes.
Module 00d90ea4: Size: 0x0(0)bytes.
Module 648ea000: Size: 0x0(0)bytes.
Module 639f8000: Size: 0x0(0)bytes.
Module 00d92568: Size: 0x0(0)bytes.
Module 653f2000: Size: 0x0(0)bytes.
Module 00d95f14: Size: 0x0(0)bytes.
Module 00d97404: Size: 0x0(0)bytes.
Module 00d983c0: Size: 0x0(0)bytes.
Module 00d9901c: Size: 0x0(0)bytes.
Module 00d995b8: Size: 0x0(0)bytes.
Module 00d9ab64: Size: 0x0(0)bytes.
Module 6638c000: Size: 0x0(0)bytes.
Module 67b2e000: Size: 0x0(0)bytes.
Module 67426000: Size: 0x0(0)bytes.
Module 04cf4000: Size: 0x0(0)bytes.
Module 6037e000: Size: 0x0(0)bytes.
Module 04e7a46c: Size: 0x0(0)bytes.
Module 65da0000: Size: 0x0(0)bytes.
Module 07ed601c: Size: 0x0(0)bytes.
Module 07ed6ca4: Size: 0x0(0)bytes.
Module 07f51f54: Size: 0x0(0)bytes.
Module 07f5fb04: Size: 0x0(0)bytes.
Module 055c341c: Size: 0x0(0)bytes.
Total size: 0x0(0)bytes
--------------------------------------
Total LoaderHeap size: 0x1de000(195788 8)bytes
=============== =============== =========
Number of GC Heaps: 1
generation 0 starts at 0x1e7800f4
generation 1 starts at 0x1e770098
generation 2 starts at 0x00fd1000
ephemeral segment allocation context: none
segment begin allocated size
001960a0 7b463c40 7b47a744 0x00016b04(9293 2)
0017c2a8 7a733370 7a754b98 0x00021828(1372 56)
00170ec0 790d8620 790f7d8c 0x0001f76c(1288 76)
00fd0000 00fd1000 01e3aa38 0x00e69a38(1511 2760)
1e5e0000 1e5e1000 1e7bc100 0x001db100(1945 856)
Large object heap starts at 0x01fd1000
segment begin allocated size
01fd0000 01fd1000 0211c910 0x0014b910(1358 096)
Total Size 0x11e7ee0(18775 776)
------------------------------
GC Heap Size 0x11e7ee0(18775 776)

""Jeffrey Tan[MSFT]"" <je***@online.m icrosoft.comwro te in message
news:W6******** ******@TK2MSFTN GHUB02.phx.gbl. ..
Hi Peter,

Thanks for your feedback.

The command output indicates that the largest object size on the GC heap
is
of type "System.Collect ions.Hashtable+ bucket[]". However, it only costs
less than 14M memory: "13689264". So, it should not be the culprit of the
memory leaking problem.

Can you issue command "!eeheap" in your application? This command will
dump
a summary report of all the managed heaps in the application. I suspect
the
GC heap is not leaking that much memory yet. You may paste the "!eeheap"
command output here for analysis. Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=============== =============== ===========
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 9 '08 #15
Hi Peter,

Thanks for your feedback.

As the !eeheap output stated, the GC heap only costs more than 18M of
memory(18775776 ) which is not the culprit for the memory leak(as you
original stated, the memory leak costs more than 1Gb of memory). So, I
should conclude this as an unmanaged memory leak.

Does your application use any unmanaged code? For example, do you use
p/invoke or COM interop in the application? Do you use any 3rd party
component that may cause the unmanaged memory leak?

Also, I recommend you to issue "!address -summary" command in windbg and
paste the result here. This command will generate a memory usage summary
report of the entire process from OS point of view instead of .Net point of
view.

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=============== =============== ===========
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
Jul 10 '08 #16
I let the program run longer before I took the readings and here are the
results, the 1 Gb only occurs after the program runs for few days. This
time the Windows Task Manager reported 905644 K

The program does not use any p/Invoke or COM directly, but it's using
Crystal Reports .NET library and I don't know if Crystal Reports is using
any p/Invoike..

!eeheap

Loader Heap:
--------------------------------------
System Domain: 7a3bc8b8
LowFrequencyHea p: Size: 0x0(0)bytes.
HighFrequencyHe ap: 00672000(8000:1 000) Size: 0x1000(4096)byt es.
StubHeap: 0067a000(2000:2 000) 04150000(10000: 8000) Size: 0xa000(40960)by tes.
Virtual Call Stub Heap:
IndcellHeap: Size: 0x0(0)bytes.
LookupHeap: Size: 0x0(0)bytes.
ResolveHeap: Size: 0x0(0)bytes.
DispatchHeap: Size: 0x0(0)bytes.
CacheEntryHeap: Size: 0x0(0)bytes.
Total size: 0xb000(45056)by tes
--------------------------------------
Shared Domain: 7a3bc560
LowFrequencyHea p: 006a0000(2000:1 000) Size: 0x1000(4096)byt es.
HighFrequencyHe ap: 006a2000(8000:1 000) Size: 0x1000(4096)byt es.
StubHeap: 006aa000(2000:1 000) Size: 0x1000(4096)byt es.
Virtual Call Stub Heap:
IndcellHeap: 006b0000(2000:1 000) Size: 0x1000(4096)byt es.
LookupHeap: 006b5000(2000:1 000) Size: 0x1000(4096)byt es.
ResolveHeap: 006bb000(5000:1 000) Size: 0x1000(4096)byt es.
DispatchHeap: 006b7000(4000:1 000) Size: 0x1000(4096)byt es.
CacheEntryHeap: 006b2000(3000:1 000) Size: 0x1000(4096)byt es.
Total size: 0x7000(28672)by tes
--------------------------------------
Domain 1: 15a790
LowFrequencyHea p: 00680000(2000:2 000) 00b90000(10000: d000)
00d80000(10000: 10000) 00dc0000(10000: f000) 03890000(10000: f000)
039a0000(10000: f000) 00a80000(10000: 10000) 07d00000(10000: 10000)
09a80000(10000: 10000) 087a0000(10000: f000) 05230000(10000: f000)
058d0000(20000: 20000) 05d50000(10000: c000) Size: 0xc6000(811008) bytes.
Wasted: 0x8000(32768)by tes.
HighFrequencyHe ap: 00682000(8000:8 000) 00d90000(10000: 10000)
04e70000(10000: 10000) 09a20000(10000: 10000) 09a30000(10000: 10000)
09ab0000(10000: 10000) 05100000(10000: 10000) 058f0000(10000: a000) Size:
0x72000(466944) bytes.
StubHeap: 0068a000(2000:2 000) 07d30000(10000: 4000) Size: 0x6000(24576)by tes.
Virtual Call Stub Heap:
IndcellHeap: 00690000(2000:1 000) Size: 0x1000(4096)byt es.
LookupHeap: 00696000(1000:1 000) Size: 0x1000(4096)byt es.
ResolveHeap: 0069a000(6000:5 000) Size: 0x5000(20480)by tes.
DispatchHeap: 00697000(3000:2 000) Size: 0x2000(8192)byt es.
CacheEntryHeap: 00692000(4000:1 000) Size: 0x1000(4096)byt es.
Total size: 0x147000(133939 2)bytes
--------------------------------------
Jit code heap:
LoaderCodeHeap: 05990000(10000: a000) Size: 0xa000(40960)by tes.
LoaderCodeHeap: 05900000(10000: 10000) Size: 0x10000(65536)b ytes.
LoaderCodeHeap: 05200000(10000: 10000) Size: 0x10000(65536)b ytes.
LoaderCodeHeap: 087d0000(10000: 10000) Size: 0x10000(65536)b ytes.
LoaderCodeHeap: 08790000(10000: 10000) Size: 0x10000(65536)b ytes.
LoaderCodeHeap: 07cf0000(10000: 10000) Size: 0x10000(65536)b ytes.
LoaderCodeHeap: 05360000(10000: 10000) Size: 0x10000(65536)b ytes.
LoaderCodeHeap: 00b10000(10000: d000) Size: 0xd000(53248)by tes.
LoaderCodeHeap: 00ba0000(10000: d000) Size: 0xd000(53248)by tes.
Total size: 0x84000(540672) bytes
--------------------------------------
Module Thunk heaps:
Module 790c2000: Size: 0x0(0)bytes.
Module 006a239c: Size: 0x0(0)bytes.
Module 006a2010: Size: 0x0(0)bytes.
Module 00682c3c: Size: 0x0(0)bytes.
Module 67a30000: Size: 0x0(0)bytes.
Module 7a726000: Size: 0x0(0)bytes.
Module 00683e94: Size: 0x0(0)bytes.
Module 006851d4: Size: 0x0(0)bytes.
Module 006862f4: Size: 0x0(0)bytes.
Module 7b454000: Size: 0x0(0)bytes.
Module 7ae74000: Size: 0x0(0)bytes.
Module 00d90084: Size: 0x0(0)bytes.
Module 00d9070c: Size: 0x0(0)bytes.
Module 00d90ea4: Size: 0x0(0)bytes.
Module 648ea000: Size: 0x0(0)bytes.
Module 639f8000: Size: 0x0(0)bytes.
Module 00d92568: Size: 0x0(0)bytes.
Module 653f2000: 03860000(10000: 1000) Size: 0x1000(4096)byt es.
Module 00d95f14: Size: 0x0(0)bytes.
Module 00d97404: Size: 0x0(0)bytes.
Module 00d983c0: Size: 0x0(0)bytes.
Module 00d9901c: Size: 0x0(0)bytes.
Module 00d995b8: Size: 0x0(0)bytes.
Module 00d9ab64: Size: 0x0(0)bytes.
Module 6638c000: Size: 0x0(0)bytes.
Module 67b2e000: Size: 0x0(0)bytes.
Module 67426000: Size: 0x0(0)bytes.
Module 04cf4000: 04d50000(10000: 2000) Size: 0x2000(8192)byt es.
Module 6037e000: 07ce0000(10000: 2000) Size: 0x2000(8192)byt es.
Module 04e7a4e4: Size: 0x0(0)bytes.
Module 65da0000: Size: 0x0(0)bytes.
Module 09a36184: Size: 0x0(0)bytes.
Module 09a36e0c: Size: 0x0(0)bytes.
Module 09abcab4: Size: 0x0(0)bytes.
Module 09abfaac: Size: 0x0(0)bytes.
Module 05103434: Size: 0x0(0)bytes.
Total size: 0x5000(20480)by tes
--------------------------------------
Module Lookup Table heaps:
Module 790c2000: Size: 0x0(0)bytes.
Module 006a239c: Size: 0x0(0)bytes.
Module 006a2010: Size: 0x0(0)bytes.
Module 00682c3c: Size: 0x0(0)bytes.
Module 67a30000: Size: 0x0(0)bytes.
Module 7a726000: Size: 0x0(0)bytes.
Module 00683e94: Size: 0x0(0)bytes.
Module 006851d4: Size: 0x0(0)bytes.
Module 006862f4: Size: 0x0(0)bytes.
Module 7b454000: Size: 0x0(0)bytes.
Module 7ae74000: Size: 0x0(0)bytes.
Module 00d90084: Size: 0x0(0)bytes.
Module 00d9070c: Size: 0x0(0)bytes.
Module 00d90ea4: Size: 0x0(0)bytes.
Module 648ea000: Size: 0x0(0)bytes.
Module 639f8000: Size: 0x0(0)bytes.
Module 00d92568: Size: 0x0(0)bytes.
Module 653f2000: Size: 0x0(0)bytes.
Module 00d95f14: Size: 0x0(0)bytes.
Module 00d97404: Size: 0x0(0)bytes.
Module 00d983c0: Size: 0x0(0)bytes.
Module 00d9901c: Size: 0x0(0)bytes.
Module 00d995b8: Size: 0x0(0)bytes.
Module 00d9ab64: Size: 0x0(0)bytes.
Module 6638c000: Size: 0x0(0)bytes.
Module 67b2e000: Size: 0x0(0)bytes.
Module 67426000: Size: 0x0(0)bytes.
Module 04cf4000: Size: 0x0(0)bytes.
Module 6037e000: Size: 0x0(0)bytes.
Module 04e7a4e4: Size: 0x0(0)bytes.
Module 65da0000: Size: 0x0(0)bytes.
Module 09a36184: Size: 0x0(0)bytes.
Module 09a36e0c: Size: 0x0(0)bytes.
Module 09abcab4: Size: 0x0(0)bytes.
Module 09abfaac: Size: 0x0(0)bytes.
Module 05103434: Size: 0x0(0)bytes.
Total size: 0x0(0)bytes
--------------------------------------
Total LoaderHeap size: 0x1e2000(197427 2)bytes
=============== =============== =========
Number of GC Heaps: 1
generation 0 starts at 0x215e4520
generation 1 starts at 0x215e39e8
generation 2 starts at 0x00fd1000
ephemeral segment allocation context: none
segment begin allocated size
001960a0 7b463c40 7b47a744 0x00016b04(9293 2)
0017c2a8 7a733370 7a754b98 0x00021828(1372 56)
00170ec0 790d8620 790f7d8c 0x0001f76c(1288 76)
00fd0000 00fd1000 01fcc05c 0x00ffb05c(1675 6828)
1f9e0000 1f9e1000 209a0744 0x00fbf744(1651 2836)
1e1e0000 1e1e1000 1f1ad534 0x00fcc534(1656 5556)
209e0000 209e1000 21631628 0x00c50628(1291 2168)
Large object heap starts at 0x01fd1000
segment begin allocated size
01fd0000 01fd1000 02278b48 0x002a7b48(2784 072)
Total Size 0x3ed68dc(65890 524)
------------------------------
GC Heap Size 0x3ed68dc(65890 524)
----------------------------------------------------------------------------------------------------------------------------------------------------------------
!address -summary

-------------------- Usage SUMMARY --------------------------
TotSize ( KB) Pct(Tots) Pct(Busy) Usage
a2dc000 ( 166768) : 07.95% 14.11% : RegionUsageIsVA D
37dcd000 ( 915252) : 43.64% 00.00% : RegionUsageFree
abe3000 ( 176012) : 08.39% 14.89% : RegionUsageImag e
1210000 ( 18496) : 00.88% 01.57% : RegionUsageStac k
13000 ( 76) : 00.00% 00.01% : RegionUsageTeb
3213e000 ( 820472) : 39.12% 69.42% : RegionUsageHeap
0 ( 0) : 00.00% 00.00% : RegionUsagePage Heap
1000 ( 4) : 00.00% 00.00% : RegionUsagePeb
1000 ( 4) : 00.00% 00.00% : RegionUsageProc essParametrs
1000 ( 4) : 00.00% 00.00% : RegionUsageEnvi ronmentBlock
Tot: 7fff0000 (2097088 KB) Busy: 48223000 (1181836 KB)

-------------------- Type SUMMARY --------------------------
TotSize ( KB) Pct(Tots) Usage
37dcd000 ( 915252) : 43.64% : <free>
b4b3000 ( 185036) : 08.82% : MEM_IMAGE
759000 ( 7524) : 00.36% : MEM_MAPPED
3c617000 ( 989276) : 47.17% : MEM_PRIVATE

-------------------- State SUMMARY --------------------------
TotSize ( KB) Pct(Tots) Usage
40baf000 ( 1060540) : 50.57% : MEM_COMMIT
37dcd000 ( 915252) : 43.64% : MEM_FREE
7674000 ( 121296) : 05.78% : MEM_RESERVE

Largest free region: Base 6dffa000 - Size 03ae6000 (60312 KB)
""Jeffrey Tan[MSFT]"" <je***@online.m icrosoft.comwro te in message
news:1K******** ******@TK2MSFTN GHUB02.phx.gbl. ..
Hi Peter,

Thanks for your feedback.

As the !eeheap output stated, the GC heap only costs more than 18M of
memory(18775776 ) which is not the culprit for the memory leak(as you
original stated, the memory leak costs more than 1Gb of memory). So, I
should conclude this as an unmanaged memory leak.

Does your application use any unmanaged code? For example, do you use
p/invoke or COM interop in the application? Do you use any 3rd party
component that may cause the unmanaged memory leak?

Also, I recommend you to issue "!address -summary" command in windbg and
paste the result here. This command will generate a memory usage summary
report of the entire process from OS point of view instead of .Net point
of
view.

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=============== =============== ===========
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

This posting is provided "AS IS" with no warranties, and confers no
rights.


Jul 11 '08 #17
Hi Peter,

Thanks for the further information, it is quite useful.

From the "!eeheap" output we can see that GC heap only costs 66M of memory
which is much less than the 900M total memory usage. From the "!address
-summary" output, we finally caught the culprit RegionUsageHeap which costs
more than 800M(820472KB) of memory. Since RegionUsageHeap indicates the
Windows native heap, this should be an unmanaged memory leak.

In this scenario, I would recommend you to use umdh.exe to troubleshooting
the native heap memory leak. UMDH is a tool followed with windbg package.
It will can turn-on and query the Windows native heap manager memory
tracking ability. During the memory leaking period, you may use UMDH to
take two snapshots of the heap manager states. Then, you may use the
build-in function of UMDH to compare these two snapshots and find out the
memory leaking point. The KB below demonstrates the detailed steps:
"Umdhtools. exe: How to use Umdh.exe to find memory leaks"
http://support.microsoft.com/default.aspx/kb/268343

Hope it helps.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=============== =============== ===========
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 11 '08 #18
I do not understand what I have to do.

I went to http://www.microsoft.com/whdc/DevToo...default.mspx#c
and downloaded the ISO file created CD and installed it on the hard drive,
but I do not have gflags or Umdh.exe anywhere on the hard drive so obviously
I am installing the wrong thing.

What should I install?
""Jeffrey Tan[MSFT]"" <je***@online.m icrosoft.comwro te in message
news:m4******** ********@TK2MSF TNGHUB02.phx.gb l...
Hi Peter,

Thanks for the further information, it is quite useful.

From the "!eeheap" output we can see that GC heap only costs 66M of memory
which is much less than the 900M total memory usage. From the "!address
-summary" output, we finally caught the culprit RegionUsageHeap which
costs
more than 800M(820472KB) of memory. Since RegionUsageHeap indicates the
Windows native heap, this should be an unmanaged memory leak.

In this scenario, I would recommend you to use umdh.exe to troubleshooting
the native heap memory leak. UMDH is a tool followed with windbg package.
It will can turn-on and query the Windows native heap manager memory
tracking ability. During the memory leaking period, you may use UMDH to
take two snapshots of the heap manager states. Then, you may use the
build-in function of UMDH to compare these two snapshots and find out the
memory leaking point. The KB below demonstrates the detailed steps:
"Umdhtools. exe: How to use Umdh.exe to find memory leaks"
http://support.microsoft.com/default.aspx/kb/268343

Hope it helps.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=============== =============== ===========
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 11 '08 #19
Hi Peter,

Thanks for the feedback.

I assume you have installed windbg yet because you can use "!address
-summary" command. If so, there is no need to install it again. Umdh.exe is
a tool followed with windbg, so if you have installed windbg, umdh is
there. You can find the umdh.exe by going to windbg's installation
directory, such as "D:\Debuggi ng Tools for Windows (x86)". You will find
umdh.exe in this directory. Gflags.exe is in this directory either.

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=============== =============== ===========
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 14 '08 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3425
by: ranjeet.gupta | last post by:
Dear All Is the Root Cause of the Memory corruption is the Memory leak, ?? suppose If in the code there is Memory leak, Do this may lead to the Memory Corruption while executing the program ? In nut shell, what is/are the realtion/s between the Memory Leak and Memory Corruption. Juts Theoritical Assumtion below:
17
4834
by: José Joye | last post by:
Hi, I have implemented a Service that is responsible for getting messages from a MS MQ located on a remote machine. I'm getting memory leak from time to time (???). In some situation, it is easier to reproduce (e.g.: remote machine not available). After about 1 day, I get a usage of 300MB of memory. I have used .NET Memory Profiler tool to try to see where the leak is located. For all the leaky instances, I can see the following (I...
4
6103
by: Don Nell | last post by:
Hello Why is there a memory leak when this code is executed. for(;;) { ManagementScope scope = new ManagementScope(); scope.Options.Username="username"; scope.Options.Password="password"; scope.Path.Path=@"\\pc\root\cimv2";
20
8135
by: jeevankodali | last post by:
Hi I have an .Net application which processes thousands of Xml nodes each day and for each node I am using around 30-40 Regex matches to see if they satisfy some conditions are not. These Regex matches are called within a loop (like if or for). E.g. for(int i = 0; i < 10; i++) { Regex r = new Regex();
23
4588
by: James | last post by:
The following code will create memory leaks!!! using System; using System.Diagnostics; using System.Data; using System.Data.SqlClient; namespace MemoryLeak
8
8565
by: Adrian | last post by:
Hi I have a JS program that runs localy (under IE6 only) on a PC but it has a memory leak (probably the known MS one!) What applications are there that I could use to look at the memory usage of each object within my JS app to help locate my problem? Thanks
7
6944
by: Salvador | last post by:
Hi, I am using WMI to gather information about different computers (using win2K and win 2K3), checking common classes and also WMI load balance. My application runs every 1 minute and reports the status of the machines. Upon we follow the .NET object lifetime recommendations the application is constantly consuming more memory! The problem is on the ManagementObjectSearch, upon we Dispose the object it seems that is not releasing the...
3
5337
by: Jim Land | last post by:
Jack Slocum claims here http://www.jackslocum.com/yui/2006/10/02/3-easy-steps-to-avoid-javascript- memory-leaks/ that "almost every site you visit that uses JavaScript is leaking memory". Anybody know anything about this? Does *Javascript* leak memeory, or does the *browser* leak memory?
7
15727
by: Ragnar Agustsson | last post by:
Hi all I have been wandering about the best way to sandbox memory leaks in 3rd party libraries when using them from the .Net framework. I have a 3rd party library, written in C++, that leaks a lot of memory but I still had to use it. 1. After using DLLImport and seeing the memory leak I tried to load and
0
9997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10870
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10499
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5893
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4725
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4306
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3323
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.