Profiler cannot stop/start service

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
JustD
Posts: 3
Joined: Sun Sep 28, 2008 8:58 pm

Profiler cannot stop/start service

Post by JustD » Sun Sep 28, 2008 9:04 pm

Hi,

I'm trying to run .Net Memory Profiler on a service. When I start the profiler it displays: "Stopping service", then "Starting service" and then "Stopping service" again and it stays on "Stopping service" for quite a while.

Finally it ends with this message:
-------------------------------------------------------
The profiling session was stopped unexpectedly, with the following error message: "Failed to open process handle with access: 1048576".
Do you want to save profiler session?
-------------------------------------------------------

I assume I'm doing something wrong in my service, but any ideas what I should look for?

It's ".Net Memory Profiler 3.0 Standard"

ta,

D

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

Post by Andreas Suurkuusk » Mon Sep 29, 2008 9:53 pm

The error message indicates that the profiler was not able to retrieve a process handle to the service process. This might, for instance, happen if the profiled failed to enable the debug privelege. Are you running the profiler under an administrative account? Do you know whether the "Debug programs" security policy is enabled for your user account?
Best regards,

Andreas Suurkuusk
SciTech Software AB

JustD
Posts: 3
Joined: Sun Sep 28, 2008 8:58 pm

Post by JustD » Tue Sep 30, 2008 3:29 am

Hi,

Yes, I am an administrator and I'm running .Net Memory Profiler as "Run as Administrator', but it makes not difference.

Any other suggestions?

regards,

Dirk

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

Post by Andreas Suurkuusk » Tue Sep 30, 2008 5:08 pm

Another reason for the profiler to fail when retrieving a handle to the profiled process is that the process is not actually running (e.g. it exits as soon as it's started).

To get more information about what's happening, it would be good if you could provide us with some log-files. The log-files are created by providing the "/log" command line parameter to the profiler executable (e.g. using the Run command and entering "C:\Program files\SciTech\NetMemProfiler3\NetMemProfiler.exe" /log).

This will create three log-files: ProfilerLog.txt, ProfilerClientLog.txt and AssertLog.txt. The log-files will be created in the folder "C:\Users\<User>\AppData\Local\SciTech\MemProfiler3\Logs" (or "C:\Documents and Settings\<User>\Local Settings\Application Data\SciTech\MemProfiler3\Logs" on Windows XP/2003).

Please send these files to support@scitech.se (preferably zipped).
Best regards,

Andreas Suurkuusk
SciTech Software AB

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

Post by Andreas Suurkuusk » Wed Oct 01, 2008 9:10 pm

Thank you for the log-files. Unfortunately, I was not able to find an explanation for the problem in them. They just tell me that a process handle cannot be created, but no other error indication. However, the assertions log contained one entry, but when I tried to investigate this I noticed that you don't seem to be running the latest version (I missed that you mentioned v3.0 in the original post). Before continuing the investigation of this, would it be possible for you to make sure that you run the latest version of .NET Memory Profiler? You can download it from http://memprofiler.com/download.aspx (version 3.1 is a free upgrade from v3.0).
Best regards,

Andreas Suurkuusk
SciTech Software AB

JustD
Posts: 3
Joined: Sun Sep 28, 2008 8:58 pm

Post by JustD » Thu Oct 02, 2008 12:59 am

I guess I should have checked for latest version. I upgraded to 3.1 and now it runs the service without any problems.

Thank you for your help Andreas, all's good now.

regards,

Dirk

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 17 guests