Skip to content

OpenVINO segfaults when setting some properties #179

@nbigaouette

Description

@nbigaouette

I want to set some OpenVINO properties but OpenVINO crashes when doing so. I get a segfault when setting RwPropertyKey::LogLevel on the core, and a stack overflow (!?) when setting it for a compiled model. I get similar crashes when trying to set other properties, like RwPropertyKey::HintExecutionMode, RwPropertyKey::HintPerformanceMode, or even RwPropertyKey::InferenceNumThreads.

Here's an minimal example:

// export DYLD_LIBRARY_PATH=/opt/homebrew/Cellar/openvino/2025.3.0_1/lib

use openvino::Core;

fn main() {
    let device = openvino::DeviceType::CPU;
    let mut core = Core::new().unwrap();

    let level = "debug";

    // This segfaults
    core.set_property(&device, &openvino::RwPropertyKey::LogLevel, level)
        .unwrap();

    let model = core
        .read_model_from_file(
            "mobilenet.xml", // b28eafd9f8cdf3e265dae4be2eacc4849c0d4693fde584ceca3541bcb4d79e6f
            "mobilenet.bin", // 8371f708ef167a783ed01fc6635f4f05e76f720db95e954aff3cba3ed4f29924
        )
        .unwrap();

    // This crashes with:
    //      thread 'main' has overflowed its stack
    //      fatal runtime error: stack overflow, aborting
    let mut compiled_model = core.compile_model(&model, device).unwrap();
    compiled_model
        .set_property(&openvino::RwPropertyKey::LogLevel, level)
        .unwrap();

    println!("Done");
}

This is on macOS 15.7, using openvino 2025.3.0 from homebrew and openvino-rs version 0.9.1 with the runtime-linking cargo feature.

I tried to debug this with lldb but homebrew's version does not have debug symbols. Even building it manually I couldn't get much information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions