Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when link both vino and tbb or tcmalloc on call ov::core.comile_model #28551

Open
Jsy0220 opened this issue Jan 20, 2025 · 8 comments
Open
Assignees

Comments

@Jsy0220
Copy link

Jsy0220 commented Jan 20, 2025

Hi, sorry for repeating the issue, but no more reply for this Issue

I use vino 2024.5, same problem found in 2024.6.

@rkazants
Copy link
Member

Hi @Jsy0220,

Please provide a version of TBB you use in your application. It can be case that different versions of TBB (yours and one linked to OpenVINO) can conflict that leads to crash.

Best regards,
Roman

@Jsy0220
Copy link
Author

Jsy0220 commented Jan 21, 2025

@rkazants Hi,
I use the libtbbmalloc_proxy.so.2.13 offered by vino like this:

Image

or it can also be reproduced by linking both tbbmalloc_proxy and the custom library that using vino.

Futher more, someone use libtcmalloc.so.4 in vino2024.6 also has the same problem see this Issue

Thank you !

@wangleis
Copy link
Contributor

@Jsy0220 Could you please compile OpenVINO with configuration -DENABLE_SYSTEM_TBB=ON in cmake to use system tbb in OpenVINO? Then check if issue still can be reproduced.

@Jsy0220
Copy link
Author

Jsy0220 commented Jan 21, 2025

@wangleis Hi, I tried to compile OpenVINO with configuration -DENABLE_SYSTEM_TBB=ON, but it seems be reseted to OFF by vino.

I use cmake configs as following:

cmake -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_INSTALL_PREFIX=../output \
      -DENABLE_INTEL_GPU=OFF \
      -DENABLE_INTEL_NPU=OFF \
      -DENABLE_HETERO=OFF \
      -DENABLE_TEMPLATE=OFF \
      -DENABLE_OV_ONNX_FRONTEND=OFF \
      -DENABLE_OV_PADDLE_FRONTEND=OFF \
      -DENABLE_OV_TF_FRONTEND=OFF \
      -DENABLE_OV_TF_LITE_FRONTEND=OFF \
      -DENABLE_OV_PYTORCH_FRONTEND=OFF \
      -DENABLE_OV_JAX_FRONTEND=OFF \
      -DENABLE_SAMPLES=OFF \
      -DENABLE_PYTHON=OFF \
      -DENABLE_WHEEL=OFF \
      -DENABLE_SYSTEM_PUGIXML=OFF \
      -DENABLE_SYSTEM_OPENCL=OFF \
      -DENABLE_SYSTEM_PROTOBUF=OFF \
      -DENABLE_SYSTEM_FLATBUFFERS=OFF \
      -DENABLE_SYSTEM_TBB=ON ..

when configure done, check by cmake -LH .. and showing:

