[Bug]: benchmark_app crashes when an argument value contains '=' or is empty
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start with get_command_line_arguments() in tools/benchmark_tool/openvino/tools/benchmark/utils/utils.py, called from main.py after argument parsing. Reproduce both commands from the issue, including a model path containing '=' and an empty -i value. Done means both arguments are collected without a traceback and the -m value retains its full path.
Written by the indexing model from the issue text.
Description
OpenVINO Version
master (786821778a); also reproduces with openvino 2026.3.1 from PyPI
Operating System
Other (Please specify in description)
Device used for inference
CPU
Framework
ONNX
Model used
Not model specific
Issue description
benchmark_app ends in a traceback for two ordinary command lines that argparse has already accepted.
get_command_line_arguments() in tools/benchmark_tool/openvino/tools/benchmark/utils/utils.py is called from main.py on sys.argv right after argument parsing succeeds. It splits on = without a maxsplit and indexes arg[0] without checking for an empty string:
arg_name, arg_value = arg.split('=') # no maxsplit
...
if arg[0] == '-': # unguarded index
A value that itself contains =:
$ benchmark_app -m=/data/exp=1/model.xml
[ ERROR ] too many values to unpack (expected 2)
File ".../utils/utils.py", line 473, in get_command_line_arguments
arg_name, arg_value = arg.split('=')
ValueError: too many values to unpack (expected 2)
An empty argument, which is what a shell passes when a variable used for an argument is unset (-i "$INPUT" with INPUT unset):
$ benchmark_app -m model.xml -i ""
[ ERROR ] string index out of range
File ".../utils/utils.py", line 478, in get_command_line_arguments
if arg[0] == '-':
IndexError: string index out of range
Neither is rejected by argparse, so the user gets a raw traceback from an internal helper rather than an argument error. The first is reachable from any model path below a directory containing =.
The repro host was Fedora 43 with Python 3.13, though nothing here is OS or model specific: both failures happen while collecting arguments, before any model is read.
Step-by-step reproduction
python3 -m venv venv
./venv/bin/pip install openvino
./venv/bin/benchmark_app -m=/data/exp=1/model.xml
./venv/bin/benchmark_app -m model.xml -i ""
Relevant log output
ValueError: too many values to unpack (expected 2)
IndexError: string index out of range
Expected: the arguments are collected without error, -m keeping the full path as its value.
Issue submission checklist
- I'm reporting an issue. It's not a question.
- I checked the problem with the documentation, FAQ, open issues, Stack Overflow, etc., and have not found a solution.
- There is reproducer code and related data files such as images, videos, models, etc.
- Dominant language
- C++
- Stars
- 10.9k
- Forks
- 3.4k
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 289
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openvinotoolkit/openvino
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openvinotoolkit/openvino#38247 ·
-
bug support_request
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openvinotoolkit/openvino#38238 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openvinotoolkit/openvino#38226 ·
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 88/100
openvinotoolkit/openvino#38195 ·
-
bug support_request
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openvinotoolkit/openvino#38158 ·
All issues in openvinotoolkit/openvino
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·