qchbai / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Windows heap profiling #439

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Start application with HEAPPROFILE set
2.  Can consistently repro crash
3. Get really odd crasdh stacks like this: 

PRIMARY_PROBLEM_CLASS:  BAD_INSTRUCTION_PTR

BUGCHECK_STR:  APPLICATION_FAULT_BAD_INSTRUCTION_PTR_INVALID_POINTER_READ

LAST_CONTROL_TRANSFER:  from 10002a6a to c0000128

STACK_TEXT:  
WARNING: Frame IP not in any known module. Following frames may be wrong.
09f6f8ac 10002a6a 00001120 00001120 03210010 0xc0000128
752f5f7b 08553b00 c13b0674 edeb1374 6a084d8b 
libtcmalloc_minimal!DumpProfileLocked+0x12a
752f61ef c0339090 900004c2 90909090 8b55ff8b 
libmcast!McastIHGroup::trig_read+0x1470
752f61fb 8b55ff8b 8b5653ec 57068bf1 00b490ff 0xc0339090
752f61ff 8b5653ec 57068bf1 00b490ff f88b0000 0x8b55ff8b

which seems to be crashing when exiting my method -  
libmcast!McastIHGroup::trig_read.

What is the expected output? What do you see instead?

I am trying to follow the changes in issue 267, and I am making some progress 
but my process eventually dumps with this exception and a corrupted stack:

Unhandled exception at 0xc0000128 in spectroserver.exe: 0xC0000005: Access 
violation reading location 0xc0000128.

and when it generates the heap profile output the files don't seem to contain 
much beyond loaded dlls.

Any suggestions on how to proceed to resolve these issue?  Anything I can take 
away from this 0xc0000128 address?

What version of the product are you using? On what operating system?
2.0 / Windows 7 x64

Please provide any additional information below.

My application is a monster, majority of in-house code but also 3rd party 
libraries too.  Natively multi-threaded, but also uses Fibers to implement 
user-mode threading( where a majority of the code runs ).  So I like to think 
of it as mostly single-threaded, but with some native helper threads to do 
background tasks.

Original issue reported on code.google.com by tkorn...@gmail.com on 25 Jun 2012 at 2:35

GoogleCodeExporter commented 9 years ago
Here is the example output I see, and I have attached the files.

Dumping heap profile to t.hprof.0001.heap (100 MB currently in use)
...
Dumping heap profile to t.hprof.0002.heap (200 MB currently in use)
Dumping heap profile to t.hprof.0003.heap (1874 MB allocated cumulatively, 278 M
B currently in use)

Original comment by tkorn...@gmail.com on 25 Jun 2012 at 2:43

Attachments: