What does HRESULT 0x80670012 (STATEREPOSITORY_ERROR_CACHE_CORRUPTED) mean?

 
Previous Next
STATEREPOSTORY_E_NESTED_TRANSACTION_NOT_SUPPORTED ERROR_VOLSNAP_BOOTFILE_NOT_VALID

STATEREPOSITORY_ERROR_CACHE_CORRUPTED

Within Windows StateRepository, STATEREPOSITORY_ERROR_CACHE_CORRUPTED reports that StateRepository detected invalid derived cache data. Diagnosis of STATEREPOSITORY_ERROR_CACHE_CORRUPTED should follow the original owner and generation rather than treating the visible symptom as the cause.

Facts that change the diagnosis

CaptureDiagnostic value
Cache identity and generation for STATEREPOSITORY_ERROR_CACHE_CORRUPTED.For STATEREPOSITORY_ERROR_CACHE_CORRUPTED, this identifies the exact object or resource generation involved and helps test the Windows StateRepository boundary.
Authoritative repository validation for STATEREPOSITORY_ERROR_CACHE_CORRUPTED.For STATEREPOSITORY_ERROR_CACHE_CORRUPTED, this places the failure on the lifecycle or transaction timeline and helps test the Windows StateRepository boundary.
Build or servicing history for STATEREPOSITORY_ERROR_CACHE_CORRUPTED.For STATEREPOSITORY_ERROR_CACHE_CORRUPTED, this separates caller input from environment and service state and helps test the Windows StateRepository boundary.
First operation detecting invalid cache for STATEREPOSITORY_ERROR_CACHE_CORRUPTED.For STATEREPOSITORY_ERROR_CACHE_CORRUPTED, this provides a stable comparison across retries or another machine and helps test the Windows StateRepository boundary.

Subsystem meaning

During a STATEREPOSITORY_ERROR_CACHE_CORRUPTED investigation, StateRepository is infrastructure for the Windows application model. For STATEREPOSITORY_ERROR_CACHE_CORRUPTED, the HRESULTs expose distinctions familiar from transactional stores: optimistic concurrency, an unfinished prepared statement, database-versus-table locking, shared-cache contention, recovery, schema compatibility, corruption, and service shutdown. When STATEREPOSITORY_ERROR_CACHE_CORRUPTED is returned, these are not interchangeable reasons to delete the repository.

For STATEREPOSITORY_ERROR_CACHE_CORRUPTED, cache corruption should be separated from corruption of authoritative dictionary or repository records. When STATEREPOSITORY_ERROR_CACHE_CORRUPTED is returned, a supported cache rebuild may be appropriate only after provenance and integrity evidence show that underlying state is sound.

For STATEREPOSITORY_ERROR_CACHE_CORRUPTED, the first owner to inspect is the StateRepository request, database connection, prepared statement, transaction, schema generation, or service lifecycle that rejected the operation.

Isolation workflow

When STATEREPOSITORY_ERROR_CACHE_CORRUPTED is returned, use a disposable control object, repository copy, file, or device association where the subsystem permits it.

  1. First: Preserve the invalid cache for diagnosis.
  2. Next: Validate underlying repository data on a copy.
  3. Then: Use the supported cache regeneration path.
  4. Finally: Verify no deployment tool restores the stale cache.

Avoid the tempting broad fix

During a STATEREPOSITORY_ERROR_CACHE_CORRUPTED investigation, DICTIONARY_CORRUPTED identifies repository dictionary structures; CACHE_CORRUPTED identifies derived acceleration data.

For STATEREPOSITORY_ERROR_CACHE_CORRUPTED, do not delete the whole repository when only cache validation failed.

Expected branches

ControlInterpretation for STATEREPOSITORY_ERROR_CACHE_CORRUPTEDHold constant
Same database copy, isolated connectionsFor STATEREPOSITORY_ERROR_CACHE_CORRUPTED, a change points to connection/statement/transaction ownership rather than stored content.While diagnosing STATEREPOSITORY_ERROR_CACHE_CORRUPTED, use a copy and preserve schema plus repository generation.
Same object, reduced operationFor STATEREPOSITORY_ERROR_CACHE_CORRUPTED, if the result follows one specific transition, statement, file, or ceremony step, the failure is localized.While diagnosing STATEREPOSITORY_ERROR_CACHE_CORRUPTED, remove only unrelated work and keep the first failing boundary visible.
Same operation, controlled environmentFor STATEREPOSITORY_ERROR_CACHE_CORRUPTED, if the result follows one machine, account, volume, network, or device, environment matters.While diagnosing STATEREPOSITORY_ERROR_CACHE_CORRUPTED, keep versions and identity explicit rather than comparing only the final message.

Regression proof

Verify STATEREPOSITORY_ERROR_CACHE_CORRUPTED with the original scenario, one boundary case, and one deliberate failure; success means regenerated cache remains valid across restart and produces the same authoritative application-model state.

Technical references

The references below define the API family or storage/protocol behavior used to interpret STATEREPOSITORY_ERROR_CACHE_CORRUPTED.


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