Error Code

Overview

Note

The error code has 7 digits: XX-XXXXX, the first two digits indicate the error type, and the last 5 digits indicate the specific error description.

// common status
HB_UCP_SUCCESS = 0                              // Execution successfully
HB_UCP_INVALID_ARGUMENT = -100001               // Illegal parameter
HB_UCP_API_USE_ERROR = -100002                  // Interface use error
HB_UCP_INIT_FAILED = -100003                    // Init error
HB_UCP_UNKNOWN_ERROR = -100004                  // Intercept internal error code
HB_UCP_VERSION_INCOMPATIBLE = -100005           // Version is incompatible
// task error
HB_UCP_TASK_NUMBER_EXCEED_LIMIT = -200001       // Number of tasks exceeds the limit
HB_UCP_TASK_TIMEOUT = -200002                   // Task wait timeout
HB_UCP_TASK_RUN_FAILED = -200003                // Task failed to execute
HB_UCP_TASK_HANDLE_INVALID = -200004            // Illegal task handle
// op error
HB_UCP_OP_NUMBER_EXCEED_LIMIT = -300001         // Number of operators exceeds the limit
HB_UCP_OP_NOT_REGISTER = -300002                // The operator is not registered
HB_UCP_OP_CMD_UNAVAILABLE = -300003             // The operator command code is not available
// memory error
HB_UCP_MEM_ALLOC_FAIL = -400001                 // Failed to alloc memory
HB_UCP_MEM_FREE_FAIL = -400002                  // Failed to free memory
HB_UCP_MEM_FLUSH_FAIL = -400003                 // Failed to flush cached data to memory
HB_UCP_MEM_INVALIDATE_FAIL = -400004            // Failed to flush memory to cache
HB_UCP_MEM_IS_INVALID = -400005                 // Invalid memory
HB_UCP_MEM_MAP_FAIL = -400006                   // Failed to map memory
HB_UCP_MEM_UNMAP_FAIL = -400007                 // Failed to unmap memory
// file
HB_UCP_FILE_OPEN_FAILED = -500001               // Failed to open the file
// model
HB_UCP_MODEL_NUMBER_EXCEED_LIMIT = -600001      // Number of models exceeds the limit
HB_UCP_MODEL_INVALID = -600002                  // Illegal model
HB_UCP_MODEL_IS_INUSE = -600003                 // Model execution in progress
HB_UCP_MODEL_INCOMPATIBLE = -600004             // Incompatible model
// dsp
HB_UCP_DSP_UNAVAILABLE = -700001                // DSP unavailable
HB_UCP_DSP_XV_ALLOC_FAIL = -700002              // Failed to alloc DSP memory
HB_UCP_DSP_XV_FREE_FAIL = -700003               // Failed to free DSP memory
HB_UCP_DSP_IDMA_COPY_FAIL = -700004             // Failed to copy DSP DMA
HB_UCP_DSP_IDMA_BAD_INIT = -700005              // Failed to initialize DSP DMA
HB_UCP_DSP_MMAP_FAIL = -700006                  // Failed to map DSP memory
HB_UCP_DSP_INVALID_SCALE = -700007              // DSP invalid scaling
HB_UCP_DSP_UNMAP_FAIL = -700008                 // Failed to unmap DSP memory
HB_UCP_DSP_OFFLINE = -700009                    // DSP is offline
// codec
HB_UCP_CODEC_OPERATION_NOT_ALLOWED = -800001    // Not allowed Codec operation
HB_UCP_CODEC_INSUFFICIENT_RES = -800002         // Insufficient JPU/VPU(Video Process Unit) memory resource
HB_UCP_CODEC_NO_FREE_INSTANCE = -800003         // Number of JPU/VPU(Video Process Unit) instances exceeds the limit, JPEG supports up to 64
HB_UCP_CODEC_INVALID_INSTANCE = -800004         // Invalid instance
HB_UCP_CODEC_BUFFER_WAIT_TIMEOUT = -800005      // JPU/VPU(Video Process Unit) Buffer wait timeout
HB_UCP_CODEC_IS_INUSE = -800006                 // JPU/VPU(Video Process Unit) execution in progress
// isp
HB_UCP_ISP_NO_AVAILABLE_SLOT = -900001          // No ISP slot available
HB_UCP_ISP_CTX_INUSE = -900002                  // ISP ctx is being used

Explanation of Common Error Codes

Error CodePossible CausesResponse Measures
HB_UCP_INVALID_ARGUMENTThe imported parameters of the interface are illegal, such as cases where a pointer imported parameter is set to null or parameter validation failsPlease conduct troubleshooting based on the used interfaces and their corresponding error logs
HB_UCP_API_USE_ERRORIncorrect use of the interface, a task that has already been submitted is submitted againPlease check for incorrect usage of duplicate task submissions
HB_UCP_UNKNOWN_ERRORInternal unknown issuePlease keep the relevant logs or environment properly and contact Horizon technical support staff for analysis
HB_UCP_TASK_NUMBER_EXCEED_LIMITThe number of tasks created within the process and not released exceeds the pool's upper limitPlease ensure that the task release interface is correctly invoked. If it meets expectations, the upper limit of the quantity can be adjusted by setting the environment variable HB_UCP_MAX_TASK_NUM
HB_UCP_TASK_TIMEOUTTimeout caused by a short timeout setting for the task or high hardware loadCan try increasing the task timeout or reducing the load
Virtual memory leak causes model inference timeoutCan check whether there is a virtual memory leak in the system
Model instruction freeze causes inference timeoutWhen it is confirmed that the process has not exited, you can check the status of BPU tasks by running cat /sys/devices/system/bpu/bpu0/task_running. If the same task persists and its p_time keeps increasing, it indicates that the model has not completed for a long time
OtherPlease keep the relevant logs or environment properly and contact Horizon technical support staff for analysis
HB_UCP_TASK_RUN_FAILEDThe task is not completed. Calling to release the task in advance will return this error code in the waiting interface or callback functionPlease check whether the behavior of the early release task meets expectations
The ROI of the Resizer input model does not meet the restrictionsPlease add a legality check for ROI before creating a task
Internal issuesPlease keep the relevant logs or environment properly and contact Horizon technical support staff for analysis
HB_UCP_TASK_HANDLE_INVALIDThe task handle of the imported parameter of the model inference interface is illegal, not output by hbDNNInferV2, or has already been releasedPlease check the correctness of the task handle object or the interface usage
The task handle of the operator task's imported parameter is illegal and must be a null pointer or point to a null pointerPlease check the imported parameter of the task handle of the interface
HB_UCP_OP_NOT_REGISTERDSP custom operator is not registeredPlease check the registration interface call on the DSP side or confirm whether the custom operator CMD value is consistent with the registered value on the DSP side
HB_UCP_MEM_ALLOC_FAILMemory allocation failedPlease check whether there is a memory leak or excessive memory requirements
HB_UCP_MEM_MAP_FAILModel inference memory mapping failedPlease check whether the tensor address information used for inference, including the start address and size, is included within the applied hbmem memory space
HB_UCP_FILE_OPEN_FAILEDThe file used for model loading cannot be openedPlease confirm that the model file exists and is readable
HB_UCP_MODEL_INVALIDModel loading failed, content verification failedPlease check the correctness of the hbm model file or its content
HB_UCP_MODEL_INCOMPATIBLEThe model architecture is incompatible with the operating environmentPlease check whether the march parameter of the hbm compile settings is consistent with the operating environment
HB_UCP_DSP_UNAVAILABLEDSP communication is unavailablePlease check if the DSP has started normally
HB_UCP_DSP_XV_ALLOC_FAILDSP side failed to apply for TCM memoryPlease check if the DSP has memory leaks or excessive memory requirements
HB_UCP_DSP_MMAP_FAILDSP memory mapping failedPlease check if the address information belongs to hbmem. If there are still issues, please contact Horizon technical support staff for analysis
HB_UCP_CODEC_OPERATION_NOT_ALLOWEDCodec status anomaly causes operation failure, usually due to an illegal statePlease contact Horizon technical support staff for analysis
HB_UCP_CODEC_INSUFFICIENT_RESInsufficient system memory causes quota failurePlease check and release idle memory resources
HB_UCP_CODEC_NO_FREE_INSTANCEThe number of Context instances has reached the upper limitPlease release idle instances before creating new ones
HB_UCP_CODEC_IS_INUSETasks are still occupied when Context is releasedPlease release all associated tasks first and then release the Context
Tip

When analyzing error codes, it is recommended to combine them with error logs. Additionally, you can adjust the UCP log level through environment variables to help troubleshoot issues based on more detailed log information.