Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

The SharePoint 2010 User Code Host service fails to start


View products that this article applies to.

Symptoms

Every hour on the hour, on all the servers in the farm running the Microsoft SharePoint Foundation Sandboxed Code Service, the following event is written to the system log event 7034:

Source: Service COntrol Manager
Event ID: 7034
Level: Error

"The SharePoint 2010 User Code Host service terminated unexpectedly.  It has done this .. time(s)."

At the same moment you can also observe an error message in the ULS logs:

"Performance Counter OS (pdh) call failed with error code PDH_INVALID_DATA"

↑ Back to the top


Cause

ProcessNameFormat in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfProc\Performance; Data value has been set to 2 to show a PID in Performance Monitor.

When the service is started, it verifies its performance counters were registered correctly.
If the option was set in the registry to include a PID in the process name this verification fails.

↑ Back to the top


Resolution

Set the data value of ProcessNameFormat in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfProc\Performance to 1

↑ Back to the top


More Information

ProcessNameFormat in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfProc\Performance; Data value can be set to 2 in order to get a PID showing in Performance Monitor tracing. This value however should not be left set all the time or you will see the 7034 Event ID.

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 2509267
Revision : 1
Created on : 1/7/2017
Published on : 2/22/2011
Exists online : False
Views : 546