| Previous | Next |
| ERROR_PROFILING_NOT_STARTED | ERROR_COULD_NOT_INTERPRET |
ERROR_PROFILING_NOT_STOPPED
What ERROR_PROFILING_NOT_STOPPED means
The code indicates that a profiling facility still considers the session active after a stop request. Unlike a harmless duplicate stop, this condition can leave counters, callbacks, or kernel resources attached until the owner exits or performs a successful cleanup.
Where it commonly appears
- Sampling profilers and performance counters
- Long-running diagnostic services
- Automated test harnesses that start and stop profiling around each case
Likely causes
- The target is still executing in a state that prevents immediate teardown
- The stop request used stale or mismatched session parameters
- A driver or provider did not acknowledge shutdown
- Another thread changed the profiling state concurrently
Troubleshooting checklist
- Capture the start parameters and exact stop parameters side by side
- Check whether the target process exited or changed identity during the session
- Inspect provider, driver, and service logs for teardown timeouts
- Determine whether the session remains visible to the profiling tool after the failure
Guidance for developers
Treat failure to stop as a cleanup failure that deserves telemetry, but preserve the primary operation result. Avoid immediately starting another session with the same identifiers. Apply a bounded retry only when the API documentation permits it and the state can be rechecked.
Guidance for administrators
Close the owning profiler cleanly before restarting dependent services. If a kernel component remains attached, a service restart or system restart may be required, but collect logs first because the restart destroys useful evidence.
Example
A test runner ends a benchmark while the profiler provider is still flushing data. The first stop request returns this status. Waiting for the provider-completion event and issuing one documented retry succeeds; issuing repeated blind stop calls only obscures the timing problem.
Related conditions
This differs from ERROR_PROFILING_NOT_STARTED, where no active session exists, and from a generic timeout, which does not necessarily describe profiling state.
References
Looking for a different code? Search another status or error code.