-
Notifications
You must be signed in to change notification settings - Fork 3.2k
ORT Debug Build Fails to Infer for Every Model #24535
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
Comments
I tried the latest code, and ran onnx_test_runner and onnxruntime_perf_test with a resnet50 model. They all didn't find any issue.
The model was downloaded from onnx model zoo. Here is my build command:
|
edgchen1
added a commit
that referenced
this issue
Apr 25, 2025
### Description <!-- Describe your changes. --> Fix memleakdbg call stack output. The call stack output was getting clobbered: `C:\dev\onnxruntime\build\Debug\_deps\googletest-src\googletest\include\gtest\internal\gtest-port.h(1631): l\gtest-port.h(1631): eadLocal<testing::Sequence *>::GetOrCreateValue` I think the issue is that this aliasing of `buffer` and `symbol`: https://github.com/microsoft/onnxruntime/blob/173a11a4e7a2f7a360c9db6abbe601a06a16f004/onnxruntime/core/platform/windows/debug_alloc.cc#L97-L100 does not play nicely with a call to `_snprintf_s` like this: https://github.com/microsoft/onnxruntime/blob/173a11a4e7a2f7a360c9db6abbe601a06a16f004/onnxruntime/core/platform/windows/debug_alloc.cc#L115 The clobbered output does not match the predefined, ignored patterns, so we see spurious mem leak check output. This change updates the memleakdbg output generation to use C++ ostreams and instead of fixed size buffers and `_snprintf_s`. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Fix spurious mem leak check output. Fix #24535.
The screenshot was from onnxruntime_perf_test. @jatinwadhwa921 , do you have more details? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the issue
When building ONNX Runtime in Debug configuration, inference consistently fails for all models tested (e.g., SqueezeNet, AlexNet). The same models run successfully with a Release build. This issue appears to be isolated to the Debug build configuration and is reproducible across different models.
The inference attempt in Debug mode results in the following error (attached below), indicating a possible issue in debug-specific assertions, memory checks, or internal state validations.

To reproduce
Urgency
No response
Platform
Windows
OS Version
Windows
ONNX Runtime Installation
Built from Source
ONNX Runtime Version or Commit ID
main
ONNX Runtime API
C++
Architecture
X64
Execution Provider
Default CPU
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: