# SubSystem Restart (SSR)

SSR is a feature of the QNN HTP BE that enables QNN to automatically recover the connection to the DSP after
detecting it has crashed. With the connection restored, the QNN client can clean up any invalidated
resources, and re-create them to continue utilizing the same instance of QNN. This feature is enabled for the
the ARM based skel / stub QNN variant, as well as QNX and Windows platforms.

**SSR Handling as a QNN Customer**

The error code QNN\_COMMON\_ERR\_SYSTEM\_COMMUNICATION tells the client that the CDSP has crashed, and QNN has
successfully recovered a connection to the CDSP. During the recover process, the CPU side registries are
invalidated to prevent the use of now stale QNN API objects. Any attempt by a client to call a QNN API that
will either attempt to cross the boundary between the CPU and the DSP, or simply reference an invalidated
API object will receive the same afforementioned error code. This is the case for single-threaded or
multi-threaded applications alike, such that each client can cleanup and recover at its own pace with no
thread-to-thread coordination.

A simple example of the recovery process is outlined below, where a crash occurence during inference of a
graph is responsible for triggering the SSR routine.

**QNN API Object Validity**

The list of objects affected by SSR are outlined below alongside what is required of the client to finish the
recovery from a DSP crash and SSR occurence. Please note that all information on the DSP will be lost after a
crash / SSR occurence, the table simply depicts a subset of QNN API objects related to the SSR process.

| QNN API Object | Lifecycle after SSR | How to Recover |
| --- | --- | --- |
| Qnn\_BackendHandle\_t | Valid | N/A |
| Qnn\_ContextHandle\_t | Invalid | QnnContext\_free and one of the following for different use cases:<br><br><ul class="simple"><br><li><p>QnnContext_create</p></li><br><li><p>QnnContext_createFromBinary</p></li><br><li><p>QnnContext_createFromBinaryWithSignal</p></li><br><li><p>QnnContext_createFromBinaryListAsync</p></li><br></ul> |
| Qnn\_DeviceHandle\_t | Valid | N/A |
| Qnn\_GraphHandle\_t | Invalid | <ul class="simple"><br><li><p>QnnContext_create usecase: QnnGraph_create and QnnTensor_createGraphTensor to recreate all tensors associated with the graph handle</p></li><br><li><p>QnnContext_createFromBinary usecase: QnnGraph_retrieve to retrieve the graph handle</p></li><br></ul> |
| Qnn\_LogHandle\_t | Valid | N/A |
| Qnn\_MemHandle\_t | Invalid | QnnMem\_deRegister and QnnMem\_register |
| Qnn\_ProfileHandle\_t | Valid | N/A |
| QnnHtpPerfInfrastructure\_PowerConfig\_t | Invalid | Client needs to pass config to PerfInfra setPowerConfig API again |
| QnnHtpPerfInfrastructure\_MemoryConfig\_t | Invalid | Client needs to pass config to PerfInfra setMemoryConfig API again |

Last Published: Jun 04, 2026

[Previous Topic
VTCM Windowing](https://docs.qualcomm.com/bundle/publicresource/80-63442-10/topics/htp_vtcm_sharing.md) [Next Topic
Asynchronous graph execution for HTP backend](https://docs.qualcomm.com/bundle/publicresource/80-63442-10/topics/htp_async_execute.md)