This repository was archived by the owner on Jul 29, 2024. It is now read-only.
Fixed the core dump issue with only 1 frame input.#415
Merged
Conversation
(When receiving only 1 frame input, )SvtHevcEncApp or any application
may invokes EbDeinitEncoder() ahead of all the kernel threads complete
processing. And EbDeinitEncoder() would free all the recorded memory
objects which may be still used by some threads, so that race condition
happens.
So fixed (worked around) this issue by terminating the kernel threads
before freeing memories. Ideally, there should be some object reference
and unreference mechanism to make the objects access safe.
Note:
1. EbObjectIncLiveCount() couldn't be helpful to address such race
condition, because it just avoids that an EbObjectWrapper_t object
wouldn't be returned back to an empty queue prematurely;
2. EB_SEND_END_OBJ() plus EB_CHECK_END_OBJ() (induced in PR OpenVisualCloud#270) could
not avoid such race condition, either. Because the objects can be
freed at any moment when a kernel thread is running and needs to
access to it.
Signed-off-by: Austin Hu <austin.hu@intel.com>
Contributor
|
Hi Austin, it needs to be |
intelmark
reviewed
Nov 6, 2019
Contributor
Author
It's in the last line of the 1st comment. |
Signed-off-by: Austin Hu <austin.hu@intel.com>
intelmark
approved these changes
Nov 6, 2019
Contributor
Contributor
Author
tianjunwork
approved these changes
Nov 12, 2019
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
(When receiving only 1 frame input, )SvtHevcEncApp or any application
may invokes EbDeinitEncoder() ahead of all the kernel threads complete
processing. And EbDeinitEncoder() would free all the recorded memory
objects which may be still used by some threads, so that race condition
happens.
So fixed (worked around) this issue by terminating the kernel threads
before freeing memories. Ideally, there should be some object reference
and unreference mechanism to make the objects access safe.
Note:
condition, because it just avoids that an EbObjectWrapper_t object
wouldn't be returned back to an empty queue prematurely;
not avoid such race condition, either. Because the objects can be
freed at any moment when a kernel thread is running and needs to
access to it.
Signed-off-by: Austin Hu austin.hu@intel.com
Fixes #413 .