Error Codes

Error codes are defined by the following macros:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
namespace llm_datadist {
constexpr Status LLM_SUCCESS = 0x0U;
constexpr Status LLM_FAILED = 0xFFFFFFFFU;
constexpr Status LLM_WAIT_PROC_TIMEOUT = 0x5010B001U;
constexpr Status LLM_KV_CACHE_NOT_EXIST = 0x5010B002U;
constexpr Status LLM_PARAM_INVALID = 0x5010B005U;
constexpr Status LLM_NOT_YET_LINK = 0x5010B007U;
constexpr Status LLM_ALREADY_LINK = 0x5010B008U;
constexpr Status LLM_LINK_FAILED = 0x5010B009U;
constexpr Status LLM_UNLINK_FAILED = 0x5010B00AU;
constexpr Status LLM_NOTIFY_PROMPT_UNLINK_FAILED = 0x5010B00BU;
constexpr Status LLM_CLUSTER_NUM_EXCEED_LIMIT = 0x5010B00CU;
constexpr Status LLM_PROCESSING_LINK = 0x5010B00DU;
constexpr Status LLM_DEVICE_OUT_OF_MEMORY = 0x5010B00EU;
constexpr Status LLM_EXIST_LINK = 0x5010B018U;
constexpr Status LLM_FEATURE_NOT_ENABLED = 0x5010B019U;
constexpr Status LLM_TIMEOUT = 0x5010B01AU;
constexpr Status LLM_LINK_BUSY = 0x5010B01BU;
constexpr Status LLM_OUT_OF_MEMORY = 0x5010B01CU;
}  // namespace llm_datadist

The meanings of error codes are as follows.

Enumerated Value

Description

Recoverable (Yes/No)

Solution

LLM_SUCCESS

Success

None

None

LLM_FAILED

General failure

No

Preserve the fault context, collect host/device logs, and back them up.

LLM_WAIT_PROC_TIMEOUT

Processing timeout

Yes

  • If this error is reported by transmission-related APIs such as PullKvCache and PullKvBlocks, the link is unrecoverable and must be re-established.
  • If this error is reported by other APIs, increase the timeout interval and try again.

LLM_KV_CACHE_NOT_EXIST

KV cache not found

Yes

  • Check whether the cache ID is correct.
  • Check whether the cache has been released.
  • Check whether the corresponding Prefill-side request in the error log is completed.
  • Check whether duplicate pull operations exist.

LLM_PARAM_INVALID

Incorrect parameter

Yes

Locate the fault based on logs.

LLM_NOT_YET_LINK

No link established

Yes

Verify the link status between the Decode and Prompt sides at the upper layer.

LLM_ALREADY_LINK

Link already established

Yes

Verify the link status between the Decode and Prompt sides at the upper layer.

LLM_LINK_FAILED

Link establishment failed

Yes

If this error code is returned in the second return value of LinkLlmClusters, check the network connectivity between the corresponding clusters.

LLM_UNLINK_FAILED

Link disconnection failed

Yes

If this error code is returned in the second return value of UnlinkLlmClusters, check the network connectivity between the corresponding clusters.

LLM_NOTIFY_PROMPT_UNLINK_FAILED

Failed to notify the Prompt side of link disconnection

Yes

  1. Check the network connectivity between the Decode and Prompt sides.
  2. Call UnlinkLlmClusters on the Prompt side to clean up residual resources.

LLM_CLUSTER_NUM_EXCEED_LIMIT

Excessive clusters

Yes

Check the input parameters of LinkLlmClusters and UnlinkLlmClusters and ensure that the number of clusters must not exceed 16.

LLM_PROCESSING_LINK

Link operation in progress

Yes

A link establishment or disconnection operation is in progress. Try again later.

LLM_DEVICE_OUT_OF_MEMORY

Insufficient device memory

Yes

Check whether the allocated memory has been properly released.

LLM_EXIST_LINK

Unreleased links found during role setting

Yes

Before calling SetRole, ensure that all links are disconnected by calling UnlinkLlmClusters.

LLM_FEATURE_NOT_ENABLED

Feature not enabled

Yes

Check whether required options are passed in during LLM-DataDist initialization.

If this error is thrown during SetRole, verify that OPTION_ENABLE_SET_ROLE = "1" was configured during initialization.

LLM_TIMEOUT

Processing timeout

No

Preserve the fault context, collect host/device logs, and back them up.

LLM_LINK_BUSY

Link busy

Yes

Reserved error code, which is not returned currently.

LLM_OUT_OF_MEMORY

Insufficient memory

Yes

Check whether the memory pool or system memory is sufficient.