Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Issue 512973002: Avoid deadlock between Pipeline and RendererImpl. (Closed)

Created:
6 years, 3 months ago by xhwang
Modified:
6 years, 3 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Avoid 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -31 lines) Patch
M content/browser/media/encrypted_media_browsertest.cc View 1 3 chunks +0 lines, -5 lines 0 comments Download
M content/browser/media/media_browsertest.cc View 1 3 chunks +0 lines, -7 lines 0 comments Download
M content/browser/media/media_source_browsertest.cc View 1 3 chunks +0 lines, -5 lines 0 comments Download
M media/base/pipeline.cc View 2 chunks +7 lines, -3 lines 0 comments Download
M media/filters/pipeline_integration_test.cc View 1 2 chunks +0 lines, -3 lines 0 comments Download
M media/filters/renderer_impl.cc View 3 chunks +5 lines, -3 lines 0 comments Download
M tools/valgrind/gtest_exclude/content_browsertests.gtest-drmemory.txt View 1 1 chunk +0 lines, -5 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
xhwang
xhwang@chromium.org changed reviewers: + scherkus@chromium.org
6 years, 3 months ago (2014-08-27 23:26:52 UTC) #1
xhwang
I am making TSAN build to verify the fix. Meanwhile, PTAL!
6 years, 3 months ago (2014-08-27 23:26:52 UTC) #2
scherkus (not reviewing)
https://codereview.chromium.org/512973002/diff/1/media/base/pipeline.cc File media/base/pipeline.cc (right): https://codereview.chromium.org/512973002/diff/1/media/base/pipeline.cc#newcode293 media/base/pipeline.cc:293: duration_ = duration; I'm pretty sure this runs on ...
6 years, 3 months ago (2014-08-27 23:41:11 UTC) #3
xhwang
https://codereview.chromium.org/512973002/diff/1/media/base/pipeline.cc File media/base/pipeline.cc (right): https://codereview.chromium.org/512973002/diff/1/media/base/pipeline.cc#newcode293 media/base/pipeline.cc:293: duration_ = duration; On 2014/08/27 23:41:11, scherkus wrote: > ...
6 years, 3 months ago (2014-08-28 00:46:28 UTC) #4
scherkus (not reviewing)
On 2014/08/28 00:46:28, xhwang wrote: > https://codereview.chromium.org/512973002/diff/1/media/base/pipeline.cc > File media/base/pipeline.cc (right): > > https://codereview.chromium.org/512973002/diff/1/media/base/pipeline.cc#newcode293 > ...
6 years, 3 months ago (2014-08-28 00:51:18 UTC) #5
xhwang
xhwang@chromium.org changed reviewers: + jyasskin@google.com
6 years, 3 months ago (2014-08-28 04:07:21 UTC) #6
xhwang
jyasskin: I reenabled the disabled tests. I tested one of the tests with and without ...
6 years, 3 months ago (2014-08-28 04:07:21 UTC) #7
xhwang
The CQ bit was checked by xhwang@chromium.org
6 years, 3 months ago (2014-08-28 04:18:30 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xhwang@chromium.org/512973002/20001
6 years, 3 months ago (2014-08-28 04:19:19 UTC) #9
Jeffrey Yasskin
On 2014/08/28 04:07:21, xhwang wrote: > jyasskin: I reenabled the disabled tests. I tested one ...
6 years, 3 months ago (2014-08-28 05:17:48 UTC) #10
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_chromium_compile_dbg on tryserver.chromium.mac ...
6 years, 3 months ago (2014-08-28 05:25:20 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001) as 3b2dff86be7304ee4b6710ce2e0f1a47fbd858c1
6 years, 3 months ago (2014-08-28 05:49:25 UTC) #12
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 02:57:57 UTC) #13
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/7def98aadf7cac26952eae1fb3294f56510d67d7
Cr-Commit-Position: refs/heads/master@{#292332}

Powered by Google App Engine
This is Rietveld 408576698