- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This always happens when using ov::Core in the C++ execution environment.
I checked with OpenVINO2023.0.0 C++ sample (classification_sample_async) using the _Crt Mem method.
And it was the same with the previous version (2021.4.752 or 2022.3.0).
I attached the code for memory leak confirmation that added _CrtMem to the classification_sample_async sample (main.cpp)
Running this detected the leak as below:
Dumping objects ->
{253771} normal block at 0x000001BAE43B8700, 112 bytes long.
Data: <@ ; 0 ; > 40 8F 3B E4 BA 01 00 00 30 98 3B E4 BA 01 00 00
{253770} normal block at 0x000001BAE43B9830, 112 bytes long.
Data: < ; @ ; > 00 87 3B E4 BA 01 00 00 40 8F 3B E4 BA 01 00 00
{253769} normal block at 0x000001BAE31B4590, 128 bytes long.
Data: <@ ; @ ; > 40 8F 3B E4 BA 01 00 00 40 8F 3B E4 BA 01 00 00
{253768} normal block at 0x000001BAE3218760, 16 bytes long.
Data: < v > 00 76 80 08 F8 7F 00 00 00 00 00 00 00 00 00 00
{253767} normal block at 0x000001BAE43B8F40, 112 bytes long.
Data: <0 ; ; > 30 98 3B E4 BA 01 00 00 00 87 3B E4 BA 01 00 00
{253766} normal block at 0x000001BAE32173B0, 16 bytes long.
Data: < u > E8 75 80 08 F8 7F 00 00 00 00 00 00 00 00 00 00
:
Object dump complete.
Any plans to fix this?
Thank you!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi North-man,
Thanks for highlighting this. We are going to investigate this and get back to you.
Could you share what hardware you are using? (CPU model, OS,etc)
Regards,
Aznie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Aznie,
Thank you for your response.
My environment is below.
- Windows10
- Intel(R) Xeon(R) W-2145 CPU @ 3.70GHz
- C++
- OpenVINO2023.0.0, 2022.3.0.0, 2021.4.752
Please let me know if any information is missing.
Regards,
North-man
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi North-man,
We have validated your main.cpp and we are unable to observe any significant memory leak compared to the default main.cpp.
Could you share how you test the memory leak so that we can duplicate it on our end?
Regards,
Aznie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Aznie,
Thank you for your response.
Sorry, I didn't explain enough.
I'm running in Debug mode in VisualStudio 2019.
If there is a memory release leak in the heap area immediately after executing the _CrtMemDumpAllObjectsSince method, it will dump the information.
Please let me know if any information is missing.
Regards,
North-man
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi North-man,
Could you please elaborate on how you running the classification_sample_async and which model you are using? By default, the classification will require for model and input path.
Regards,
Aznie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Aznie,
Thank you for your response.
>>By default, the classification will require for model and input path
Yes, I have set the model and inputs for debugging in the classification_sample_async project properties.
Since the inference result is not so relevant, the model and the inputs can be anything.
I have a simple model and image that I used for validation.
I can't upload it to this site, so if you tell me your email address, I can provide it.
Regards,
North-man
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi North-man,
You can share it to my email:noor.aznie.syaarriehaahx.binti.baharuddin@intel.com
Regards,
Aznie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi North-man,
Thanks for your patience while we are validating this memory leak. I can confirm there is a memory leak in the Image Classification Async C++ Sample on Windows CPU with OpenVINO 2023 release.
I will escalate this to our development team for rectification which might take some time. I will provide you with the latest updates once available from their end.
Regards,
Aznie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Aznie,
Thank you for your response.
I've got it.
I look forward to your update.
Regards,
North-man
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi North-man,
We have received updates from our development team as follows.
`CrtDumpMemoryLeaks()` reports all objects that weren't destroyed (global objects too). So, they were able to reproduce the issue with `include "openvino/openvino.hpp"` only (without any execution in main), or with `DEFINE...` macro from `gflags` library (used by sample) without OpenVINO at all. According to analysis above, such report can't be treated as a real product memory leak. They suggest using `sanitizers` or `valgrind` tools as more reliable tools to check the memory leakage.
More details about how we are tracking memory leaks may be found in the link below:
Regards,
Peh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Peh,
Thank you for your report.
Surely it happens just by defining gflags like below.
gflags::ParseCommandLineNonHelpFlags(&argc, &argv, true);
Ok, I'll try using 'address-sanitizer' or 'valgrind' to check.
I will contact you again if there are any points that I am not satisfied with.
Thank you.
Regards,
North-man
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi North-man,
This thread will no longer be monitored since we have provided the information. If you need any additional information from Intel, please submit a new question.
Regards,
Aznie

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page