-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[core] fix thread safe issue in #19832 #24562
Merged
wangleis
merged 7 commits into
openvinotoolkit:master
from
tiger100256-hu:huyuan/fix_thread_safe_issue
May 23, 2024
Merged
[core] fix thread safe issue in #19832 #24562
wangleis
merged 7 commits into
openvinotoolkit:master
from
tiger100256-hu:huyuan/fix_thread_safe_issue
May 23, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I lost code "t_stream_count_map[(void*)this] = item.first;" in openvinotoolkit#19832 the thread safe issue happen in below workflow create thread A call CustomThreadLocal:local() in thread A -> create stream A (the count of stream A is 2) destory thread A (the count of stream A is 1) create thread B (same thread id with thread A) call CustomThreadLocal:local() in thread B -> use stream A(the count of stream A is 1, so it's broken) Signed-off-by: HU Yuan2 <yuan2.hu@intel.com>
github-actions
bot
added
the
category: inference
OpenVINO Runtime library - Inference
label
May 17, 2024
3 tasks
ilya-lavrenov
added
bug
Something isn't working
pr: needs tests
PR needs tests updating
labels
May 19, 2024
Signed-off-by: HU Yuan2 <yuan2.hu@intel.com>
Signed-off-by: HU Yuan2 <yuan2.hu@intel.com>
Can we add test cases for 2 models to concurrently create infer and do infer, including sync infer and async infer? |
@riverlijunjie ok, I will update the test case |
Signed-off-by: HU Yuan2 <yuan2.hu@intel.com>
Signed-off-by: HU Yuan2 <yuan2.hu@intel.com>
@riverlijunjie already add test case for two model and async infer, please help to continue review |
riverlijunjie
approved these changes
May 23, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
sunxiaoxia2022
approved these changes
May 23, 2024
use space instead of tab Signed-off-by: HU Yuan2 <yuan2.hu@intel.com>
wangleis
approved these changes
May 23, 2024
Merged
via the queue into
openvinotoolkit:master
with commit May 23, 2024
1a4ae5e
116 of 117 checks passed
tiger100256-hu
added a commit
to tiger100256-hu/openvino
that referenced
this pull request
May 24, 2024
…t#24562) - *I lost code `t_stream_count_map[(void*)this] = item.first;` in - *the thread safe issue happen in below workflow* - create thread A call CustomThreadLocal:local() in thread A -> create stream A (the count of stream A is 2) destory thread A (the count of stream A is 1) create thread B (same thread id with thread A) call CustomThreadLocal:local() in thread B -> use stream A(the count of stream A is 1, so it's broken) - *add testcase, also fix https://github.com/openvinotoolkit/openvino/pull/19986/files#r1332774754* - Closes openvinotoolkit#24509 --------- Signed-off-by: HU Yuan2 <yuan2.hu@intel.com> Co-authored-by: Wanglei Shen <wanglei.shen@intel.com>
wangleis
added a commit
that referenced
this pull request
May 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
category: inference
OpenVINO Runtime library - Inference
Code Freeze
no-match-files
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Details:
t_stream_count_map[(void*)this] = item.first;
in [core] fix memory leak issue imported by #18868 #19832call CustomThreadLocal:local() in thread A -> create stream A (the count of stream A is 2)
destory thread A (the count of stream A is 1)
create thread B (same thread id with thread A)
call CustomThreadLocal:local() in thread B -> use stream A(the count of stream A is 1, so it's broken)
Tickets: