| Previous | Next |
| ERROR_SERVICE_REQUEST_TIMEOUT | ERROR_SERVICE_DATABASE_LOCKED |
ERROR_SERVICE_NO_THREAD
The service could not obtain its ServiceMain execution thread
When the SCM starts a service in a service process, the service control dispatcher creates a new thread to execute the ServiceMain callback for that service. ERROR_SERVICE_NO_THREAD identifies failure to establish that execution thread, before normal ServiceMain initialization can complete.
Treat this differently from a ServiceMain function that starts and then reports an application-specific error. Inspect process-wide thread and memory pressure, job or security restrictions, and failures in the hosting service process. Shared-process services deserve special attention because thread exhaustion or corruption in the host can affect multiple service entries. Capture the host process identity and other services sharing it, then correlate the failure with resource-exhaustion or process-failure events. Restarting only the service may not reset a damaged shared host.
What to inspect
- Identify the service host process and all services sharing that process.
- Check thread, memory, job, and process-failure conditions at the start attempt.
- Distinguish dispatcher thread creation failure from code executed inside ServiceMain.
References
- Microsoft: LPSERVICE_MAIN_FUNCTION
- Microsoft: StartServiceCtrlDispatcherW
- Microsoft: Service Control Manager
Looking for a different code? Search another status or error code.