What does Windows error code 15404 (ERROR_RUNLEVEL_SWITCH_IN_PROGRESS) mean?

 
Previous Next
ERROR_RUNLEVEL_SWITCH_AGENT_TIMEOUT ERROR_SERVICES_FAILED_AUTOSTART

ERROR_RUNLEVEL_SWITCH_IN_PROGRESS

Another run-level switch owns the transition state

ERROR_RUNLEVEL_SWITCH_IN_PROGRESS is Windows system result 15404 (0x00003C2C). The run-level coordinator is enforcing single-flight ownership.

This result is a concurrency result. It should expose the active transition rather than starting a second graph that could issue conflicting service controls.

Where this value belongs

  • Two management clients request different target levels.
  • A scheduler starts a switch while an operator-initiated switch is active.
  • A previous controller process restarted but its transition lease remains valid.

The existing switch can be healthy, stalled, or orphaned. The caller must identify its owner and progress before deciding to wait or recover the lease.

Common interpretation mistakes

  • It is mishandled when the active transition is canceled merely because a second request arrived.
  • It is mishandled when the caller retries rapidly and floods logs.
  • It is mishandled when an orphaned lease is cleared without checking service state.
  • It is mishandled when the second request hides a different desired target level.

Troubleshooting steps

  1. Read the active transition ID, owner, target, and start time.
  2. Inspect its current phase and last progress timestamp.
  3. Compare the new requested target with the active target.
  4. Wait or subscribe to completion when the active switch is healthy.
  5. Use lease recovery only after proving the owner is gone.
  6. Reconcile actual service state before replacing an orphaned transition.

Useful evidence

  • Preserve active and requested transition IDs.
  • Preserve active owner and lease expiry.
  • Preserve current phase and last progress.
  • Preserve active and requested target levels.
  • Preserve completion, cancellation, or lease-recovery result.

Returning the active transition ID turns a vague conflict into an observable operation the caller can follow.

Correct handling and recovery

Join or wait for the active transition when targets are compatible; otherwise let it finish or cancel it through the supported coordinator before submitting another.

Use event-driven completion or bounded polling. Immediate retries without state change only reproduce code 15404.

Difference from nearby values

ERROR_CANNOT_SWITCH_RUNLEVEL reports inability to complete a requested transition. Code 15404 says the coordinator is currently busy with another transition.

Practical scenario

An automated policy requests level 2 while an administrator is moving to level 3. The second request receives 15404 and follows the active transition ID instead of issuing overlapping stop and start controls.

Implementation guidance

Implement run-level switching as a durable single-flight operation with owner leases and queryable progress. UIs should show the active target and operator rather than only the numeric code.

For code 15404, record runlevel_active_id, runlevel_active_owner, runlevel_active_target, runlevel_requested_target, and runlevel_active_phase.

References


Looking for a different code? Search another status or error code.