Skip to content

Fix plugin config sporadic and fix proxy test#4188

Merged
rasapala merged 7 commits intomainfrom
_fix_proxy_test
May 8, 2026
Merged

Fix plugin config sporadic and fix proxy test#4188
rasapala merged 7 commits intomainfrom
_fix_proxy_test

Conversation

@rasapala
Copy link
Copy Markdown
Collaborator

@rasapala rasapala commented May 7, 2026

🛠 Summary

Proxy Issue #4172
Detect if proxy is set - norma path
Proxy not set - test timeout on HF_ENDPOINT

Fix sporadic Windows segfault in loadModel with numeric plugin config
Root cause fix: openvinotoolkit/openvino#35714

OVMS passes plugin_config_t (std::map<std::string, ov::Any>) to
compile_model, but ov::Any values for numeric properties like NUM_STREAMS
can carry either int64_t or std::string depending on the code path.
OpenVINO's CPU plugin unconditionally calls val.asstd::string() on all
properties, triggering an unsafe iostream conversion when the value is
numeric — causing sporadic memory corruption and segfault on Windows.

Add a typed normalization table in prepareDefaultPluginConfig that converts
known numeric/bool properties (NUM_STREAMS, INFERENCE_NUM_THREADS,
AUTO_BATCH_TIMEOUT, ENABLE_CPU_PINNING) from string to their native type
before compile_model is called. String-typed properties like PERFORMANCE_HINT
are untouched. Normalization also recurses into nested DEVICE_PROPERTIES maps.

🧪 Checklist

  • Unit tests added.
  • The documentation updated.
  • Change follows security best practices.
    ``

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Hugging Face pull/clone timeout test to behave deterministically across environments by controlling proxy usage and the remote endpoint used during the clone attempt.

Changes:

  • Forces a direct (no-proxy) connection in TestInvalidProxyTimeout so libgit2’s connect-timeout setting is applied.
  • Overrides HF_ENDPOINT to an unroutable TEST-NET-1 IP to avoid relying on real huggingface.co connectivity for the test outcome.

Comment thread src/test/pull_hf_model_test.cpp Outdated
Comment thread src/test/pull_hf_model_test.cpp Outdated
@rasapala rasapala changed the title Fix proxy test Fix proxy test and plugin config sporadic May 7, 2026
@rasapala rasapala changed the title Fix proxy test and plugin config sporadic Fix plugin config sporadic and fix proxy test May 7, 2026
@atobiszei atobiszei self-requested a review May 8, 2026 12:11
@rasapala rasapala merged commit 0f80a84 into main May 8, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

4 participants