Red Gate forums :: View topic - App crash when i take a snapshot
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Memory Profiler 7
ANTS Memory Profiler 7 forum

App crash when i take a snapshot

Search in ANTS Memory Profiler 7 forum
Post new topic   Reply to topic
Jump to:  
Author Message
eze1981



Joined: 06 Apr 2011
Posts: 1

PostPosted: Thu Apr 07, 2011 2:45 pm    Post subject: App crash when i take a snapshot Reply with quote

I'm trying to evaluate ANT Profiler, but i can't, because my app crash when i take the first snapshot. I dont have these problem with other memory profilers.

Is there any fix?

Details:
VS2008
.net 3.5
WPF application

Error:
Unhandled exception at 0x79f7c515 (mscorwks.dll) in Example.exe: 0xC0000005: Access violation reading location 0xfffffffc.

Call Stack:
> mscorwks.dll!MethodTable::GetClass_NoLogging() + 0x10a456 bytes
mscorwks.dll!ProfToEEInterfaceImpl::IsArrayClass() + 0x63 bytes
mscordbc.dll!SetProfToEEInterface() + 0x340b bytes
[Frames below may be incorrect and/or missing, no symbols loaded for mscordbc.dll]
RedGate.Memory.Core.dll!DllUnregisterServer() + 0x1fb1d bytes
RedGate.Memory.Core.dll!DllUnregisterServer() + 0x192c5 bytes
RedGate.Memory.Core.dll!DllUnregisterServer() + 0x249d1 bytes
RedGate.Memory.Core.dll!DllUnregisterServer() + 0x1af84 bytes
RedGate.Memory.Core.dll!DllUnregisterServer() + 0x1b00d bytes
RedGate.Memory.Core.dll!DllUnregisterServer() + 0x1b00d bytes
RedGate.Memory.Core.dll!DllUnregisterServer() + 0x1b02c bytes
RedGate.Memory.Core.dll!DllUnregisterServer() + 0x1b00d bytes
RedGate.Memory.Core.dll!DllUnregisterServer() + 0x1aff3 bytes
RedGate.Memory.Core.dll!DllUnregisterServer() + 0x12356 bytes
RedGate.Memory.Core.dll!DllUnregisterServer() + 0x157c4 bytes
RedGate.Memory.Core.dll!DllUnregisterServer() + 0x7f59 bytes
mscordbc.dll!SetProfToEEInterface() + 0x1ca5 bytes
mscorwks.dll!Thread::SysResumeFromGC() + 0x1975a9 bytes
mscorwks.dll!WKS::GCHeap::RestartEE() + 0xa6 bytes
mscorwks.dll!WKS::GCHeap::GarbageCollectGeneration() + 0x102 bytes
mscorwks.dll!WKS::GCHeap::GarbageCollectTry() + 0x34 bytes
mscorwks.dll!WKS::GCHeap::GarbageCollect() + 0x38 bytes
mscorwks.dll!ProfToEEInterfaceImpl::ForceGC() + 0x2b bytes
mscordbc.dll!SetProfToEEInterface() + 0x3745 bytes
RedGate.Memory.Core.dll!DllUnregisterServer() + 0xeca3 bytes
RedGate.Memory.Core.dll!DllUnregisterServer() + 0xeda2 bytes
kernel32.dll!GetModuleFileNameA() + 0x1ba bytes

Threads:
0 968 Main Thread Main Thread KiFastSystemCallRet Normal 0
0 1588 Worker Thread DebuggerRCThread::ThreadProcStatic KiFastSystemCallRet Normal 0
0 > 440 Worker Thread DllUnregisterServer MethodTable::GetClass_NoLogging Normal 0
0 1936 Worker Thread Thread::intermediateThreadProc KiFastSystemCallRet Highest 0
0 3432 Worker Thread WmiFreeBuffer KiFastSystemCallRet Normal 0
0 2556 RPC Thread RPC Callback Thread KiFastSystemCallRet Normal 0
0 3076 Worker Thread RtlDowncaseUnicodeString KiFastSystemCallRet Normal 0
0 3476 Worker Thread RegisterGPNotification KiFastSystemCallRet Normal 0
0 1892 Worker Thread Thread::intermediateThreadProc KiFastSystemCallRet Normal 0
0 1208 Worker Thread ThreadpoolMgr::GateThreadStart KiFastSystemCallRet Normal 0
0 2968 Worker Thread MilChannel_SetNotificationWindow KiFastSystemCallRet Normal 0
0 828 Worker Thread Thread::intermediateThreadProc KiFastSystemCallRet Normal 0
0 1684 Worker Thread ThreadpoolMgr::TimerThreadStart KiFastSystemCallRet Normal 0
0 3056 Worker Thread Thread::intermediateThreadProc KiFastSystemCallRet Normal 0
0 3576 Worker Thread WSPStartup KiFastSystemCallRet Above Normal 0
0 3396 Worker Thread Thread::intermediateThreadProc KiFastSystemCallRet Normal 0
0 3328 Worker Thread Thread::intermediateThreadProc KiFastSystemCallRet Normal 0
0 2300 Worker Thread Thread::intermediateThreadProc KiFastSystemCallRet Normal 0
0 1660 Worker Thread Thread::intermediateThreadProc KiFastSystemCallRet Normal 0
0 2220 RPC Thread RPC Callback Thread KiFastSystemCallRet Normal 0
0 2568 Worker Thread Win32 Thread RtlExitUserThread Normal 0
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6669

