app crashes on attempt to profile

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
baul
Posts: 3
Joined: Fri Feb 26, 2010 1:38 am

app crashes on attempt to profile

Post by baul » Fri Feb 26, 2010 3:08 am

Hi Guys,

Hoping that this is something trivial.

I am trying to profile an app and it simply crashes when profiler attempts to start it.
The crash occurs (according to the debugger) even before code reaches any application code, see stack dump below.

Environment: Windows 7/64
Memprofiler: 3.5.136 (evaluation version)
Application: WCF service host (run as a simple console app), 64 bit. Being WCF it spawns TCP/HTTP listeners etc. It needs Admin permissions to run.
The application can be run as either console app or as windows service. Trying to start either from under profiler results with the same error.

The app runs by itself just fine and once it is running i can attach profiler to it and get memory dumps, but was hoping that I could run it from under profiler as well.

Yes, I do start mem profiler as an Admin. Could it be that this is not being passed on onto the app?
Windows does generate application crash report and it has exception code of C0000005 (Access denied) I believe.

Any ideas?

Thank you,

Alexei

Stack dump:

Code: Select all


 	KernelBase.dll!DebugBreak()  + 0x2 bytes	
 	mscorwks.dll!string ".textd:\\iso_whid\\amd64fre\\base\\n"...()  + 0x842b9 bytes	
 	mscorwks.dll!EEPolicy::LogFatalError()  + 0x1af bytes	
 	mscorwks.dll!EEPolicy::HandleFatalError()  + 0x6e bytes	
 	mscorwks.dll!CLRVectoredExceptionHandlerPhase3()  + 0xcd bytes	
 	mscorwks.dll!CLRVectoredExceptionHandlerPhase2()  + 0x30 bytes	
 	mscorwks.dll!CLRVectoredExceptionHandler()  + 0xff bytes	
 	mscorwks.dll!CLRVectoredExceptionHandlerShim()  + 0x42 bytes	
 	ntdll.dll!RtlpCallVectoredHandlers()  + 0x330f bytes	
 	ntdll.dll!RtlDispatchException()  + 0x22 bytes	
 	ntdll.dll!KiUserExceptionDispatcher()  + 0x2e bytes	
>	mscorwks.dll!ThreadNative::InformThreadNameChangeEx()  + 0x111 bytes	
 	000007ff0083e8ea()	
 	000000000019f240()	
 	000000000019ea50()	
 	000000000019ee28()	
 	000000000019efb0()	
 	000000000019e9f0()	
 	0000000002c8acb8()	
 	0000000000000001()	
 	000000000019ee28()	
 	000000000019efb0()	
 	000000000019ee50()	
 	000007ff008c1840()	
 	000007ff0083e545()	
 	0000000002c8acb8()	

Windows event log has the following events (text only):

Code: Select all

.NET Runtime version 2.0.50727.4927 - Fatal Execution Engine Error (000007FEF88EFA42) (80131506)


Log Name:      Application
Source:        Application Error
Date:          26/02/2010 2:00:55 PM
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      xxx.ebdesign.local
Description:
Faulting application name: Host.Console.exe, version: 3.1.0.0, time stamp: 0x4b8736d9
Faulting module name: mscorwks.dll, version: 2.0.50727.4927, time stamp: 0x4a27466f
Exception code: 0xc0000005
Fault offset: 0x000000000066d251
Faulting process id: 0x%9
Faulting application start time: 0x%10
Faulting application path: %11
Faulting module path: %12
Report Id: %13
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2010-02-26T03:00:55.000000000Z" />
    <EventRecordID>10081</EventRecordID>
    <Channel>Application</Channel>
    <Computer>devwks02.ebdesign.local</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Host.Console.exe</Data>
    <Data>3.1.0.0</Data>
    <Data>4b8736d9</Data>
    <Data>mscorwks.dll</Data>
    <Data>2.0.50727.4927</Data>
    <Data>4a27466f</Data>
    <Data>c0000005</Data>
    <Data>000000000066d251</Data>
  </EventData>
</Event>


Andreas Suurkuusk
Posts: 1005
Joined: Wed Mar 02, 2005 7:53 pm

Re: app crashes on attempt to profile

Post by Andreas Suurkuusk » Sun Feb 28, 2010 10:46 pm

Unfortunately this error does not seem to be trivial. I have managed to identify the location where error occurs. It occurs within the runtime, when reporting thread information to the profiler. The strange thing is that the crash seems to occur because of an invalid pointer to profiler information within the runtime. But the same pointer must have been used previously without any problems (e.g. when reporting that the thread was created). We have to investigate this further and hopefully we will be able to find out what's causing the problem.

Locating the problem would be much easier if we could reproduce the error, but the tests we have performed with WCF services have worked correctly. Is there any possibility that you could provide us with an program that reproduces the crash? If there is, can you please contact us at support@scitech.se about this?
Best regards,

Andreas Suurkuusk
SciTech Software AB

baul
Posts: 3
Joined: Fri Feb 26, 2010 1:38 am

Re: app crashes on attempt to profile

Post by baul » Tue Mar 02, 2010 9:54 am

Hi Andreas,
Thank you for your reply.
I'll have a look if i can narrow it down a bit/reproduce with a cut down version of an app.
Regards,
Alexei

baul
Posts: 3
Joined: Fri Feb 26, 2010 1:38 am

Re: app crashes on attempt to profile

Post by baul » Tue Mar 02, 2010 10:43 am

An update: this is embarrasing, went and started to cut off bits of code and got it to run under profiler. Started to reverse the changes, only to find out that with all the changes reversed it still runs OK under profiler.
The lesson is: do a clean build before profiling and before bothering nice people at SciTech.
Thank you Andreas,
Alexei

Andreas Suurkuusk
Posts: 1005
Joined: Wed Mar 02, 2005 7:53 pm

Re: app crashes on attempt to profile

Post by Andreas Suurkuusk » Wed Mar 03, 2010 10:30 pm

I'm glad that you are able to profile your application now. It really was a strange error you were experiencing. Hopefully it will not happen again, but if it does, please tell us.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest