corrupted size vs. prev_size or Segmentation fault

Symptom

The error message "corrupted size vs. prev_size" or "Segmentation fault" is displayed after the execution is complete.

Possible Cause

Another component in the user's service process uses ACL resources and calls aclFinalize to destroy the resources. As a result, ACL resources are repeatedly destroyed.

Solution

  • Solution 1

    Set the environment variable MX_INDEX_FINALIZE to 0, so that Index SDK does not call aclFinalize. If it is set to 1, aclFinalize is still called. Other values are invalid.

    Ensure that the matched Index SDK is installed and add the following environment variable:

    export MX_INDEX_FINALIZE=0
  • Solution 2

    If solution 1 does not work, delete from paddle.base import libpaddle and adjust the package import sequence. If mx_rag.retrievers or mx_rag.storage package and mx_rag.document or mx_rag.knowledge are imported at the same time, import the latter one first.