-- OpenVINO Runtime enabled features: 
-- 
--     CI_BUILD_NUMBER: 2024.5.0-17288-db64e5c66a9
--     ENABLE_LTO = OFF
--     OS_FOLDER = OFF
--     USE_BUILD_TYPE_SUBFOLDER = ON
--     CMAKE_COMPILE_WARNING_AS_ERROR = OFF
--     ENABLE_QSPECTRE = OFF
--     ENABLE_INTEGRITYCHECK = OFF
--     ENABLE_SANITIZER = OFF
--     ENABLE_UB_SANITIZER = OFF
--     ENABLE_THREAD_SANITIZER = OFF
--     ENABLE_COVERAGE = OFF
--     ENABLE_SSE42 = ON
--     ENABLE_AVX2 = ON
--     ENABLE_AVX512F = ON
--     ENABLE_NEON_FP16 = OFF
--     BUILD_SHARED_LIBS = ON
--     ENABLE_LIBRARY_VERSIONING = ON
--     ENABLE_FASTER_BUILD = OFF
--     ENABLE_CPPLINT = ON
--     ENABLE_CPPLINT_REPORT = OFF
--     ENABLE_CLANG_FORMAT = OFF
--     ENABLE_NCC_STYLE = OFF
--     ENABLE_UNSAFE_LOCATIONS = OFF
--     ENABLE_FUZZING = OFF
--     ENABLE_PROXY = ON
--     ENABLE_INTEL_CPU = ON
--     ENABLE_ARM_COMPUTE_CMAKE = OFF
--     ENABLE_TESTS = OFF
--     ENABLE_INTEL_GPU = OFF
--     ENABLE_ONEDNN_FOR_GPU = OFF
--     ENABLE_INTEL_NPU = OFF
--     ENABLE_INTEL_NPU_INTERNAL = OFF
--     ENABLE_DEBUG_CAPS = OFF
--     ENABLE_NPU_DEBUG_CAPS = OFF
--     ENABLE_GPU_DEBUG_CAPS = OFF
--     ENABLE_CPU_DEBUG_CAPS = OFF
--     ENABLE_SNIPPETS_DEBUG_CAPS = OFF
--     ENABLE_SNIPPETS_LIBXSMM_TPP = OFF
--     ENABLE_PROFILING_ITT = OFF
--     ENABLE_PROFILING_FILTER = ALL
--     ENABLE_PROFILING_FIRST_INFERENCE = ON
--     SELECTIVE_BUILD = OFF
--     ENABLE_DOCS = OFF
--     ENABLE_PKGCONFIG_GEN = ON
--     THREADING = TBB
--     ENABLE_INTEL_OPENMP = OFF
--     ENABLE_TBBBIND_2_5 = ON
--     ENABLE_TBB_RELEASE_ONLY = ON
--     ENABLE_MULTI = ON
--     ENABLE_AUTO = ON
--     ENABLE_AUTO_BATCH = ON
--     ENABLE_HETERO = OFF
--     ENABLE_TEMPLATE = OFF
--     ENABLE_PLUGINS_XML = OFF
--     ENABLE_FUNCTIONAL_TESTS = OFF
--     ENABLE_SAMPLES = OFF
--     ENABLE_OV_ONNX_FRONTEND = OFF
--     ENABLE_OV_PADDLE_FRONTEND = OFF
--     ENABLE_OV_IR_FRONTEND = ON
--     ENABLE_OV_PYTORCH_FRONTEND = OFF
--     ENABLE_OV_JAX_FRONTEND = OFF
--     ENABLE_OV_IR_FRONTEND = ON
--     ENABLE_OV_TF_FRONTEND = OFF
--     ENABLE_OV_TF_LITE_FRONTEND = OFF
--     ENABLE_SNAPPY_COMPRESSION = OFF
--     ENABLE_STRICT_DEPENDENCIES = OFF
--     ENABLE_SYSTEM_TBB = OFF
--     ENABLE_SYSTEM_PUGIXML = OFF
--     ENABLE_SYSTEM_FLATBUFFERS = OFF
--     ENABLE_SYSTEM_OPENCL = OFF
--     ENABLE_SYSTEM_PROTOBUF = OFF
--     ENABLE_SYSTEM_SNAPPY = OFF
--     ENABLE_JS = ON
--     ENABLE_OPENVINO_DEBUG = OFF
--     ENABLE_API_VALIDATOR = OFF

from which you can see the ENABLE_SYSTEM_TBB is OFF.
Do you know why ? and how to make it ON ?

@wangleis
Copy link
Contributor

@Jsy0220 Looks like there is no system tbb in your system. May I ask which other tbb version do you use besides OpenVINO?

@Jsy0220
Copy link
Author

Jsy0220 commented Jan 22, 2025

@wangleis hi, actually, I don't need tbb in my application directly. So I don't think I use any other tbb, or do you have any method to check it ?

Initially, I add tbb libs which offered by OpenVINO by accident and then crash happened, so I want to know why.

And someone found if link both vino and tcmalloc also reproduce the same crash, but I haven't tried it. I think it maybe caused by the same reason.

I need to use both tcmalloc and vino next. So I want to find the resolution urgently.

@wangleis
Copy link
Contributor

@Jsy0220 Thanks for your clarification. Could you share the following detail system configuration and steps to reproduce the issue?

  1. Platform information
  2. OS information
  3. vino information
  4. OpenVINO version

Another option is using cmake configuration -DTHREADING=OMP to compile OpenVINO with OpenMP.

@Jsy0220
Copy link
Author

Jsy0220 commented Jan 23, 2025

@wangleis
hi, my operating environment as following:

Platform: linux
OS: Ubuntu 20.04.3 LTS (Focal Fossa)
OpenVINO: 2024.5 official pack

the steps to reproduce:

  1. a cpp file filled like:
#include <cstdio>
#include "openvino/openvino.hpp"

int main(int argc, char const* argv[])
{
    ov::Core core;
    auto model = core.read_model("xxxxx.xml");

    ov::preprocess::PrePostProcessor ppp = ov::preprocess::PrePostProcessor(model);

    model = ppp.build();
    auto compiled_model = core.compile_model(model, "CPU");

    std::fprintf(stderr, "Model compiled\n");
    return 0;
}
  1. a compile file for example a cmake file link vino like:
target_link_libraries(${PROJ}
    ${THIRD_PARTY_DIR}/openvino/lib/intel64/libopenvino.so
    ${THIRD_PARTY_DIR}/openvino/3rdparty/tbb/lib/libtbbmalloc_proxy.so
)

I will try the cmake configuration -DTHREADING=OMP, but I prefer tbb instead of openmp for some reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants