Hang when taking memory snapshot

leskilleskil Posts: 3
Hi,

I'm profiling an ASP.NET web site hosted in the local IIS 7 on Windows 2008 64-bit.

Whenever I try to take a memory snapshot, the profiler hangs with the "Taking snapshot".

Are there any workaround for this?

I have added to content of the log file below.

Thanks,

Lasse

--
Log:
18 Nov 2009 13:13:14.635 [Profiler pipe monitor] ERROR RedGate.Profiler.Engine.Startup.Basic.PipeConnection - Failed to retrieve message from core
18 Nov 2009 13:13:14.900 [Profiler pipe monitor] WARN RedGate.Profiler.Engine.Startup.Basic.PipeConnection - Received a 0-length message
18 Nov 2009 13:14:05.541 [Profiler pipe monitor] WARN RedGate.Profiler.Engine.Startup.Basic.PipeConnection - Pipe has been closed; most likely the process being profiled has terminated.
18 Nov 2009 13:14:05.572 [37] WARN RedGate.Profiler.Monitoring.PerformanceDataAdapter - Invalid operation exception occurred whilst trying to check process ID: Instance 'w3wp' does not exist in the specified Category.
System.InvalidOperationException: Instance 'w3wp' does not exist in the specified Category.
at System.Diagnostics.CounterDefinitionSample.GetInstanceValue(String instanceName)
at System.Diagnostics.PerformanceCounter.NextSample()
at RedGate.Profiler.Monitoring.PerformanceDataAdapter.a(Object , UpdateTimerElapsedEventArgs )
18 Nov 2009 13:14:05.572 [37] WARN RedGate.Profiler.Monitoring.PerformanceCounterFactory - Process 3564 is apparently not running: Process with an Id of 3564 is not running.
18 Nov 2009 13:14:05.572 [37] WARN RedGate.Profiler.Monitoring.PerformanceCounterFactory - Process with an Id of 3564 is not running.
18 Nov 2009 13:14:05.572 [37] WARN RedGate.Profiler.Monitoring.PerformanceCounterFactory - System.ArgumentException
18 Nov 2009 13:14:05.572 [37] WARN RedGate.Profiler.Monitoring.PerformanceCounterFactory - at System.Diagnostics.Process.GetProcessById(Int32 processId, String machineName)
at RedGate.Profiler.Monitoring.PerformanceCounterFactory.GetInstanceNameForProcessID(Int32 processID)
18 Nov 2009 13:14:05.588 [37] WARN RedGate.Profiler.Monitoring.PerformanceDataAdapter - Invalid operation exception occurred whilst trying to check process ID: Instance 'w3wp' does not exist in the specified Category.
System.InvalidOperationException: Instance 'w3wp' does not exist in the specified Category.
at System.Diagnostics.CounterDefinitionSample.GetInstanceValue(String instanceName)
at System.Diagnostics.PerformanceCounter.NextSample()
at RedGate.Profiler.Monitoring.PerformanceDataAdapter.a(Object , UpdateTimerElapsedEventArgs )
18 Nov 2009 13:14:05.588 [37] WARN RedGate.Profiler.Monitoring.PerformanceCounterFactory - Process 3564 is apparently not running: Process with an Id of 3564 is not running.
18 Nov 2009 13:14:05.588 [37] WARN RedGate.Profiler.Monitoring.PerformanceCounterFactory - Process with an Id of 3564 is not running.
18 Nov 2009 13:14:05.588 [37] WARN RedGate.Profiler.Monitoring.PerformanceCounterFactory - System.ArgumentException
18 Nov 2009 13:14:05.588 [37] WARN RedGate.Profiler.Monitoring.PerformanceCounterFactory - at System.Diagnostics.Process.GetProcessById(Int32 processId, String machineName)
at RedGate.Profiler.Monitoring.PerformanceCounterFactory.GetInstanceNameForProcessID(Int32 processID)
18 Nov 2009 13:14:05.588 [37] WARN RedGate.Profiler.Monitoring.PerformanceDataAdapter - Invalid operation exception occurred whilst trying to retrieve counter sample: Instance 'w3wp' does not exist in the specified Category.
System.InvalidOperationException: Instance 'w3wp' does not exist in the specified Category.
at System.Diagnostics.CounterDefinitionSample.GetInstanceValue(String instanceName)
at System.Diagnostics.PerformanceCounter.NextSample()
at RedGate.Profiler.Monitoring.PerformanceDataAdapter.a(Object , UpdateTimerElapsedEventArgs )
18 Nov 2009 13:14:05.588 [37] WARN RedGate.Profiler.Monitoring.PerformanceDataAdapter - Invalid operation exception occurred whilst trying to check process ID: Instance 'w3wp' does not exist in the specified Category.
System.InvalidOperationException: Instance 'w3wp' does not exist in the specified Category.
at System.Diagnostics.CounterDefinitionSample.GetInstanceValue(String instanceName)
at System.Diagnostics.PerformanceCounter.NextSample()
at RedGate.Profiler.Monitoring.PerformanceDataAdapter.a(Object , UpdateTimerElapsedEventArgs )
18 Nov 2009 13:14:05.604 [37] WARN RedGate.Profiler.Monitoring.PerformanceCounterFactory - Process 3564 is apparently not running: Process with an Id of 3564 is not running.
18 Nov 2009 13:14:05.604 [37] WARN RedGate.Profiler.Monitoring.PerformanceCounterFactory - Process with an Id of 3564 is not running.
18 Nov 2009 13:14:05.604 [37] WARN RedGate.Profiler.Monitoring.PerformanceCounterFactory - System.ArgumentException
18 Nov 2009 13:14:05.604 [37] WARN RedGate.Profiler.Monitoring.PerformanceCounterFactory - at System.Diagnostics.Process.GetProcessById(Int32 processId, String machineName)
at RedGate.Profiler.Monitoring.PerformanceCounterFactory.GetInstanceNameForProcessID(Int32 processID)
18 Nov 2009 13:14:05.604 [37] WARN RedGate.Profiler.Monitoring.PerformanceDataAdapter - Invalid operation exception occurred whilst trying to check process ID: Instance 'w3wp' does not exist in the specified Category.
System.InvalidOperationException: Instance 'w3wp' does not exist in the specified Category.
at System.Diagnostics.CounterDefinitionSample.GetInstanceValue(String instanceName)
at System.Diagnostics.PerformanceCounter.NextSample()
at RedGate.Profiler.Monitoring.PerformanceDataAdapter.a(Object , UpdateTimerElapsedEventArgs )
18 Nov 2009 13:14:05.604 [37] WARN RedGate.Profiler.Monitoring.PerformanceCounterFactory - Process 3564 is apparently not running: Process with an Id of 3564 is not running.
18 Nov 2009 13:14:05.604 [37] WARN RedGate.Profiler.Monitoring.PerformanceCounterFactory - Process with an Id of 3564 is not running.
18 Nov 2009 13:14:05.604 [37] WARN RedGate.Profiler.Monitoring.PerformanceCounterFactory - System.ArgumentException
18 Nov 2009 13:14:05.619 [37] WARN RedGate.Profiler.Monitoring.PerformanceCounterFactory - at System.Diagnostics.Process.GetProcessById(Int32 processId, String machineName)
at RedGate.Profiler.Monitoring.PerformanceCounterFactory.GetInstanceNameForProcessID(Int32 processID)
18 Nov 2009 13:14:37.666 [Profiler pipe monitor] WARN RedGate.Profiler.Engine.Startup.Sessions.IISSession - The local app data path for IIS is C:\Users\les\AppData\Local, so ANTS will use C:\Users\les\AppData\Local\Red Gate\ANTS Profiler to store results
18 Nov 2009 13:16:43.027 [Profiler pipe monitor] ERROR RedGate.Profiler.Engine.Startup.Basic.PipeConnection - Failed to retrieve message from core
18 Nov 2009 13:16:43.292 [Profiler pipe monitor] WARN RedGate.Profiler.Engine.Startup.Basic.PipeConnection - Received a 0-length message

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    The evidence suggests that ANTS Memory profiler is causing the worker process to crash. There is a named pipe created inside w3wp's process that sends the data into the ANTS Memory Profiler process. Of course the cause of this is unclear. I can send you an email and we can try to work out the root cause of this crash, which may involve getting a crash dump from w3wp.exe.
  • Hi Brian,

    That would be great - I'll send you a message with my e-mail.

    Thanks,

    Lasse
  • Time has shown that errors likw this appear to be an issue caused by a bug in the .NET profiling interface. Some of the int32 arrays being allocated are not being reported by .NET as objects to the profiler, although the objects that reference them are (and are apparently still valid as objects and not candidates for garbage collection).

    What we have found that works is disabling the server garbage collector as described here: <http://support.microsoft.com/kb/911716&gt;
    Remember- "server GC" actually means multi-core GC.


    If that doesn't work, mail us at support@red-gate.com for an update which works better in some cases like these.
Sign In or Register to comment.