Page 1 of 1

NmpCore - Cannot attach to process with id ####

Posted: Thu Nov 01, 2012 6:53 pm
by gbartlett
Greetings

I was looking at using your tool to diagnose an issue where an IIS worker process is consuming a large number of private bytes. I was thinking I could use NmpCore to attach to an existing w3wp.exe worker process to create a dump of memory to use in the main tool.

According to IIS the app pool is running v4.0 of .Net framework in Integrated mode.

NmpCore returns an error that it cannot attache to the process.

If I run it against the pid - I get the cannot attach error.
If I run it against the service name - it first gives the error about .Net Framework 4.0 and asing me to use /r
When I include the /r - it gives the cannot attach error.

Any thoughts on this ?

Regards,

Gary Bartlett

Re: NmpCore - Cannot attach to process with id ####

Posted: Fri Nov 02, 2012 12:44 pm
by Andreas Suurkuusk
Are you running the NmpCore tool under an administrative command prompt? NmpCore cannot attach to a service process unless it has administrative rights.

Re: NmpCore - Cannot attach to process with id ####

Posted: Fri Nov 02, 2012 8:01 pm
by gbartlett
Yes, I was signed in as the Administrator on the server when I executed the NmpCore executable.

Re: NmpCore - Cannot attach to process with id ####

Posted: Fri Nov 09, 2012 1:09 pm
by Andreas Suurkuusk
We have now tested attaching to the w3wp.exe process and started profiling IIS on several different platforms and using .NET Framework 2.0/4.0/4.5. However, we have not been able to reproduce a problem with ASP.NET profiling under IIS.

How are you using NmpCore to profile ASP.NET? To attach to the ASP.NET worker process, you need to run the command below (in an adminstrative command prompt):

Code: Select all

NmpCore /a w3wp.exe
or

Code: Select all

NmpCore /a <pid of w3wp.exe>
You can also start IIS under the profiler to get more detailed information. In that case you need to use the /asp command line argument. You cannot use the /svc command line argument, since more than one service is involved when profiling IIS.

Code: Select all

NmpCore /asp