PRB: Calling CoCreateInstance from a Service During the SERVICE_START_PENDING State May Cause the Call to Stop Responding (258943)
The information in this article applies to:
- Microsoft Windows NT Server 4.0
- Microsoft Windows NT Workstation 4.0
- Microsoft Windows 2000
This article was previously published under Q258943 SYMPTOMS
When the Distributed Component Object Model (DCOM) client is implemented as a service, the CoCreateInstance call is made when the service is in the SERVICE_START_PENDING state. The service is configured to automatically start at boot time. When the computer is restarted, the CoCreateInstance call stops responding until the following error message occurs from the Service Control Manager:
"At least one of the services or drivers failed during system startup"
After this error appears, the CoCreateInstance call then returns successfully.
CAUSE
When a service is in the SERVICE_START_PENDING state, the Service Control Manager is locked and does not start other services. This prevents dependent services from getting started. As a result of the CoCreateInstance call to activate a remote Component Object Model (COM) server, Rpcss.exe makes Synchronization Service Provider (SSP) calls, which in turn try to start the Microsoft Windows NT LAN Manager (NTLM) SSP (NtLmSsp) service. The CoCreateInstance call blocks until the NtLmSsp service starts. This creates a deadlock until the Service Control Manager times out as it tries to start the DCOM client service. After the Service Control Manager times out and then starts the NtLmSsp service, the CoCreateInstance call returns successfully.
RESOLUTION
You can add NtLmSsp as a dependency of the DCOM client service to resolve the problem. You can do this in the CreateService call. See the documentation for CreateService in the Platform software development kit (SDK) in the MSDN Library. NOTE: In Windows 2000, NTLM is the default. However, NTLM is not the only Security Support Provider Interface (SSPI). You must understand what the common security providers are and then make adjustments if appropriate.
STATUSThis behavior is by design.REFERENCES
Visit the following MSDN Web site to learn more about Windows NT Services and to view the documentation in the Platform SDK.
Modification Type: | Major | Last Reviewed: | 11/17/2003 |
---|
Keywords: | kbClient kbDCOM kbprb kbService KB258943 |
---|
|