Skip to content

[MULTI] Fixed data race introduced in the https://github.com/openvinotoolkit/openvino/pull/3300#3490

Merged
ilya-lavrenov merged 1 commit intoopenvinotoolkit:masterfrom
myshevts:fix-optimized-multi-logic
Dec 7, 2020
Merged

[MULTI] Fixed data race introduced in the https://github.com/openvinotoolkit/openvino/pull/3300#3490
ilya-lavrenov merged 1 commit intoopenvinotoolkit:masterfrom
myshevts:fix-optimized-multi-logic

Conversation

@myshevts
Copy link
Copy Markdown
Contributor

@myshevts myshevts commented Dec 7, 2020

it is easy to capture when there are 2 app-level inference requests, but only single worker (MULTI) request

main thread | callback thread


                                                                              | <in the callback, the worker request>
                                                                              |   <the request returns itself to the "idle" queue>
                                                                              | 1) idleGuard.Release()->try_push(workerRequestPtr)

2) |
3) starts another request with StartAsync | ...
4) <in the ThisRequestExecutor::run()> |
workerInferRequest->_task = std::move(task); | if (_inferPipelineTasks.try_pop(workerRequestPtr->task))

the last line introduces DATA RACE (sporadically manifested in the bad_function_call exception), the fix is in this commit

it is easy to capture when there are 2 app-level inference requests, but only single worker (MULTI) request

main thread                                        |       callback thread
___________________________________________________________________________
                                                   | <in the callback, the worker request>
                                                   |   <the request returns itself to the "idle" queue>
                                                   | 1) idleGuard.Release()->try_push(workerRequestPtr)
2)<notified on vacant worker arrived via callback> |
3) starts another request with StartAsync          | ...
4) <in the ThisRequestExecutor::run()>             |
workerInferRequest->_task = std::move(task);       | if (_inferPipelineTasks.try_pop(workerRequestPtr->task))

the last line introduces DATA RACE (sporadically manifested in the bad_function_call exception), the fix is in this commit
@myshevts myshevts added this to the 2021.3 milestone Dec 7, 2020
@myshevts myshevts requested a review from a team December 7, 2020 11:50
@openvino-pushbot openvino-pushbot added the category: MULTI OpenVINO MULTI device plugin label Dec 7, 2020
@myshevts myshevts changed the title fixed data race introduced in the https://github.com/openvinotoolkit/openvino/pull/3300 [MULTI] Fixed data race introduced in the https://github.com/openvinotoolkit/openvino/pull/3300 Dec 7, 2020
@ilya-lavrenov ilya-lavrenov merged commit 57fda7f into openvinotoolkit:master Dec 7, 2020
mryzhov pushed a commit to mryzhov/openvino that referenced this pull request Dec 11, 2020
…it#3490)

it is easy to capture when there are 2 app-level inference requests, but only single worker (MULTI) request

main thread                                        |       callback thread
___________________________________________________________________________
                                                   | <in the callback, the worker request>
                                                   |   <the request returns itself to the "idle" queue>
                                                   | 1) idleGuard.Release()->try_push(workerRequestPtr)
2)<notified on vacant worker arrived via callback> |
3) starts another request with StartAsync          | ...
4) <in the ThisRequestExecutor::run()>             |
workerInferRequest->_task = std::move(task);       | if (_inferPipelineTasks.try_pop(workerRequestPtr->task))

the last line introduces DATA RACE (sporadically manifested in the bad_function_call exception), the fix is in this commit
vzinovie pushed a commit to vzinovie/openvino that referenced this pull request Dec 15, 2020
…it#3490)

it is easy to capture when there are 2 app-level inference requests, but only single worker (MULTI) request

main thread                                        |       callback thread
___________________________________________________________________________
                                                   | <in the callback, the worker request>
                                                   |   <the request returns itself to the "idle" queue>
                                                   | 1) idleGuard.Release()->try_push(workerRequestPtr)
2)<notified on vacant worker arrived via callback> |
3) starts another request with StartAsync          | ...
4) <in the ThisRequestExecutor::run()>             |
workerInferRequest->_task = std::move(task);       | if (_inferPipelineTasks.try_pop(workerRequestPtr->task))

the last line introduces DATA RACE (sporadically manifested in the bad_function_call exception), the fix is in this commit
mryzhov pushed a commit to mryzhov/openvino that referenced this pull request Dec 16, 2020
…it#3490)

it is easy to capture when there are 2 app-level inference requests, but only single worker (MULTI) request

main thread                                        |       callback thread
___________________________________________________________________________
                                                   | <in the callback, the worker request>
                                                   |   <the request returns itself to the "idle" queue>
                                                   | 1) idleGuard.Release()->try_push(workerRequestPtr)
2)<notified on vacant worker arrived via callback> |
3) starts another request with StartAsync          | ...
4) <in the ThisRequestExecutor::run()>             |
workerInferRequest->_task = std::move(task);       | if (_inferPipelineTasks.try_pop(workerRequestPtr->task))

the last line introduces DATA RACE (sporadically manifested in the bad_function_call exception), the fix is in this commit
mryzhov pushed a commit to mryzhov/openvino that referenced this pull request Jan 14, 2021
…it#3490)

it is easy to capture when there are 2 app-level inference requests, but only single worker (MULTI) request

main thread                                        |       callback thread
___________________________________________________________________________
                                                   | <in the callback, the worker request>
                                                   |   <the request returns itself to the "idle" queue>
                                                   | 1) idleGuard.Release()->try_push(workerRequestPtr)
2)<notified on vacant worker arrived via callback> |
3) starts another request with StartAsync          | ...
4) <in the ThisRequestExecutor::run()>             |
workerInferRequest->_task = std::move(task);       | if (_inferPipelineTasks.try_pop(workerRequestPtr->task))

the last line introduces DATA RACE (sporadically manifested in the bad_function_call exception), the fix is in this commit
jiwaszki pushed a commit to akuporos/openvino that referenced this pull request Jan 15, 2021
…it#3490)

it is easy to capture when there are 2 app-level inference requests, but only single worker (MULTI) request

main thread                                        |       callback thread
___________________________________________________________________________
                                                   | <in the callback, the worker request>
                                                   |   <the request returns itself to the "idle" queue>
                                                   | 1) idleGuard.Release()->try_push(workerRequestPtr)
2)<notified on vacant worker arrived via callback> |
3) starts another request with StartAsync          | ...
4) <in the ThisRequestExecutor::run()>             |
workerInferRequest->_task = std::move(task);       | if (_inferPipelineTasks.try_pop(workerRequestPtr->task))

the last line introduces DATA RACE (sporadically manifested in the bad_function_call exception), the fix is in this commit
@myshevts myshevts deleted the fix-optimized-multi-logic branch December 14, 2021 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: MULTI OpenVINO MULTI device plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants