Why does my MATLAB Production Server request sometimes fail for CTFs that use Python?

3 ビュー (過去 30 日間)

I am using MATLAB Production Server R2024a to run deployed MATLAB code. As part of my CI/CD workflow, the CTF deployed to my MPS instance is regularly updated and tested.

However, the first call to a CTF after it has been updated will sometimes fail with sporadic data or memory corruption, hanging, crashing or returning bad data in a client response along with a host of confusing, sporadic messages in the MPS log file. I have also noticed this occurring during normal execution (i.e. CTFs not recently updated) when switching between CTFs. Both of these issues especially occur with CTFs that call third-party libraries like Python.

Why am I experiencing these issues with my auto-deployed CTFs?

採用された回答

MathWorks Support Team
MathWorks Support Team 2025 年 4 月 23 日
This can occur due to conflicts with third-party software during auto-deployment and context switching. You can avoid this issue in R2024a and later releases using component isolation. 
From the
:
        You can also use the component-isolation feature to avoid certain issues.
        Examples:
  • Third-party software, such a MEX file, that is not same-process safe (e.g. python code loaded from 2 or more components in same process)
  • Third-party software that is not hot-deploy safe. In other words, software that does not destruct or reinitialize correctly when a deployable archive is hot-deployed after at least one prior usage by the worker. One example of this that can happen if the software within the component CTF file contains static file or class scope data within native code and does not properly utilize the native code for these conditions. This could occur through improper use (or non-use) of the following software, among others reasons:
    • Windows: LoadLibrary, FreeLibrary, DllMain
    • Linux : dlopen, dlcose, __attribute__((constructor))

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInstallation についてさらに検索

タグ

タグが未入力です。

製品


リリース

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by