DescriptionAvoid deadlock between Pipeline and RendererImpl.
Both Pipeline and RendererImpl use it's own lock. We could end up with a dead
lock in the following scenario:
- On main thread, Pipeline holds it's lock (lock A) and calls into RendererImpl,
which also requires the RendererImpl's lock (lock B).
- On media thread, RendererImpl holds it's lock B and calls callback provided by
the Pipeline, which requires lock A.
This CL makes sure Pipeline never calls into RendererImpl while holding lock A
and RendererImpl nevers calls (back) into Pipeline while holding lock B. So
deadlock should not happen.
This CL also reverts 3 CLs that disabled various tests due to the bug:
- Revert "Exclude tests that deadlock under DrMemory (and Tsan)"
This reverts commit 0e014b9ad964236d67db60488168dbc0811655e9.
- Revert "Disable deadlock-y tests in TSan instead of just suppressing the error."
This reverts commit f712d106692d782f2a590a8e752f720ad76ee608.
- Revert "Suppress a deadlock report through media::Pipeline::GetMediaTime."
This reverts commit 5c72e0f67ce7e42804d809183bdae190024056ef.
BUG=407452
TEST=Ran PipelineIntegrationTest.ChunkDemuxerAbortRead_VideoOnly in a TSAN build for 10 mins and didn't see any issue.
Committed: https://crrev.com/7def98aadf7cac26952eae1fb3294f56510d67d7
Cr-Commit-Position: refs/heads/master@{#292332}
Patch Set 1 #
Total comments: 2
Patch Set 2 : reenable tests #
Messages
Total messages: 13 (0 generated)
|