{"record":{"id":"1a7b8a1d69416346","repo":"sgl-project/sglang","slug":"pd-state-transfer-failed-unknown-state-type-st","errorCode":null,"errorMessage":"PD state transfer failed: unknown state_type={st}","messagePattern":"PD state transfer failed: unknown state_type=(.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/disaggregation/mori/conn.py","lineNumber":1263,"sourceCode":"                        dst_lens,\n                        src_dims,\n                        dst_dims,\n                    )\n                )\n            elif st in (\"swa\", \"dsa\", \"swa_ring\", \"c128_state\", \"minimax_index_k\"):\n                statuses.extend(\n                    self._send_swa_dsa_state(\n                        peer_info,\n                        src_indices,\n                        dst_indices,\n                        src_descs,\n                        src_lens,\n                        dst_descs,\n                        st,\n                    )\n                )\n            else:\n                raise RuntimeError(f\"PD state transfer failed: unknown state_type={st}\")\n\n        return statuses\n\n    def _send_mamba_state(\n        self,\n        peer_info: KVArgsRegisterInfo,\n        src_state_indices: npt.NDArray[np.int32],\n        dst_state_indices: npt.NDArray[np.int32],\n        src_state_mem_descs: List[MemoryDesc],\n        dst_state_mem_descs: List[MemoryDesc],\n        src_state_item_lens: List[int],\n        dst_state_item_lens: List[int],\n        src_state_dim_per_tensor: List[int],\n        dst_state_dim_per_tensor: List[int],\n    ) -> List[TransferStatus]:\n        if src_state_indices.size != 1 or dst_state_indices.size != 1:\n            raise RuntimeError(\n                f\"PD state transfer failed: mamba requires single state index, \"","sourceCodeStart":1245,"sourceCodeEnd":1281,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/disaggregation/mori/conn.py#L1245-L1281","documentation":"send_state dispatches each state component by its state_type string (e.g. 'mamba', 'swa', 'c128_state', 'minimax_index_k'); an unrecognized value falls through to this error. It indicates a state type the transfer layer has no sender implementation for — usually a newer/unsupported type or a typo in the backend's declaration.","triggerScenarios":"An attention backend populates kv_args.state_types with a string not handled by the if/elif chain in send_state, then a request triggers _submit_kv_transfer for that layer.","commonSituations":"Using a custom or newer hybrid attention backend whose state_type strings are not covered by this Mori conn implementation, or a renamed state type after an upgrade.","solutions":["Check which state_type string is being sent (log kv_args.state_types) and map it to a supported one ('mamba', 'swa', etc.)","Update SGLang to a version whose conn.py supports your backend's state types, or add a sender branch for the new type","If the state type is not needed for decode, remove it from kv_args.state_types and its descriptors"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":"SUPPORTED_STATE_TYPES = {\"mamba\", \"swa\", \"c128_state\", \"minimax_index_k\"}\n\ndef is_supported_state_type(st: str) -> bool:\n    return st in SUPPORTED_STATE_TYPES\n","tryCatchPattern":null,"preventionTips":["Whitelist state_type strings before enabling a backend with PD disagg","Check conn.py's dispatch chain when upgrading or adding hybrid backends"],"tags":["disaggregation","state-transfer","dispatch","unsupported-feature"],"backgroundTag":"unsupported-value-in-config","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}