PostPosted: Fri Apr 08, 2011 3:26 pm    Post subject: Reply with quote

Hello,

This seems to be a big problem with Memory Profiler lately but unfortunately Profiler provides no information to work out what the problem is and there doesn't seem to be any consistent known issue except when the address is 0x0000006b, which is a bug in the Microsoft COR_PROFILER API we are trying to work around.

What you could do is see if you can get the memory dump (Windows Vista and up create one automatically in most cases) and send it to support@red-gate.com . The location of the dump is listed in the Windows Error Reporting dialog under "More Information".

Once we get that, we can find out the actual methods on the stack and try to work out why it crashed.
Back to top
View user's profile Send private message
sturk



Joined: 17 Jun 2011
Posts: 1

PostPosted: Fri Jun 17, 2011 3:43 pm    Post subject: Reply with quote

Hi , I am trying to profile Wcf service which hosted locally on IIS 7.5. I also have web application which both are using localsystem as user. I am able to take snapshot when I profile web application but When I try to profile WCF service w3wp.exe crash with event ID 1000. I add gcserver enabled= false to aspnet.config. Below I provided details of the error.
is there any solution ?

.NET Runtime
Application: w3wp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an internal error in the .NET Runtime at IP 70AD82F5 (70AA0000) with exit code 80131506.

Application Error
Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7a5f8
Faulting module name: clr.dll, version: 4.0.30319.225, time stamp: 0x4d53688b
Exception code: 0xc0000005
Fault offset: 0x000382f5
Faulting process id: 0xf58
Faulting application start time: 0x01cc2cf194f78536
Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Report Id: de4fc9e0-98e4-11e0-a3e7-2c27d7219a9f
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6669

PostPosted: Sat Jun 18, 2011 8:34 pm    Post subject: Reply with quote

I think we have narrowed down most of these clr.dll crashes to the same 2 or 3 problems and I'd say the most likely one is a problem getting static variable information from the AppDomain when there are multiple appdomains. Problem is the MS method to get the information will blow up when the address comes back as 0 because it will then go and try to get the flags for the object at an illegal (reserved) address.

There isn't a workaround at the moment that works 100% of the time but you can try adding w3wp.exe to the Data Execution Prevention exclusion list.
Back to top
View user's profile Send private message
cjrodwell



Joined: 01 Jul 2011
Posts: 1

PostPosted: Fri Jul 01, 2011 2:15 pm    Post subject: Reply with quote

I'm also getting this crash any news on a fix?

VS2010
.NET 3.5SP1
WPF App
ANTS Memory Profiler 7.0.0.731
XP SP3

I'm trying to evalute the product with WPF apps and I just can't use it at all at the moment.

Unhandled exception at 0x7a121111 in ........: 0xC0000005: Access violation reading location 0x00000000.

mscorwks.dll!7a121111()
[Frames below may be incorrect and/or missing, no symbols loaded for mscorwks.dll]
mscordbc.dll!63e77168()
RedGate.Memory.Core.dll!100224cd()
kernel32.dll!7c812afb()
mscorwks.dll!7a1210b8()
msvcr100.dll!_CxxThrowException(void * pExceptionObject, const _s__ThrowInfo * pThrowInfo) Line 157 C++
RedGate.Memory.Core.dll!10027711()
> msvcr100.dll!malloc(unsigned int size) Line 89 + 0x3b bytes C
00520052()
kernel32.dll!7c80262a()
kernel32.dll!7c802600()
mscorwks.dll!79f54f29()
mscorwks.dll!79f54f65()
mscorwks.dll!7a11e93a()
mscordbc.dll!63e76eb3()
RedGate.Memory.Core.dll!10008313()
kernel32.dll!7c80262a()
RedGate.Memory.Core.dll!10011053()
Back to top
View user's profile Send private message
AndrewH



Joined: 17 Aug 2006
Posts: 137

PostPosted: Tue Jul 05, 2011 11:53 am    Post subject: Reply with quote

I think we've got these issues fixed in the upcoming v7.1 release.

There are two problems: one is that the profiler crashes if it tries to read static variable values when DEP is turned on and you have more than one appdomain. Office add-ins seem to be a particular cause of this problem. If you can temporarily disable DEP in your target application then you will avoid the issue. v7.1 detects DEP and disables the problematic code.

The second problem is partially caused by a .NET bug: if you have a class 'Foo' and you use it as a parameter to a generic (eg, 'IDictionary<Foo>') and then you unload the appdomain containing 'Foo', .NET does not report that the dependent generics are unloaded - in fact, I suspect it actually doesn't unload the generics at all, and leaks them, though I'm not completely sure on this. If you subsequently reload the Foo class into a new appdomain, the profiler thinks that the old generic is still around and sometimes tries to query information about it. v7.1 knows about this behaviour and will only look up generics whose parameters are in appdomains that haven't been unloaded.

The second issue can be worked around if you take a snapshot before the appdomain is unloaded (ANTS only reads class information once), or if you can force the problematic classes to load into a shared appdomain, or by avoiding behaviour that causes appdomains to unload (in nunit, turn on the 'use a single appdomain for all tests' option)
_________________
Andrew Hunter
Software Developer
Red Gate Software Ltd.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group