Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4996 Discussions

INJECTOR_ERR_FAILED_TO_CREATE_REMOTE_THREAD

jurektr
Beginner
1,280 Views
I am logged in as Administrator. I am trying to attach Amplifier to 32-bit w3wp.exe running as NetworkService. I get this error:

Error: Failed to attach to the process with the specified PID. Specify another PID and try attaching again.
Error: System error 0x0 : OpenProcess : The operation completed successfully.Pin is exiting due to fatal error

When I change the process identity to my own (Administrator) I get this error:

Error: Failed to allocate Injector, Error = INJECTOR_ERR_FAILED_TO_CREATE_REMOTE_THREAD Pin is exiting due to fatal error

I can attach to a 32-bit process running in my own login session with no problems.

Did anybody succeed in attaching to w3wp.exe?

Details:
VTune Amplifier XE 2011
Windows 2008 SP2 VM on Hyper-V
6GB RAM, 4 virtual processors X5460

- Jurek
0 Kudos
9 Replies
David_A_Intel1
Employee
1,280 Views
Hi Jurek:

I checked with the developers and it appears this is a generic problem for any kind of service host processes, not only for w3wp.exe. They are investigating.

In the meantime, you could use lightweight-hotspots to collect hardware-based sampling data. You just won't get the call stacks. Hardware-based sampling helps you tune the code execution versus algorithm tuning.
0 Kudos
jurektr
Beginner
1,280 Views
Yes, except that hardware sampling does not work in VMs and this is running in a Hyper-V VM. The production environment will be a VM as well.

- Jurek
0 Kudos
David_A_Intel1
Employee
1,280 Views
I see. You realize that profiling on a VM, without any insight into the VM, makes your analysis somewhat suspect, don't you? The VM controls access to resources and context switches, which you generally can't change, and the Amplifier XE will not identify what impact the VM management is having on your app.

In an effort to better understand your usage model, can you explain what you hope to gain my profiling the application as it runs on a VM? Also, what feature enhancements in the Amplifier XE product would make if more valuable to you?

Thank you for your feedback.
0 Kudos
David_A_Intel1
Employee
1,280 Views
Hi Jurek:

As a workaround, would it be possible for you to stop the w3wp.exe service and restart it from your account, so that you could attach to it?
0 Kudos
jurektr
Beginner
1,280 Views
This has been confirmed by Intel supportas a bug. The more general problem is that Amplifier cannot attach to a process in a different login session. Even if the different login session is using the same credentials as the Amplifier. At the same time Visual Studio attaches to the same process without a problem.

The bug is at the end of the queue. :-(
0 Kudos
David_A_Intel1
Employee
1,280 Views
Right, and as a workaround, can you restart the process in your login session?
0 Kudos
David_A_Intel1
Employee
1,280 Views
Hi Jurek:

Can you tell me what kind of app or extension you were developing such that you needed to attach to the this network service? We want to make sure that our solution works for you and others developing this time of application. Thanks.
0 Kudos
jurektr
Beginner
1,280 Views
MrAnderson, as my initial post indicates, this is a web service hosted by IIS. The application is a .Net WCF service. The process I am trying to attach to is w3wp.exe. This specific case regards 32-bit w3wp.exe. The OS is 64-bit 2008 Server running in a Hyper-V virtual machine.

Jurek
0 Kudos
David_A_Intel1
Employee
1,280 Views
Thanks. I didn't see "IIS" or "web service" mentioned in your orignal post. :(

There's a new article about using Inspector XE on Windows* services and I wonder if it would address this issue, as well?
0 Kudos
Reply